// Generated by Futhark 0.22.0
// git: ed22762 (Sat Jan 15 01:09:59 2022 +0100)

// We need to define _GNU_SOURCE before
// _any_ headers files are imported to get
// the usage statistics of a thread (i.e. have RUSAGE_THREAD) on GNU/Linux
// https://manpages.courier-mta.org/htmlman2/getrusage.2.html
#ifndef _GNU_SOURCE // Avoid possible double-definition warning.
#define _GNU_SOURCE
#endif

#ifdef __clang__
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wunused-variable"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-label"
#elif __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif

// Headers\n")
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
#include <float.h>

#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#ifdef __APPLE__
#define CL_SILENCE_DEPRECATION
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

// Initialisation
struct futhark_context_config;
struct futhark_context_config *futhark_context_config_new(void);
void futhark_context_config_free(struct futhark_context_config *cfg);
void futhark_context_config_add_build_option(struct futhark_context_config *cfg,
                                             const char *opt);
void futhark_context_config_set_debugging(struct futhark_context_config *cfg,
                                          int flag);
void futhark_context_config_set_profiling(struct futhark_context_config *cfg,
                                          int flag);
void futhark_context_config_set_logging(struct futhark_context_config *cfg,
                                        int flag);
void futhark_context_config_set_device(struct futhark_context_config *cfg, const
                                       char *s);
void futhark_context_config_set_platform(struct futhark_context_config *cfg,
                                         const char *s);
void
futhark_context_config_select_device_interactively(struct futhark_context_config *cfg);
void futhark_context_config_list_devices(struct futhark_context_config *cfg);
void futhark_context_config_dump_program_to(struct futhark_context_config *cfg,
                                            const char *path);
void
futhark_context_config_load_program_from(struct futhark_context_config *cfg,
                                         const char *path);
void futhark_context_config_dump_binary_to(struct futhark_context_config *cfg,
                                           const char *path);
void futhark_context_config_load_binary_from(struct futhark_context_config *cfg,
                                             const char *path);
void
futhark_context_config_set_default_group_size(struct futhark_context_config *cfg,
                                              int size);
void
futhark_context_config_set_default_num_groups(struct futhark_context_config *cfg,
                                              int num);
void
futhark_context_config_set_default_tile_size(struct futhark_context_config *cfg,
                                             int num);
void
futhark_context_config_set_default_reg_tile_size(struct futhark_context_config *cfg,
                                                 int num);
void
futhark_context_config_set_default_threshold(struct futhark_context_config *cfg,
                                             int num);
int futhark_context_config_set_tuning_param(struct futhark_context_config *cfg,
                                            const char *param_name,
                                            size_t new_value);
struct futhark_context;
struct futhark_context *futhark_context_new(struct futhark_context_config *cfg);
struct futhark_context
*futhark_context_new_with_command_queue(struct futhark_context_config *cfg,
                                        cl_command_queue queue);
void futhark_context_free(struct futhark_context *ctx);
cl_command_queue futhark_context_get_command_queue(struct futhark_context *ctx);
int futhark_get_tuning_param_count(void);
const char *futhark_get_tuning_param_name(int);
const char *futhark_get_tuning_param_class(int);

// Arrays
struct futhark_f32_2d;
struct futhark_f32_2d *futhark_new_f32_2d(struct futhark_context *ctx, const
                                          float *data, int64_t dim0,
                                          int64_t dim1);
struct futhark_f32_2d *futhark_new_raw_f32_2d(struct futhark_context *ctx, const
                                              cl_mem data, int64_t offset,
                                              int64_t dim0, int64_t dim1);
int futhark_free_f32_2d(struct futhark_context *ctx,
                        struct futhark_f32_2d *arr);
int futhark_values_f32_2d(struct futhark_context *ctx,
                          struct futhark_f32_2d *arr, float *data);
cl_mem futhark_values_raw_f32_2d(struct futhark_context *ctx,
                                 struct futhark_f32_2d *arr);
const int64_t *futhark_shape_f32_2d(struct futhark_context *ctx,
                                    struct futhark_f32_2d *arr);

// Opaque values


// Entry points
int futhark_entry_main(struct futhark_context *ctx,
                       struct futhark_f32_2d **out0,
                       struct futhark_f32_2d **out1,
                       struct futhark_f32_2d **out2, const
                       struct futhark_f32_2d *in0, const int64_t in1, const
                       int64_t in2, const int64_t in3, const int64_t in4, const
                       int64_t in5, const int64_t in6, const int64_t in7, const
                       int64_t in8, const int64_t in9, const int64_t in10, const
                       int64_t in11, const int64_t in12, const int64_t in13,
                       const int64_t in14);

// Miscellaneous
int futhark_context_sync(struct futhark_context *ctx);
char *futhark_context_report(struct futhark_context *ctx);
char *futhark_context_get_error(struct futhark_context *ctx);
void futhark_context_set_logging_file(struct futhark_context *ctx, FILE *f);
void futhark_context_pause_profiling(struct futhark_context *ctx);
void futhark_context_unpause_profiling(struct futhark_context *ctx);
int futhark_context_clear_caches(struct futhark_context *ctx);
#define FUTHARK_BACKEND_opencl

#ifdef __cplusplus
}
#endif

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <stdint.h>
// If NDEBUG is set, the assert() macro will do nothing. Since Futhark
// (unfortunately) makes use of assert() for error detection (and even some
// side effects), we want to avoid that.
#undef NDEBUG
#include <assert.h>
#include <stdarg.h>
// Start of util.h.
//
// Various helper functions that are useful in all generated C code.

#include <errno.h>
#include <string.h>

static const char *fut_progname = "(embedded Futhark)";

static void futhark_panic(int eval, const char *fmt, ...) __attribute__((noreturn));
static char* msgprintf(const char *s, ...);
static void* slurp_file(const char *filename, size_t *size);
static int dump_file(const char *file, const void *buf, size_t n);
struct str_builder;
static void str_builder_init(struct str_builder *b);
static void str_builder(struct str_builder *b, const char *s, ...);

static void futhark_panic(int eval, const char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  fprintf(stderr, "%s: ", fut_progname);
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  exit(eval);
}

// For generating arbitrary-sized error messages.  It is the callers
// responsibility to free the buffer at some point.
static char* msgprintf(const char *s, ...) {
  va_list vl;
  va_start(vl, s);
  size_t needed = 1 + (size_t)vsnprintf(NULL, 0, s, vl);
  char *buffer = (char*) malloc(needed);
  va_start(vl, s); // Must re-init.
  vsnprintf(buffer, needed, s, vl);
  return buffer;
}

static inline void check_err(int errval, int sets_errno, const char *fun, int line,
                            const char *msg, ...) {
  if (errval) {
    char errnum[10];

    va_list vl;
    va_start(vl, msg);

    fprintf(stderr, "ERROR: ");
    vfprintf(stderr, msg, vl);
    fprintf(stderr, " in %s() at line %d with error code %s\n",
            fun, line,
            sets_errno ? strerror(errno) : errnum);
    exit(errval);
  }
}

#define CHECK_ERR(err, ...) check_err(err, 0, __func__, __LINE__, __VA_ARGS__)
#define CHECK_ERRNO(err, ...) check_err(err, 1, __func__, __LINE__, __VA_ARGS__)

// Read the rest of an open file into a NUL-terminated string; returns
// NULL on error.
static void* fslurp_file(FILE *f, size_t *size) {
  long start = ftell(f);
  fseek(f, 0, SEEK_END);
  long src_size = ftell(f)-start;
  fseek(f, start, SEEK_SET);
  unsigned char *s = (unsigned char*) malloc((size_t)src_size + 1);
  if (fread(s, 1, (size_t)src_size, f) != (size_t)src_size) {
    free(s);
    s = NULL;
  } else {
    s[src_size] = '\0';
  }

  if (size) {
    *size = (size_t)src_size;
  }

  return s;
}

// Read a file into a NUL-terminated string; returns NULL on error.
static void* slurp_file(const char *filename, size_t *size) {
  FILE *f = fopen(filename, "rb"); // To avoid Windows messing with linebreaks.
  if (f == NULL) return NULL;
  unsigned char *s = fslurp_file(f, size);
  fclose(f);
  return s;
}

// Dump 'n' bytes from 'buf' into the file at the designated location.
// Returns 0 on success.
static int dump_file(const char *file, const void *buf, size_t n) {
  FILE *f = fopen(file, "w");

  if (f == NULL) {
    return 1;
  }

  if (fwrite(buf, sizeof(char), n, f) != n) {
    return 1;
  }

  if (fclose(f) != 0) {
    return 1;
  }

  return 0;
}

struct str_builder {
  char *str;
  size_t capacity; // Size of buffer.
  size_t used; // Bytes used, *not* including final zero.
};

static void str_builder_init(struct str_builder *b) {
  b->capacity = 10;
  b->used = 0;
  b->str = malloc(b->capacity);
  b->str[0] = 0;
}

static void str_builder(struct str_builder *b, const char *s, ...) {
  va_list vl;
  va_start(vl, s);
  size_t needed = (size_t)vsnprintf(NULL, 0, s, vl);

  while (b->capacity < b->used + needed + 1) {
    b->capacity *= 2;
    b->str = realloc(b->str, b->capacity);
  }

  va_start(vl, s); // Must re-init.
  vsnprintf(b->str+b->used, b->capacity-b->used, s, vl);
  b->used += needed;
}

// End of util.h.
// Start of half.h.

// Conversion functions are from http://half.sourceforge.net/, but
// translated to C.
//
// Copyright (c) 2012-2021 Christian Rau
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#ifndef __OPENCL_VERSION__
#define __constant
#endif

__constant static const uint16_t base_table[512] = {
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100,
  0x0200, 0x0400, 0x0800, 0x0C00, 0x1000, 0x1400, 0x1800, 0x1C00, 0x2000, 0x2400, 0x2800, 0x2C00, 0x3000, 0x3400, 0x3800, 0x3C00,
  0x4000, 0x4400, 0x4800, 0x4C00, 0x5000, 0x5400, 0x5800, 0x5C00, 0x6000, 0x6400, 0x6800, 0x6C00, 0x7000, 0x7400, 0x7800, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8002, 0x8004, 0x8008, 0x8010, 0x8020, 0x8040, 0x8080, 0x8100,
  0x8200, 0x8400, 0x8800, 0x8C00, 0x9000, 0x9400, 0x9800, 0x9C00, 0xA000, 0xA400, 0xA800, 0xAC00, 0xB000, 0xB400, 0xB800, 0xBC00,
  0xC000, 0xC400, 0xC800, 0xCC00, 0xD000, 0xD400, 0xD800, 0xDC00, 0xE000, 0xE400, 0xE800, 0xEC00, 0xF000, 0xF400, 0xF800, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00 };

__constant static const unsigned char shift_table[512] = {
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13 };

__constant static const uint32_t mantissa_table[2048] = {
  0x00000000, 0x33800000, 0x34000000, 0x34400000, 0x34800000, 0x34A00000, 0x34C00000, 0x34E00000, 0x35000000, 0x35100000, 0x35200000, 0x35300000, 0x35400000, 0x35500000, 0x35600000, 0x35700000,
  0x35800000, 0x35880000, 0x35900000, 0x35980000, 0x35A00000, 0x35A80000, 0x35B00000, 0x35B80000, 0x35C00000, 0x35C80000, 0x35D00000, 0x35D80000, 0x35E00000, 0x35E80000, 0x35F00000, 0x35F80000,
  0x36000000, 0x36040000, 0x36080000, 0x360C0000, 0x36100000, 0x36140000, 0x36180000, 0x361C0000, 0x36200000, 0x36240000, 0x36280000, 0x362C0000, 0x36300000, 0x36340000, 0x36380000, 0x363C0000,
  0x36400000, 0x36440000, 0x36480000, 0x364C0000, 0x36500000, 0x36540000, 0x36580000, 0x365C0000, 0x36600000, 0x36640000, 0x36680000, 0x366C0000, 0x36700000, 0x36740000, 0x36780000, 0x367C0000,
  0x36800000, 0x36820000, 0x36840000, 0x36860000, 0x36880000, 0x368A0000, 0x368C0000, 0x368E0000, 0x36900000, 0x36920000, 0x36940000, 0x36960000, 0x36980000, 0x369A0000, 0x369C0000, 0x369E0000,
  0x36A00000, 0x36A20000, 0x36A40000, 0x36A60000, 0x36A80000, 0x36AA0000, 0x36AC0000, 0x36AE0000, 0x36B00000, 0x36B20000, 0x36B40000, 0x36B60000, 0x36B80000, 0x36BA0000, 0x36BC0000, 0x36BE0000,
  0x36C00000, 0x36C20000, 0x36C40000, 0x36C60000, 0x36C80000, 0x36CA0000, 0x36CC0000, 0x36CE0000, 0x36D00000, 0x36D20000, 0x36D40000, 0x36D60000, 0x36D80000, 0x36DA0000, 0x36DC0000, 0x36DE0000,
  0x36E00000, 0x36E20000, 0x36E40000, 0x36E60000, 0x36E80000, 0x36EA0000, 0x36EC0000, 0x36EE0000, 0x36F00000, 0x36F20000, 0x36F40000, 0x36F60000, 0x36F80000, 0x36FA0000, 0x36FC0000, 0x36FE0000,
  0x37000000, 0x37010000, 0x37020000, 0x37030000, 0x37040000, 0x37050000, 0x37060000, 0x37070000, 0x37080000, 0x37090000, 0x370A0000, 0x370B0000, 0x370C0000, 0x370D0000, 0x370E0000, 0x370F0000,
  0x37100000, 0x37110000, 0x37120000, 0x37130000, 0x37140000, 0x37150000, 0x37160000, 0x37170000, 0x37180000, 0x37190000, 0x371A0000, 0x371B0000, 0x371C0000, 0x371D0000, 0x371E0000, 0x371F0000,
  0x37200000, 0x37210000, 0x37220000, 0x37230000, 0x37240000, 0x37250000, 0x37260000, 0x37270000, 0x37280000, 0x37290000, 0x372A0000, 0x372B0000, 0x372C0000, 0x372D0000, 0x372E0000, 0x372F0000,
  0x37300000, 0x37310000, 0x37320000, 0x37330000, 0x37340000, 0x37350000, 0x37360000, 0x37370000, 0x37380000, 0x37390000, 0x373A0000, 0x373B0000, 0x373C0000, 0x373D0000, 0x373E0000, 0x373F0000,
  0x37400000, 0x37410000, 0x37420000, 0x37430000, 0x37440000, 0x37450000, 0x37460000, 0x37470000, 0x37480000, 0x37490000, 0x374A0000, 0x374B0000, 0x374C0000, 0x374D0000, 0x374E0000, 0x374F0000,
  0x37500000, 0x37510000, 0x37520000, 0x37530000, 0x37540000, 0x37550000, 0x37560000, 0x37570000, 0x37580000, 0x37590000, 0x375A0000, 0x375B0000, 0x375C0000, 0x375D0000, 0x375E0000, 0x375F0000,
  0x37600000, 0x37610000, 0x37620000, 0x37630000, 0x37640000, 0x37650000, 0x37660000, 0x37670000, 0x37680000, 0x37690000, 0x376A0000, 0x376B0000, 0x376C0000, 0x376D0000, 0x376E0000, 0x376F0000,
  0x37700000, 0x37710000, 0x37720000, 0x37730000, 0x37740000, 0x37750000, 0x37760000, 0x37770000, 0x37780000, 0x37790000, 0x377A0000, 0x377B0000, 0x377C0000, 0x377D0000, 0x377E0000, 0x377F0000,
  0x37800000, 0x37808000, 0x37810000, 0x37818000, 0x37820000, 0x37828000, 0x37830000, 0x37838000, 0x37840000, 0x37848000, 0x37850000, 0x37858000, 0x37860000, 0x37868000, 0x37870000, 0x37878000,
  0x37880000, 0x37888000, 0x37890000, 0x37898000, 0x378A0000, 0x378A8000, 0x378B0000, 0x378B8000, 0x378C0000, 0x378C8000, 0x378D0000, 0x378D8000, 0x378E0000, 0x378E8000, 0x378F0000, 0x378F8000,
  0x37900000, 0x37908000, 0x37910000, 0x37918000, 0x37920000, 0x37928000, 0x37930000, 0x37938000, 0x37940000, 0x37948000, 0x37950000, 0x37958000, 0x37960000, 0x37968000, 0x37970000, 0x37978000,
  0x37980000, 0x37988000, 0x37990000, 0x37998000, 0x379A0000, 0x379A8000, 0x379B0000, 0x379B8000, 0x379C0000, 0x379C8000, 0x379D0000, 0x379D8000, 0x379E0000, 0x379E8000, 0x379F0000, 0x379F8000,
  0x37A00000, 0x37A08000, 0x37A10000, 0x37A18000, 0x37A20000, 0x37A28000, 0x37A30000, 0x37A38000, 0x37A40000, 0x37A48000, 0x37A50000, 0x37A58000, 0x37A60000, 0x37A68000, 0x37A70000, 0x37A78000,
  0x37A80000, 0x37A88000, 0x37A90000, 0x37A98000, 0x37AA0000, 0x37AA8000, 0x37AB0000, 0x37AB8000, 0x37AC0000, 0x37AC8000, 0x37AD0000, 0x37AD8000, 0x37AE0000, 0x37AE8000, 0x37AF0000, 0x37AF8000,
  0x37B00000, 0x37B08000, 0x37B10000, 0x37B18000, 0x37B20000, 0x37B28000, 0x37B30000, 0x37B38000, 0x37B40000, 0x37B48000, 0x37B50000, 0x37B58000, 0x37B60000, 0x37B68000, 0x37B70000, 0x37B78000,
  0x37B80000, 0x37B88000, 0x37B90000, 0x37B98000, 0x37BA0000, 0x37BA8000, 0x37BB0000, 0x37BB8000, 0x37BC0000, 0x37BC8000, 0x37BD0000, 0x37BD8000, 0x37BE0000, 0x37BE8000, 0x37BF0000, 0x37BF8000,
  0x37C00000, 0x37C08000, 0x37C10000, 0x37C18000, 0x37C20000, 0x37C28000, 0x37C30000, 0x37C38000, 0x37C40000, 0x37C48000, 0x37C50000, 0x37C58000, 0x37C60000, 0x37C68000, 0x37C70000, 0x37C78000,
  0x37C80000, 0x37C88000, 0x37C90000, 0x37C98000, 0x37CA0000, 0x37CA8000, 0x37CB0000, 0x37CB8000, 0x37CC0000, 0x37CC8000, 0x37CD0000, 0x37CD8000, 0x37CE0000, 0x37CE8000, 0x37CF0000, 0x37CF8000,
  0x37D00000, 0x37D08000, 0x37D10000, 0x37D18000, 0x37D20000, 0x37D28000, 0x37D30000, 0x37D38000, 0x37D40000, 0x37D48000, 0x37D50000, 0x37D58000, 0x37D60000, 0x37D68000, 0x37D70000, 0x37D78000,
  0x37D80000, 0x37D88000, 0x37D90000, 0x37D98000, 0x37DA0000, 0x37DA8000, 0x37DB0000, 0x37DB8000, 0x37DC0000, 0x37DC8000, 0x37DD0000, 0x37DD8000, 0x37DE0000, 0x37DE8000, 0x37DF0000, 0x37DF8000,
  0x37E00000, 0x37E08000, 0x37E10000, 0x37E18000, 0x37E20000, 0x37E28000, 0x37E30000, 0x37E38000, 0x37E40000, 0x37E48000, 0x37E50000, 0x37E58000, 0x37E60000, 0x37E68000, 0x37E70000, 0x37E78000,
  0x37E80000, 0x37E88000, 0x37E90000, 0x37E98000, 0x37EA0000, 0x37EA8000, 0x37EB0000, 0x37EB8000, 0x37EC0000, 0x37EC8000, 0x37ED0000, 0x37ED8000, 0x37EE0000, 0x37EE8000, 0x37EF0000, 0x37EF8000,
  0x37F00000, 0x37F08000, 0x37F10000, 0x37F18000, 0x37F20000, 0x37F28000, 0x37F30000, 0x37F38000, 0x37F40000, 0x37F48000, 0x37F50000, 0x37F58000, 0x37F60000, 0x37F68000, 0x37F70000, 0x37F78000,
  0x37F80000, 0x37F88000, 0x37F90000, 0x37F98000, 0x37FA0000, 0x37FA8000, 0x37FB0000, 0x37FB8000, 0x37FC0000, 0x37FC8000, 0x37FD0000, 0x37FD8000, 0x37FE0000, 0x37FE8000, 0x37FF0000, 0x37FF8000,
  0x38000000, 0x38004000, 0x38008000, 0x3800C000, 0x38010000, 0x38014000, 0x38018000, 0x3801C000, 0x38020000, 0x38024000, 0x38028000, 0x3802C000, 0x38030000, 0x38034000, 0x38038000, 0x3803C000,
  0x38040000, 0x38044000, 0x38048000, 0x3804C000, 0x38050000, 0x38054000, 0x38058000, 0x3805C000, 0x38060000, 0x38064000, 0x38068000, 0x3806C000, 0x38070000, 0x38074000, 0x38078000, 0x3807C000,
  0x38080000, 0x38084000, 0x38088000, 0x3808C000, 0x38090000, 0x38094000, 0x38098000, 0x3809C000, 0x380A0000, 0x380A4000, 0x380A8000, 0x380AC000, 0x380B0000, 0x380B4000, 0x380B8000, 0x380BC000,
  0x380C0000, 0x380C4000, 0x380C8000, 0x380CC000, 0x380D0000, 0x380D4000, 0x380D8000, 0x380DC000, 0x380E0000, 0x380E4000, 0x380E8000, 0x380EC000, 0x380F0000, 0x380F4000, 0x380F8000, 0x380FC000,
  0x38100000, 0x38104000, 0x38108000, 0x3810C000, 0x38110000, 0x38114000, 0x38118000, 0x3811C000, 0x38120000, 0x38124000, 0x38128000, 0x3812C000, 0x38130000, 0x38134000, 0x38138000, 0x3813C000,
  0x38140000, 0x38144000, 0x38148000, 0x3814C000, 0x38150000, 0x38154000, 0x38158000, 0x3815C000, 0x38160000, 0x38164000, 0x38168000, 0x3816C000, 0x38170000, 0x38174000, 0x38178000, 0x3817C000,
  0x38180000, 0x38184000, 0x38188000, 0x3818C000, 0x38190000, 0x38194000, 0x38198000, 0x3819C000, 0x381A0000, 0x381A4000, 0x381A8000, 0x381AC000, 0x381B0000, 0x381B4000, 0x381B8000, 0x381BC000,
  0x381C0000, 0x381C4000, 0x381C8000, 0x381CC000, 0x381D0000, 0x381D4000, 0x381D8000, 0x381DC000, 0x381E0000, 0x381E4000, 0x381E8000, 0x381EC000, 0x381F0000, 0x381F4000, 0x381F8000, 0x381FC000,
  0x38200000, 0x38204000, 0x38208000, 0x3820C000, 0x38210000, 0x38214000, 0x38218000, 0x3821C000, 0x38220000, 0x38224000, 0x38228000, 0x3822C000, 0x38230000, 0x38234000, 0x38238000, 0x3823C000,
  0x38240000, 0x38244000, 0x38248000, 0x3824C000, 0x38250000, 0x38254000, 0x38258000, 0x3825C000, 0x38260000, 0x38264000, 0x38268000, 0x3826C000, 0x38270000, 0x38274000, 0x38278000, 0x3827C000,
  0x38280000, 0x38284000, 0x38288000, 0x3828C000, 0x38290000, 0x38294000, 0x38298000, 0x3829C000, 0x382A0000, 0x382A4000, 0x382A8000, 0x382AC000, 0x382B0000, 0x382B4000, 0x382B8000, 0x382BC000,
  0x382C0000, 0x382C4000, 0x382C8000, 0x382CC000, 0x382D0000, 0x382D4000, 0x382D8000, 0x382DC000, 0x382E0000, 0x382E4000, 0x382E8000, 0x382EC000, 0x382F0000, 0x382F4000, 0x382F8000, 0x382FC000,
  0x38300000, 0x38304000, 0x38308000, 0x3830C000, 0x38310000, 0x38314000, 0x38318000, 0x3831C000, 0x38320000, 0x38324000, 0x38328000, 0x3832C000, 0x38330000, 0x38334000, 0x38338000, 0x3833C000,
  0x38340000, 0x38344000, 0x38348000, 0x3834C000, 0x38350000, 0x38354000, 0x38358000, 0x3835C000, 0x38360000, 0x38364000, 0x38368000, 0x3836C000, 0x38370000, 0x38374000, 0x38378000, 0x3837C000,
  0x38380000, 0x38384000, 0x38388000, 0x3838C000, 0x38390000, 0x38394000, 0x38398000, 0x3839C000, 0x383A0000, 0x383A4000, 0x383A8000, 0x383AC000, 0x383B0000, 0x383B4000, 0x383B8000, 0x383BC000,
  0x383C0000, 0x383C4000, 0x383C8000, 0x383CC000, 0x383D0000, 0x383D4000, 0x383D8000, 0x383DC000, 0x383E0000, 0x383E4000, 0x383E8000, 0x383EC000, 0x383F0000, 0x383F4000, 0x383F8000, 0x383FC000,
  0x38400000, 0x38404000, 0x38408000, 0x3840C000, 0x38410000, 0x38414000, 0x38418000, 0x3841C000, 0x38420000, 0x38424000, 0x38428000, 0x3842C000, 0x38430000, 0x38434000, 0x38438000, 0x3843C000,
  0x38440000, 0x38444000, 0x38448000, 0x3844C000, 0x38450000, 0x38454000, 0x38458000, 0x3845C000, 0x38460000, 0x38464000, 0x38468000, 0x3846C000, 0x38470000, 0x38474000, 0x38478000, 0x3847C000,
  0x38480000, 0x38484000, 0x38488000, 0x3848C000, 0x38490000, 0x38494000, 0x38498000, 0x3849C000, 0x384A0000, 0x384A4000, 0x384A8000, 0x384AC000, 0x384B0000, 0x384B4000, 0x384B8000, 0x384BC000,
  0x384C0000, 0x384C4000, 0x384C8000, 0x384CC000, 0x384D0000, 0x384D4000, 0x384D8000, 0x384DC000, 0x384E0000, 0x384E4000, 0x384E8000, 0x384EC000, 0x384F0000, 0x384F4000, 0x384F8000, 0x384FC000,
  0x38500000, 0x38504000, 0x38508000, 0x3850C000, 0x38510000, 0x38514000, 0x38518000, 0x3851C000, 0x38520000, 0x38524000, 0x38528000, 0x3852C000, 0x38530000, 0x38534000, 0x38538000, 0x3853C000,
  0x38540000, 0x38544000, 0x38548000, 0x3854C000, 0x38550000, 0x38554000, 0x38558000, 0x3855C000, 0x38560000, 0x38564000, 0x38568000, 0x3856C000, 0x38570000, 0x38574000, 0x38578000, 0x3857C000,
  0x38580000, 0x38584000, 0x38588000, 0x3858C000, 0x38590000, 0x38594000, 0x38598000, 0x3859C000, 0x385A0000, 0x385A4000, 0x385A8000, 0x385AC000, 0x385B0000, 0x385B4000, 0x385B8000, 0x385BC000,
  0x385C0000, 0x385C4000, 0x385C8000, 0x385CC000, 0x385D0000, 0x385D4000, 0x385D8000, 0x385DC000, 0x385E0000, 0x385E4000, 0x385E8000, 0x385EC000, 0x385F0000, 0x385F4000, 0x385F8000, 0x385FC000,
  0x38600000, 0x38604000, 0x38608000, 0x3860C000, 0x38610000, 0x38614000, 0x38618000, 0x3861C000, 0x38620000, 0x38624000, 0x38628000, 0x3862C000, 0x38630000, 0x38634000, 0x38638000, 0x3863C000,
  0x38640000, 0x38644000, 0x38648000, 0x3864C000, 0x38650000, 0x38654000, 0x38658000, 0x3865C000, 0x38660000, 0x38664000, 0x38668000, 0x3866C000, 0x38670000, 0x38674000, 0x38678000, 0x3867C000,
  0x38680000, 0x38684000, 0x38688000, 0x3868C000, 0x38690000, 0x38694000, 0x38698000, 0x3869C000, 0x386A0000, 0x386A4000, 0x386A8000, 0x386AC000, 0x386B0000, 0x386B4000, 0x386B8000, 0x386BC000,
  0x386C0000, 0x386C4000, 0x386C8000, 0x386CC000, 0x386D0000, 0x386D4000, 0x386D8000, 0x386DC000, 0x386E0000, 0x386E4000, 0x386E8000, 0x386EC000, 0x386F0000, 0x386F4000, 0x386F8000, 0x386FC000,
  0x38700000, 0x38704000, 0x38708000, 0x3870C000, 0x38710000, 0x38714000, 0x38718000, 0x3871C000, 0x38720000, 0x38724000, 0x38728000, 0x3872C000, 0x38730000, 0x38734000, 0x38738000, 0x3873C000,
  0x38740000, 0x38744000, 0x38748000, 0x3874C000, 0x38750000, 0x38754000, 0x38758000, 0x3875C000, 0x38760000, 0x38764000, 0x38768000, 0x3876C000, 0x38770000, 0x38774000, 0x38778000, 0x3877C000,
  0x38780000, 0x38784000, 0x38788000, 0x3878C000, 0x38790000, 0x38794000, 0x38798000, 0x3879C000, 0x387A0000, 0x387A4000, 0x387A8000, 0x387AC000, 0x387B0000, 0x387B4000, 0x387B8000, 0x387BC000,
  0x387C0000, 0x387C4000, 0x387C8000, 0x387CC000, 0x387D0000, 0x387D4000, 0x387D8000, 0x387DC000, 0x387E0000, 0x387E4000, 0x387E8000, 0x387EC000, 0x387F0000, 0x387F4000, 0x387F8000, 0x387FC000,
  0x38000000, 0x38002000, 0x38004000, 0x38006000, 0x38008000, 0x3800A000, 0x3800C000, 0x3800E000, 0x38010000, 0x38012000, 0x38014000, 0x38016000, 0x38018000, 0x3801A000, 0x3801C000, 0x3801E000,
  0x38020000, 0x38022000, 0x38024000, 0x38026000, 0x38028000, 0x3802A000, 0x3802C000, 0x3802E000, 0x38030000, 0x38032000, 0x38034000, 0x38036000, 0x38038000, 0x3803A000, 0x3803C000, 0x3803E000,
  0x38040000, 0x38042000, 0x38044000, 0x38046000, 0x38048000, 0x3804A000, 0x3804C000, 0x3804E000, 0x38050000, 0x38052000, 0x38054000, 0x38056000, 0x38058000, 0x3805A000, 0x3805C000, 0x3805E000,
  0x38060000, 0x38062000, 0x38064000, 0x38066000, 0x38068000, 0x3806A000, 0x3806C000, 0x3806E000, 0x38070000, 0x38072000, 0x38074000, 0x38076000, 0x38078000, 0x3807A000, 0x3807C000, 0x3807E000,
  0x38080000, 0x38082000, 0x38084000, 0x38086000, 0x38088000, 0x3808A000, 0x3808C000, 0x3808E000, 0x38090000, 0x38092000, 0x38094000, 0x38096000, 0x38098000, 0x3809A000, 0x3809C000, 0x3809E000,
  0x380A0000, 0x380A2000, 0x380A4000, 0x380A6000, 0x380A8000, 0x380AA000, 0x380AC000, 0x380AE000, 0x380B0000, 0x380B2000, 0x380B4000, 0x380B6000, 0x380B8000, 0x380BA000, 0x380BC000, 0x380BE000,
  0x380C0000, 0x380C2000, 0x380C4000, 0x380C6000, 0x380C8000, 0x380CA000, 0x380CC000, 0x380CE000, 0x380D0000, 0x380D2000, 0x380D4000, 0x380D6000, 0x380D8000, 0x380DA000, 0x380DC000, 0x380DE000,
  0x380E0000, 0x380E2000, 0x380E4000, 0x380E6000, 0x380E8000, 0x380EA000, 0x380EC000, 0x380EE000, 0x380F0000, 0x380F2000, 0x380F4000, 0x380F6000, 0x380F8000, 0x380FA000, 0x380FC000, 0x380FE000,
  0x38100000, 0x38102000, 0x38104000, 0x38106000, 0x38108000, 0x3810A000, 0x3810C000, 0x3810E000, 0x38110000, 0x38112000, 0x38114000, 0x38116000, 0x38118000, 0x3811A000, 0x3811C000, 0x3811E000,
  0x38120000, 0x38122000, 0x38124000, 0x38126000, 0x38128000, 0x3812A000, 0x3812C000, 0x3812E000, 0x38130000, 0x38132000, 0x38134000, 0x38136000, 0x38138000, 0x3813A000, 0x3813C000, 0x3813E000,
  0x38140000, 0x38142000, 0x38144000, 0x38146000, 0x38148000, 0x3814A000, 0x3814C000, 0x3814E000, 0x38150000, 0x38152000, 0x38154000, 0x38156000, 0x38158000, 0x3815A000, 0x3815C000, 0x3815E000,
  0x38160000, 0x38162000, 0x38164000, 0x38166000, 0x38168000, 0x3816A000, 0x3816C000, 0x3816E000, 0x38170000, 0x38172000, 0x38174000, 0x38176000, 0x38178000, 0x3817A000, 0x3817C000, 0x3817E000,
  0x38180000, 0x38182000, 0x38184000, 0x38186000, 0x38188000, 0x3818A000, 0x3818C000, 0x3818E000, 0x38190000, 0x38192000, 0x38194000, 0x38196000, 0x38198000, 0x3819A000, 0x3819C000, 0x3819E000,
  0x381A0000, 0x381A2000, 0x381A4000, 0x381A6000, 0x381A8000, 0x381AA000, 0x381AC000, 0x381AE000, 0x381B0000, 0x381B2000, 0x381B4000, 0x381B6000, 0x381B8000, 0x381BA000, 0x381BC000, 0x381BE000,
  0x381C0000, 0x381C2000, 0x381C4000, 0x381C6000, 0x381C8000, 0x381CA000, 0x381CC000, 0x381CE000, 0x381D0000, 0x381D2000, 0x381D4000, 0x381D6000, 0x381D8000, 0x381DA000, 0x381DC000, 0x381DE000,
  0x381E0000, 0x381E2000, 0x381E4000, 0x381E6000, 0x381E8000, 0x381EA000, 0x381EC000, 0x381EE000, 0x381F0000, 0x381F2000, 0x381F4000, 0x381F6000, 0x381F8000, 0x381FA000, 0x381FC000, 0x381FE000,
  0x38200000, 0x38202000, 0x38204000, 0x38206000, 0x38208000, 0x3820A000, 0x3820C000, 0x3820E000, 0x38210000, 0x38212000, 0x38214000, 0x38216000, 0x38218000, 0x3821A000, 0x3821C000, 0x3821E000,
  0x38220000, 0x38222000, 0x38224000, 0x38226000, 0x38228000, 0x3822A000, 0x3822C000, 0x3822E000, 0x38230000, 0x38232000, 0x38234000, 0x38236000, 0x38238000, 0x3823A000, 0x3823C000, 0x3823E000,
  0x38240000, 0x38242000, 0x38244000, 0x38246000, 0x38248000, 0x3824A000, 0x3824C000, 0x3824E000, 0x38250000, 0x38252000, 0x38254000, 0x38256000, 0x38258000, 0x3825A000, 0x3825C000, 0x3825E000,
  0x38260000, 0x38262000, 0x38264000, 0x38266000, 0x38268000, 0x3826A000, 0x3826C000, 0x3826E000, 0x38270000, 0x38272000, 0x38274000, 0x38276000, 0x38278000, 0x3827A000, 0x3827C000, 0x3827E000,
  0x38280000, 0x38282000, 0x38284000, 0x38286000, 0x38288000, 0x3828A000, 0x3828C000, 0x3828E000, 0x38290000, 0x38292000, 0x38294000, 0x38296000, 0x38298000, 0x3829A000, 0x3829C000, 0x3829E000,
  0x382A0000, 0x382A2000, 0x382A4000, 0x382A6000, 0x382A8000, 0x382AA000, 0x382AC000, 0x382AE000, 0x382B0000, 0x382B2000, 0x382B4000, 0x382B6000, 0x382B8000, 0x382BA000, 0x382BC000, 0x382BE000,
  0x382C0000, 0x382C2000, 0x382C4000, 0x382C6000, 0x382C8000, 0x382CA000, 0x382CC000, 0x382CE000, 0x382D0000, 0x382D2000, 0x382D4000, 0x382D6000, 0x382D8000, 0x382DA000, 0x382DC000, 0x382DE000,
  0x382E0000, 0x382E2000, 0x382E4000, 0x382E6000, 0x382E8000, 0x382EA000, 0x382EC000, 0x382EE000, 0x382F0000, 0x382F2000, 0x382F4000, 0x382F6000, 0x382F8000, 0x382FA000, 0x382FC000, 0x382FE000,
  0x38300000, 0x38302000, 0x38304000, 0x38306000, 0x38308000, 0x3830A000, 0x3830C000, 0x3830E000, 0x38310000, 0x38312000, 0x38314000, 0x38316000, 0x38318000, 0x3831A000, 0x3831C000, 0x3831E000,
  0x38320000, 0x38322000, 0x38324000, 0x38326000, 0x38328000, 0x3832A000, 0x3832C000, 0x3832E000, 0x38330000, 0x38332000, 0x38334000, 0x38336000, 0x38338000, 0x3833A000, 0x3833C000, 0x3833E000,
  0x38340000, 0x38342000, 0x38344000, 0x38346000, 0x38348000, 0x3834A000, 0x3834C000, 0x3834E000, 0x38350000, 0x38352000, 0x38354000, 0x38356000, 0x38358000, 0x3835A000, 0x3835C000, 0x3835E000,
  0x38360000, 0x38362000, 0x38364000, 0x38366000, 0x38368000, 0x3836A000, 0x3836C000, 0x3836E000, 0x38370000, 0x38372000, 0x38374000, 0x38376000, 0x38378000, 0x3837A000, 0x3837C000, 0x3837E000,
  0x38380000, 0x38382000, 0x38384000, 0x38386000, 0x38388000, 0x3838A000, 0x3838C000, 0x3838E000, 0x38390000, 0x38392000, 0x38394000, 0x38396000, 0x38398000, 0x3839A000, 0x3839C000, 0x3839E000,
  0x383A0000, 0x383A2000, 0x383A4000, 0x383A6000, 0x383A8000, 0x383AA000, 0x383AC000, 0x383AE000, 0x383B0000, 0x383B2000, 0x383B4000, 0x383B6000, 0x383B8000, 0x383BA000, 0x383BC000, 0x383BE000,
  0x383C0000, 0x383C2000, 0x383C4000, 0x383C6000, 0x383C8000, 0x383CA000, 0x383CC000, 0x383CE000, 0x383D0000, 0x383D2000, 0x383D4000, 0x383D6000, 0x383D8000, 0x383DA000, 0x383DC000, 0x383DE000,
  0x383E0000, 0x383E2000, 0x383E4000, 0x383E6000, 0x383E8000, 0x383EA000, 0x383EC000, 0x383EE000, 0x383F0000, 0x383F2000, 0x383F4000, 0x383F6000, 0x383F8000, 0x383FA000, 0x383FC000, 0x383FE000,
  0x38400000, 0x38402000, 0x38404000, 0x38406000, 0x38408000, 0x3840A000, 0x3840C000, 0x3840E000, 0x38410000, 0x38412000, 0x38414000, 0x38416000, 0x38418000, 0x3841A000, 0x3841C000, 0x3841E000,
  0x38420000, 0x38422000, 0x38424000, 0x38426000, 0x38428000, 0x3842A000, 0x3842C000, 0x3842E000, 0x38430000, 0x38432000, 0x38434000, 0x38436000, 0x38438000, 0x3843A000, 0x3843C000, 0x3843E000,
  0x38440000, 0x38442000, 0x38444000, 0x38446000, 0x38448000, 0x3844A000, 0x3844C000, 0x3844E000, 0x38450000, 0x38452000, 0x38454000, 0x38456000, 0x38458000, 0x3845A000, 0x3845C000, 0x3845E000,
  0x38460000, 0x38462000, 0x38464000, 0x38466000, 0x38468000, 0x3846A000, 0x3846C000, 0x3846E000, 0x38470000, 0x38472000, 0x38474000, 0x38476000, 0x38478000, 0x3847A000, 0x3847C000, 0x3847E000,
  0x38480000, 0x38482000, 0x38484000, 0x38486000, 0x38488000, 0x3848A000, 0x3848C000, 0x3848E000, 0x38490000, 0x38492000, 0x38494000, 0x38496000, 0x38498000, 0x3849A000, 0x3849C000, 0x3849E000,
  0x384A0000, 0x384A2000, 0x384A4000, 0x384A6000, 0x384A8000, 0x384AA000, 0x384AC000, 0x384AE000, 0x384B0000, 0x384B2000, 0x384B4000, 0x384B6000, 0x384B8000, 0x384BA000, 0x384BC000, 0x384BE000,
  0x384C0000, 0x384C2000, 0x384C4000, 0x384C6000, 0x384C8000, 0x384CA000, 0x384CC000, 0x384CE000, 0x384D0000, 0x384D2000, 0x384D4000, 0x384D6000, 0x384D8000, 0x384DA000, 0x384DC000, 0x384DE000,
  0x384E0000, 0x384E2000, 0x384E4000, 0x384E6000, 0x384E8000, 0x384EA000, 0x384EC000, 0x384EE000, 0x384F0000, 0x384F2000, 0x384F4000, 0x384F6000, 0x384F8000, 0x384FA000, 0x384FC000, 0x384FE000,
  0x38500000, 0x38502000, 0x38504000, 0x38506000, 0x38508000, 0x3850A000, 0x3850C000, 0x3850E000, 0x38510000, 0x38512000, 0x38514000, 0x38516000, 0x38518000, 0x3851A000, 0x3851C000, 0x3851E000,
  0x38520000, 0x38522000, 0x38524000, 0x38526000, 0x38528000, 0x3852A000, 0x3852C000, 0x3852E000, 0x38530000, 0x38532000, 0x38534000, 0x38536000, 0x38538000, 0x3853A000, 0x3853C000, 0x3853E000,
  0x38540000, 0x38542000, 0x38544000, 0x38546000, 0x38548000, 0x3854A000, 0x3854C000, 0x3854E000, 0x38550000, 0x38552000, 0x38554000, 0x38556000, 0x38558000, 0x3855A000, 0x3855C000, 0x3855E000,
  0x38560000, 0x38562000, 0x38564000, 0x38566000, 0x38568000, 0x3856A000, 0x3856C000, 0x3856E000, 0x38570000, 0x38572000, 0x38574000, 0x38576000, 0x38578000, 0x3857A000, 0x3857C000, 0x3857E000,
  0x38580000, 0x38582000, 0x38584000, 0x38586000, 0x38588000, 0x3858A000, 0x3858C000, 0x3858E000, 0x38590000, 0x38592000, 0x38594000, 0x38596000, 0x38598000, 0x3859A000, 0x3859C000, 0x3859E000,
  0x385A0000, 0x385A2000, 0x385A4000, 0x385A6000, 0x385A8000, 0x385AA000, 0x385AC000, 0x385AE000, 0x385B0000, 0x385B2000, 0x385B4000, 0x385B6000, 0x385B8000, 0x385BA000, 0x385BC000, 0x385BE000,
  0x385C0000, 0x385C2000, 0x385C4000, 0x385C6000, 0x385C8000, 0x385CA000, 0x385CC000, 0x385CE000, 0x385D0000, 0x385D2000, 0x385D4000, 0x385D6000, 0x385D8000, 0x385DA000, 0x385DC000, 0x385DE000,
  0x385E0000, 0x385E2000, 0x385E4000, 0x385E6000, 0x385E8000, 0x385EA000, 0x385EC000, 0x385EE000, 0x385F0000, 0x385F2000, 0x385F4000, 0x385F6000, 0x385F8000, 0x385FA000, 0x385FC000, 0x385FE000,
  0x38600000, 0x38602000, 0x38604000, 0x38606000, 0x38608000, 0x3860A000, 0x3860C000, 0x3860E000, 0x38610000, 0x38612000, 0x38614000, 0x38616000, 0x38618000, 0x3861A000, 0x3861C000, 0x3861E000,
  0x38620000, 0x38622000, 0x38624000, 0x38626000, 0x38628000, 0x3862A000, 0x3862C000, 0x3862E000, 0x38630000, 0x38632000, 0x38634000, 0x38636000, 0x38638000, 0x3863A000, 0x3863C000, 0x3863E000,
  0x38640000, 0x38642000, 0x38644000, 0x38646000, 0x38648000, 0x3864A000, 0x3864C000, 0x3864E000, 0x38650000, 0x38652000, 0x38654000, 0x38656000, 0x38658000, 0x3865A000, 0x3865C000, 0x3865E000,
  0x38660000, 0x38662000, 0x38664000, 0x38666000, 0x38668000, 0x3866A000, 0x3866C000, 0x3866E000, 0x38670000, 0x38672000, 0x38674000, 0x38676000, 0x38678000, 0x3867A000, 0x3867C000, 0x3867E000,
  0x38680000, 0x38682000, 0x38684000, 0x38686000, 0x38688000, 0x3868A000, 0x3868C000, 0x3868E000, 0x38690000, 0x38692000, 0x38694000, 0x38696000, 0x38698000, 0x3869A000, 0x3869C000, 0x3869E000,
  0x386A0000, 0x386A2000, 0x386A4000, 0x386A6000, 0x386A8000, 0x386AA000, 0x386AC000, 0x386AE000, 0x386B0000, 0x386B2000, 0x386B4000, 0x386B6000, 0x386B8000, 0x386BA000, 0x386BC000, 0x386BE000,
  0x386C0000, 0x386C2000, 0x386C4000, 0x386C6000, 0x386C8000, 0x386CA000, 0x386CC000, 0x386CE000, 0x386D0000, 0x386D2000, 0x386D4000, 0x386D6000, 0x386D8000, 0x386DA000, 0x386DC000, 0x386DE000,
  0x386E0000, 0x386E2000, 0x386E4000, 0x386E6000, 0x386E8000, 0x386EA000, 0x386EC000, 0x386EE000, 0x386F0000, 0x386F2000, 0x386F4000, 0x386F6000, 0x386F8000, 0x386FA000, 0x386FC000, 0x386FE000,
  0x38700000, 0x38702000, 0x38704000, 0x38706000, 0x38708000, 0x3870A000, 0x3870C000, 0x3870E000, 0x38710000, 0x38712000, 0x38714000, 0x38716000, 0x38718000, 0x3871A000, 0x3871C000, 0x3871E000,
  0x38720000, 0x38722000, 0x38724000, 0x38726000, 0x38728000, 0x3872A000, 0x3872C000, 0x3872E000, 0x38730000, 0x38732000, 0x38734000, 0x38736000, 0x38738000, 0x3873A000, 0x3873C000, 0x3873E000,
  0x38740000, 0x38742000, 0x38744000, 0x38746000, 0x38748000, 0x3874A000, 0x3874C000, 0x3874E000, 0x38750000, 0x38752000, 0x38754000, 0x38756000, 0x38758000, 0x3875A000, 0x3875C000, 0x3875E000,
  0x38760000, 0x38762000, 0x38764000, 0x38766000, 0x38768000, 0x3876A000, 0x3876C000, 0x3876E000, 0x38770000, 0x38772000, 0x38774000, 0x38776000, 0x38778000, 0x3877A000, 0x3877C000, 0x3877E000,
  0x38780000, 0x38782000, 0x38784000, 0x38786000, 0x38788000, 0x3878A000, 0x3878C000, 0x3878E000, 0x38790000, 0x38792000, 0x38794000, 0x38796000, 0x38798000, 0x3879A000, 0x3879C000, 0x3879E000,
  0x387A0000, 0x387A2000, 0x387A4000, 0x387A6000, 0x387A8000, 0x387AA000, 0x387AC000, 0x387AE000, 0x387B0000, 0x387B2000, 0x387B4000, 0x387B6000, 0x387B8000, 0x387BA000, 0x387BC000, 0x387BE000,
  0x387C0000, 0x387C2000, 0x387C4000, 0x387C6000, 0x387C8000, 0x387CA000, 0x387CC000, 0x387CE000, 0x387D0000, 0x387D2000, 0x387D4000, 0x387D6000, 0x387D8000, 0x387DA000, 0x387DC000, 0x387DE000,
  0x387E0000, 0x387E2000, 0x387E4000, 0x387E6000, 0x387E8000, 0x387EA000, 0x387EC000, 0x387EE000, 0x387F0000, 0x387F2000, 0x387F4000, 0x387F6000, 0x387F8000, 0x387FA000, 0x387FC000, 0x387FE000 };
__constant static const uint32_t exponent_table[64] = {
  0x00000000, 0x00800000, 0x01000000, 0x01800000, 0x02000000, 0x02800000, 0x03000000, 0x03800000, 0x04000000, 0x04800000, 0x05000000, 0x05800000, 0x06000000, 0x06800000, 0x07000000, 0x07800000,
  0x08000000, 0x08800000, 0x09000000, 0x09800000, 0x0A000000, 0x0A800000, 0x0B000000, 0x0B800000, 0x0C000000, 0x0C800000, 0x0D000000, 0x0D800000, 0x0E000000, 0x0E800000, 0x0F000000, 0x47800000,
  0x80000000, 0x80800000, 0x81000000, 0x81800000, 0x82000000, 0x82800000, 0x83000000, 0x83800000, 0x84000000, 0x84800000, 0x85000000, 0x85800000, 0x86000000, 0x86800000, 0x87000000, 0x87800000,
  0x88000000, 0x88800000, 0x89000000, 0x89800000, 0x8A000000, 0x8A800000, 0x8B000000, 0x8B800000, 0x8C000000, 0x8C800000, 0x8D000000, 0x8D800000, 0x8E000000, 0x8E800000, 0x8F000000, 0xC7800000 };
__constant static const unsigned short offset_table[64] = {
  0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
  0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024 };

static uint16_t float2halfbits(float value) {
  union { float x; uint32_t y; } u;
  u.x = value;
  uint32_t bits = u.y;

  uint16_t hbits = base_table[bits>>23] + (uint16_t)((bits&0x7FFFFF)>>shift_table[bits>>23]);;

  return hbits;
}

static float halfbits2float(uint16_t value) {
  uint32_t bits = mantissa_table[offset_table[value>>10]+(value&0x3FF)] + exponent_table[value>>10];

  union { uint32_t x; float y; } u;
  u.x = bits;
  return u.y;
}

// End of half.h.
// Start of timing.h.

// The function get_wall_time() returns the wall time in microseconds
// (with an unspecified offset).

#ifdef _WIN32

#include <windows.h>

static int64_t get_wall_time(void) {
  LARGE_INTEGER time,freq;
  assert(QueryPerformanceFrequency(&freq));
  assert(QueryPerformanceCounter(&time));
  return ((double)time.QuadPart / freq.QuadPart) * 1000000;
}

#else
// Assuming POSIX

#include <time.h>
#include <sys/time.h>

static int64_t get_wall_time(void) {
  struct timeval time;
  assert(gettimeofday(&time,NULL) == 0);
  return time.tv_sec * 1000000 + time.tv_usec;
}

static int64_t get_wall_time_ns(void) {
  struct timespec time;
  assert(clock_gettime(CLOCK_REALTIME, &time) == 0);
  return time.tv_sec * 1000000000 + time.tv_nsec;
}

#endif

// End of timing.h.

#ifdef _MSC_VER
#define inline __inline
#endif
#include <string.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>


#define CL_TARGET_OPENCL_VERSION 120
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#ifdef __APPLE__
#define CL_SILENCE_DEPRECATION
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif


// Start of lock.h.

// A very simple cross-platform implementation of locks.  Uses
// pthreads on Unix and some Windows thing there.  Futhark's
// host-level code is not multithreaded, but user code may be, so we
// need some mechanism for ensuring atomic access to API functions.
// This is that mechanism.  It is not exposed to user code at all, so
// we do not have to worry about name collisions.

#ifdef _WIN32

typedef HANDLE lock_t;

static void create_lock(lock_t *lock) {
  *lock = CreateMutex(NULL,  // Default security attributes.
                      FALSE, // Initially unlocked.
                      NULL); // Unnamed.
}

static void lock_lock(lock_t *lock) {
  assert(WaitForSingleObject(*lock, INFINITE) == WAIT_OBJECT_0);
}

static void lock_unlock(lock_t *lock) {
  assert(ReleaseMutex(*lock));
}

static void free_lock(lock_t *lock) {
  CloseHandle(*lock);
}

#else
// Assuming POSIX

#include <pthread.h>

typedef pthread_mutex_t lock_t;

static void create_lock(lock_t *lock) {
  int r = pthread_mutex_init(lock, NULL);
  assert(r == 0);
}

static void lock_lock(lock_t *lock) {
  int r = pthread_mutex_lock(lock);
  assert(r == 0);
}

static void lock_unlock(lock_t *lock) {
  int r = pthread_mutex_unlock(lock);
  assert(r == 0);
}

static void free_lock(lock_t *lock) {
  // Nothing to do for pthreads.
  (void)lock;
}

#endif

// End of lock.h.

#define FUTHARK_F64_ENABLED

// Start of scalar.h.

// Implementation of the primitive scalar operations.  Very
// repetitive.  This code is inserted directly into both CUDA and
// OpenCL programs, as well as the CPU code, so it has some #ifdefs to
// work everywhere.  Some operations are defined as macros because
// this allows us to use them as constant expressions in things like
// array sizes and static initialisers.

// Some of the #ifdefs are because OpenCL uses type-generic functions
// for some operations (e.g. sqrt), while C and CUDA sensibly use
// distinct functions for different precisions (e.g. sqrtf() and
// sqrt()).  This is quite annoying.  Due to C's unfortunate casting
// rules, it is also really easy to accidentally implement
// floating-point functions in the wrong precision, so be careful.

// Double-precision definitions are only included if the preprocessor
// macro FUTHARK_F64_ENABLED is set.

static inline uint8_t add8(uint8_t x, uint8_t y) {
  return x + y;
}

static inline uint16_t add16(uint16_t x, uint16_t y) {
  return x + y;
}

static inline uint32_t add32(uint32_t x, uint32_t y) {
  return x + y;
}

static inline uint64_t add64(uint64_t x, uint64_t y) {
  return x + y;
}

static inline uint8_t sub8(uint8_t x, uint8_t y) {
  return x - y;
}

static inline uint16_t sub16(uint16_t x, uint16_t y) {
  return x - y;
}

static inline uint32_t sub32(uint32_t x, uint32_t y) {
  return x - y;
}

static inline uint64_t sub64(uint64_t x, uint64_t y) {
  return x - y;
}

static inline uint8_t mul8(uint8_t x, uint8_t y) {
  return x * y;
}

static inline uint16_t mul16(uint16_t x, uint16_t y) {
  return x * y;
}

static inline uint32_t mul32(uint32_t x, uint32_t y) {
  return x * y;
}

static inline uint64_t mul64(uint64_t x, uint64_t y) {
  return x * y;
}

static inline uint8_t udiv8(uint8_t x, uint8_t y) {
  return x / y;
}

static inline uint16_t udiv16(uint16_t x, uint16_t y) {
  return x / y;
}

static inline uint32_t udiv32(uint32_t x, uint32_t y) {
  return x / y;
}

static inline uint64_t udiv64(uint64_t x, uint64_t y) {
  return x / y;
}

static inline uint8_t udiv_up8(uint8_t x, uint8_t y) {
  return (x + y - 1) / y;
}

static inline uint16_t udiv_up16(uint16_t x, uint16_t y) {
  return (x + y - 1) / y;
}

static inline uint32_t udiv_up32(uint32_t x, uint32_t y) {
  return (x + y - 1) / y;
}

static inline uint64_t udiv_up64(uint64_t x, uint64_t y) {
  return (x + y - 1) / y;
}

static inline uint8_t umod8(uint8_t x, uint8_t y) {
  return x % y;
}

static inline uint16_t umod16(uint16_t x, uint16_t y) {
  return x % y;
}

static inline uint32_t umod32(uint32_t x, uint32_t y) {
  return x % y;
}

static inline uint64_t umod64(uint64_t x, uint64_t y) {
  return x % y;
}

static inline uint8_t udiv_safe8(uint8_t x, uint8_t y) {
  return y == 0 ? 0 : x / y;
}

static inline uint16_t udiv_safe16(uint16_t x, uint16_t y) {
  return y == 0 ? 0 : x / y;
}

static inline uint32_t udiv_safe32(uint32_t x, uint32_t y) {
  return y == 0 ? 0 : x / y;
}

static inline uint64_t udiv_safe64(uint64_t x, uint64_t y) {
  return y == 0 ? 0 : x / y;
}

static inline uint8_t udiv_up_safe8(uint8_t x, uint8_t y) {
  return y == 0 ? 0 : (x + y - 1) / y;
}

static inline uint16_t udiv_up_safe16(uint16_t x, uint16_t y) {
  return y == 0 ? 0 : (x + y - 1) / y;
}

static inline uint32_t udiv_up_safe32(uint32_t x, uint32_t y) {
  return y == 0 ? 0 : (x + y - 1) / y;
}

static inline uint64_t udiv_up_safe64(uint64_t x, uint64_t y) {
  return y == 0 ? 0 : (x + y - 1) / y;
}

static inline uint8_t umod_safe8(uint8_t x, uint8_t y) {
  return y == 0 ? 0 : x % y;
}

static inline uint16_t umod_safe16(uint16_t x, uint16_t y) {
  return y == 0 ? 0 : x % y;
}

static inline uint32_t umod_safe32(uint32_t x, uint32_t y) {
  return y == 0 ? 0 : x % y;
}

static inline uint64_t umod_safe64(uint64_t x, uint64_t y) {
  return y == 0 ? 0 : x % y;
}

static inline int8_t sdiv8(int8_t x, int8_t y) {
  int8_t q = x / y;
  int8_t r = x % y;

  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);
}

static inline int16_t sdiv16(int16_t x, int16_t y) {
  int16_t q = x / y;
  int16_t r = x % y;

  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);
}

static inline int32_t sdiv32(int32_t x, int32_t y) {
  int32_t q = x / y;
  int32_t r = x % y;

  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);
}

static inline int64_t sdiv64(int64_t x, int64_t y) {
  int64_t q = x / y;
  int64_t r = x % y;

  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);
}

static inline int8_t sdiv_up8(int8_t x, int8_t y) {
  return sdiv8(x + y - 1, y);
}

static inline int16_t sdiv_up16(int16_t x, int16_t y) {
  return sdiv16(x + y - 1, y);
}

static inline int32_t sdiv_up32(int32_t x, int32_t y) {
  return sdiv32(x + y - 1, y);
}

static inline int64_t sdiv_up64(int64_t x, int64_t y) {
  return sdiv64(x + y - 1, y);
}

static inline int8_t smod8(int8_t x, int8_t y) {
  int8_t r = x % y;

  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);
}

static inline int16_t smod16(int16_t x, int16_t y) {
  int16_t r = x % y;

  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);
}

static inline int32_t smod32(int32_t x, int32_t y) {
  int32_t r = x % y;

  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);
}

static inline int64_t smod64(int64_t x, int64_t y) {
  int64_t r = x % y;

  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);
}

static inline int8_t sdiv_safe8(int8_t x, int8_t y) {
  return y == 0 ? 0 : sdiv8(x, y);
}

static inline int16_t sdiv_safe16(int16_t x, int16_t y) {
  return y == 0 ? 0 : sdiv16(x, y);
}

static inline int32_t sdiv_safe32(int32_t x, int32_t y) {
  return y == 0 ? 0 : sdiv32(x, y);
}

static inline int64_t sdiv_safe64(int64_t x, int64_t y) {
  return y == 0 ? 0 : sdiv64(x, y);
}

static inline int8_t sdiv_up_safe8(int8_t x, int8_t y) {
  return sdiv_safe8(x + y - 1, y);
}

static inline int16_t sdiv_up_safe16(int16_t x, int16_t y) {
  return sdiv_safe16(x + y - 1, y);
}

static inline int32_t sdiv_up_safe32(int32_t x, int32_t y) {
  return sdiv_safe32(x + y - 1, y);
}

static inline int64_t sdiv_up_safe64(int64_t x, int64_t y) {
  return sdiv_safe64(x + y - 1, y);
}

static inline int8_t smod_safe8(int8_t x, int8_t y) {
  return y == 0 ? 0 : smod8(x, y);
}

static inline int16_t smod_safe16(int16_t x, int16_t y) {
  return y == 0 ? 0 : smod16(x, y);
}

static inline int32_t smod_safe32(int32_t x, int32_t y) {
  return y == 0 ? 0 : smod32(x, y);
}

static inline int64_t smod_safe64(int64_t x, int64_t y) {
  return y == 0 ? 0 : smod64(x, y);
}

static inline int8_t squot8(int8_t x, int8_t y) {
  return x / y;
}

static inline int16_t squot16(int16_t x, int16_t y) {
  return x / y;
}

static inline int32_t squot32(int32_t x, int32_t y) {
  return x / y;
}

static inline int64_t squot64(int64_t x, int64_t y) {
  return x / y;
}

static inline int8_t srem8(int8_t x, int8_t y) {
  return x % y;
}

static inline int16_t srem16(int16_t x, int16_t y) {
  return x % y;
}

static inline int32_t srem32(int32_t x, int32_t y) {
  return x % y;
}

static inline int64_t srem64(int64_t x, int64_t y) {
  return x % y;
}

static inline int8_t squot_safe8(int8_t x, int8_t y) {
  return y == 0 ? 0 : x / y;
}

static inline int16_t squot_safe16(int16_t x, int16_t y) {
  return y == 0 ? 0 : x / y;
}

static inline int32_t squot_safe32(int32_t x, int32_t y) {
  return y == 0 ? 0 : x / y;
}

static inline int64_t squot_safe64(int64_t x, int64_t y) {
  return y == 0 ? 0 : x / y;
}

static inline int8_t srem_safe8(int8_t x, int8_t y) {
  return y == 0 ? 0 : x % y;
}

static inline int16_t srem_safe16(int16_t x, int16_t y) {
  return y == 0 ? 0 : x % y;
}

static inline int32_t srem_safe32(int32_t x, int32_t y) {
  return y == 0 ? 0 : x % y;
}

static inline int64_t srem_safe64(int64_t x, int64_t y) {
  return y == 0 ? 0 : x % y;
}

static inline int8_t smin8(int8_t x, int8_t y) {
  return x < y ? x : y;
}

static inline int16_t smin16(int16_t x, int16_t y) {
  return x < y ? x : y;
}

static inline int32_t smin32(int32_t x, int32_t y) {
  return x < y ? x : y;
}

static inline int64_t smin64(int64_t x, int64_t y) {
  return x < y ? x : y;
}

static inline uint8_t umin8(uint8_t x, uint8_t y) {
  return x < y ? x : y;
}

static inline uint16_t umin16(uint16_t x, uint16_t y) {
  return x < y ? x : y;
}

static inline uint32_t umin32(uint32_t x, uint32_t y) {
  return x < y ? x : y;
}

static inline uint64_t umin64(uint64_t x, uint64_t y) {
  return x < y ? x : y;
}

static inline int8_t smax8(int8_t x, int8_t y) {
  return x < y ? y : x;
}

static inline int16_t smax16(int16_t x, int16_t y) {
  return x < y ? y : x;
}

static inline int32_t smax32(int32_t x, int32_t y) {
  return x < y ? y : x;
}

static inline int64_t smax64(int64_t x, int64_t y) {
  return x < y ? y : x;
}

static inline uint8_t umax8(uint8_t x, uint8_t y) {
  return x < y ? y : x;
}

static inline uint16_t umax16(uint16_t x, uint16_t y) {
  return x < y ? y : x;
}

static inline uint32_t umax32(uint32_t x, uint32_t y) {
  return x < y ? y : x;
}

static inline uint64_t umax64(uint64_t x, uint64_t y) {
  return x < y ? y : x;
}

static inline uint8_t shl8(uint8_t x, uint8_t y) {
  return (uint8_t)(x << y);
}

static inline uint16_t shl16(uint16_t x, uint16_t y) {
  return (uint16_t)(x << y);
}

static inline uint32_t shl32(uint32_t x, uint32_t y) {
  return x << y;
}

static inline uint64_t shl64(uint64_t x, uint64_t y) {
  return x << y;
}

static inline uint8_t lshr8(uint8_t x, uint8_t y) {
  return x >> y;
}

static inline uint16_t lshr16(uint16_t x, uint16_t y) {
  return x >> y;
}

static inline uint32_t lshr32(uint32_t x, uint32_t y) {
  return x >> y;
}

static inline uint64_t lshr64(uint64_t x, uint64_t y) {
  return x >> y;
}

static inline int8_t ashr8(int8_t x, int8_t y) {
  return x >> y;
}

static inline int16_t ashr16(int16_t x, int16_t y) {
  return x >> y;
}

static inline int32_t ashr32(int32_t x, int32_t y) {
  return x >> y;
}

static inline int64_t ashr64(int64_t x, int64_t y) {
  return x >> y;
}

static inline uint8_t and8(uint8_t x, uint8_t y) {
  return x & y;
}

static inline uint16_t and16(uint16_t x, uint16_t y) {
  return x & y;
}

static inline uint32_t and32(uint32_t x, uint32_t y) {
  return x & y;
}

static inline uint64_t and64(uint64_t x, uint64_t y) {
  return x & y;
}

static inline uint8_t or8(uint8_t x, uint8_t y) {
  return x | y;
}

static inline uint16_t or16(uint16_t x, uint16_t y) {
  return x | y;
}

static inline uint32_t or32(uint32_t x, uint32_t y) {
  return x | y;
}

static inline uint64_t or64(uint64_t x, uint64_t y) {
  return x | y;
}

static inline uint8_t xor8(uint8_t x, uint8_t y) {
  return x ^ y;
}

static inline uint16_t xor16(uint16_t x, uint16_t y) {
  return x ^ y;
}

static inline uint32_t xor32(uint32_t x, uint32_t y) {
  return x ^ y;
}

static inline uint64_t xor64(uint64_t x, uint64_t y) {
  return x ^ y;
}

static inline bool ult8(uint8_t x, uint8_t y) {
  return x < y;
}

static inline bool ult16(uint16_t x, uint16_t y) {
  return x < y;
}

static inline bool ult32(uint32_t x, uint32_t y) {
  return x < y;
}

static inline bool ult64(uint64_t x, uint64_t y) {
  return x < y;
}

static inline bool ule8(uint8_t x, uint8_t y) {
  return x <= y;
}

static inline bool ule16(uint16_t x, uint16_t y) {
  return x <= y;
}

static inline bool ule32(uint32_t x, uint32_t y) {
  return x <= y;
}

static inline bool ule64(uint64_t x, uint64_t y) {
  return x <= y;
}

static inline bool slt8(int8_t x, int8_t y) {
  return x < y;
}

static inline bool slt16(int16_t x, int16_t y) {
  return x < y;
}

static inline bool slt32(int32_t x, int32_t y) {
  return x < y;
}

static inline bool slt64(int64_t x, int64_t y) {
  return x < y;
}

static inline bool sle8(int8_t x, int8_t y) {
  return x <= y;
}

static inline bool sle16(int16_t x, int16_t y) {
  return x <= y;
}

static inline bool sle32(int32_t x, int32_t y) {
  return x <= y;
}

static inline bool sle64(int64_t x, int64_t y) {
  return x <= y;
}

static inline uint8_t pow8(uint8_t x, uint8_t y) {
  uint8_t res = 1, rem = y;

  while (rem != 0) {
    if (rem & 1)
      res *= x;
    rem >>= 1;
    x *= x;
  }
  return res;
}

static inline uint16_t pow16(uint16_t x, uint16_t y) {
  uint16_t res = 1, rem = y;

  while (rem != 0) {
    if (rem & 1)
      res *= x;
    rem >>= 1;
    x *= x;
  }
  return res;
}

static inline uint32_t pow32(uint32_t x, uint32_t y) {
  uint32_t res = 1, rem = y;

  while (rem != 0) {
    if (rem & 1)
      res *= x;
    rem >>= 1;
    x *= x;
  }
  return res;
}

static inline uint64_t pow64(uint64_t x, uint64_t y) {
  uint64_t res = 1, rem = y;

  while (rem != 0) {
    if (rem & 1)
      res *= x;
    rem >>= 1;
    x *= x;
  }
  return res;
}

static inline bool itob_i8_bool(int8_t x) {
  return x;
}

static inline bool itob_i16_bool(int16_t x) {
  return x;
}

static inline bool itob_i32_bool(int32_t x) {
  return x;
}

static inline bool itob_i64_bool(int64_t x) {
  return x;
}

static inline int8_t btoi_bool_i8(bool x) {
  return x;
}

static inline int16_t btoi_bool_i16(bool x) {
  return x;
}

static inline int32_t btoi_bool_i32(bool x) {
  return x;
}

static inline int64_t btoi_bool_i64(bool x) {
  return x;
}

#define sext_i8_i8(x) ((int8_t) (int8_t) (x))
#define sext_i8_i16(x) ((int16_t) (int8_t) (x))
#define sext_i8_i32(x) ((int32_t) (int8_t) (x))
#define sext_i8_i64(x) ((int64_t) (int8_t) (x))
#define sext_i16_i8(x) ((int8_t) (int16_t) (x))
#define sext_i16_i16(x) ((int16_t) (int16_t) (x))
#define sext_i16_i32(x) ((int32_t) (int16_t) (x))
#define sext_i16_i64(x) ((int64_t) (int16_t) (x))
#define sext_i32_i8(x) ((int8_t) (int32_t) (x))
#define sext_i32_i16(x) ((int16_t) (int32_t) (x))
#define sext_i32_i32(x) ((int32_t) (int32_t) (x))
#define sext_i32_i64(x) ((int64_t) (int32_t) (x))
#define sext_i64_i8(x) ((int8_t) (int64_t) (x))
#define sext_i64_i16(x) ((int16_t) (int64_t) (x))
#define sext_i64_i32(x) ((int32_t) (int64_t) (x))
#define sext_i64_i64(x) ((int64_t) (int64_t) (x))
#define zext_i8_i8(x) ((int8_t) (uint8_t) (x))
#define zext_i8_i16(x) ((int16_t) (uint8_t) (x))
#define zext_i8_i32(x) ((int32_t) (uint8_t) (x))
#define zext_i8_i64(x) ((int64_t) (uint8_t) (x))
#define zext_i16_i8(x) ((int8_t) (uint16_t) (x))
#define zext_i16_i16(x) ((int16_t) (uint16_t) (x))
#define zext_i16_i32(x) ((int32_t) (uint16_t) (x))
#define zext_i16_i64(x) ((int64_t) (uint16_t) (x))
#define zext_i32_i8(x) ((int8_t) (uint32_t) (x))
#define zext_i32_i16(x) ((int16_t) (uint32_t) (x))
#define zext_i32_i32(x) ((int32_t) (uint32_t) (x))
#define zext_i32_i64(x) ((int64_t) (uint32_t) (x))
#define zext_i64_i8(x) ((int8_t) (uint64_t) (x))
#define zext_i64_i16(x) ((int16_t) (uint64_t) (x))
#define zext_i64_i32(x) ((int32_t) (uint64_t) (x))
#define zext_i64_i64(x) ((int64_t) (uint64_t) (x))

static int8_t abs8(int8_t x) {
  return (int8_t)abs(x);
}

static int16_t abs16(int16_t x) {
  return (int16_t)abs(x);
}

static int32_t abs32(int32_t x) {
  return abs(x);
}

static int64_t abs64(int64_t x) {
#if defined(__OPENCL_VERSION__)
  return abs(x);
#else
  return llabs(x);
#endif
}

#if defined(__OPENCL_VERSION__)
static int32_t futrts_popc8(int8_t x) {
  return popcount(x);
}

static int32_t futrts_popc16(int16_t x) {
  return popcount(x);
}

static int32_t futrts_popc32(int32_t x) {
  return popcount(x);
}

static int32_t futrts_popc64(int64_t x) {
  return popcount(x);
}
#elif defined(__CUDA_ARCH__)

static int32_t futrts_popc8(int8_t x) {
  return __popc(zext_i8_i32(x));
}

static int32_t futrts_popc16(int16_t x) {
  return __popc(zext_i16_i32(x));
}

static int32_t futrts_popc32(int32_t x) {
  return __popc(x);
}

static int32_t futrts_popc64(int64_t x) {
  return __popcll(x);
}

#else // Not OpenCL or CUDA, but plain C.

static int32_t futrts_popc8(uint8_t x) {
  int c = 0;
  for (; x; ++c) { x &= x - 1; }
  return c;
}

static int32_t futrts_popc16(uint16_t x) {
  int c = 0;
  for (; x; ++c) { x &= x - 1; }
  return c;
}

static int32_t futrts_popc32(uint32_t x) {
  int c = 0;
  for (; x; ++c) { x &= x - 1; }
  return c;
}

static int32_t futrts_popc64(uint64_t x) {
  int c = 0;
  for (; x; ++c) { x &= x - 1; }
  return c;
}
#endif

#if defined(__OPENCL_VERSION__)
static uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {
  return mul_hi(a, b);
}

static uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {
  return mul_hi(a, b);
}

static uint32_t futrts_mul_hi32(uint32_t a, uint32_t b) {
  return mul_hi(a, b);
}

static uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {
  return mul_hi(a, b);
}

#elif defined(__CUDA_ARCH__)

static uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {
  uint16_t aa = a;
  uint16_t bb = b;

  return aa * bb >> 8;
}

static uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {
  uint32_t aa = a;
  uint32_t bb = b;

  return aa * bb >> 16;
}

static uint32_t futrts_mul_hi32(uint32_t a, uint32_t b) {
  return mulhi(a, b);
}

static uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {
  return mul64hi(a, b);
}

#else // Not OpenCL or CUDA, but plain C.

static uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {
  uint16_t aa = a;
  uint16_t bb = b;

  return aa * bb >> 8;
}

static uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {
  uint32_t aa = a;
  uint32_t bb = b;

  return aa * bb >> 16;
}

static uint32_t futrts_mul_hi32(uint32_t a, uint32_t b) {
  uint64_t aa = a;
  uint64_t bb = b;

  return aa * bb >> 32;
}

static uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {
  __uint128_t aa = a;
  __uint128_t bb = b;

  return aa * bb >> 64;
}
#endif

#if defined(__OPENCL_VERSION__)
static uint8_t futrts_mad_hi8(uint8_t a, uint8_t b, uint8_t c) {
  return mad_hi(a, b, c);
}

static uint16_t futrts_mad_hi16(uint16_t a, uint16_t b, uint16_t c) {
  return mad_hi(a, b, c);
}

static uint32_t futrts_mad_hi32(uint32_t a, uint32_t b, uint32_t c) {
  return mad_hi(a, b, c);
}

static uint64_t futrts_mad_hi64(uint64_t a, uint64_t b, uint64_t c) {
  return mad_hi(a, b, c);
}

#else // Not OpenCL

static uint8_t futrts_mad_hi8(uint8_t a, uint8_t b, uint8_t c) {
  return futrts_mul_hi8(a, b) + c;
}

static uint16_t futrts_mad_hi16(uint16_t a, uint16_t b, uint16_t c) {
  return futrts_mul_hi16(a, b) + c;
}

static uint32_t futrts_mad_hi32(uint32_t a, uint32_t b, uint32_t c) {
  return futrts_mul_hi32(a, b) + c;
}

static uint64_t futrts_mad_hi64(uint64_t a, uint64_t b, uint64_t c) {
  return futrts_mul_hi64(a, b) + c;
}
#endif

#if defined(__OPENCL_VERSION__)
static int32_t futrts_clzz8(int8_t x) {
  return clz(x);
}

static int32_t futrts_clzz16(int16_t x) {
  return clz(x);
}

static int32_t futrts_clzz32(int32_t x) {
  return clz(x);
}

static int32_t futrts_clzz64(int64_t x) {
  return clz(x);
}

#elif defined(__CUDA_ARCH__)

static int32_t futrts_clzz8(int8_t x) {
  return __clz(zext_i8_i32(x)) - 24;
}

static int32_t futrts_clzz16(int16_t x) {
  return __clz(zext_i16_i32(x)) - 16;
}

static int32_t futrts_clzz32(int32_t x) {
  return __clz(x);
}

static int32_t futrts_clzz64(int64_t x) {
  return __clzll(x);
}

#else // Not OpenCL or CUDA, but plain C.

static int32_t futrts_clzz8(int8_t x) {
  return x == 0 ? 8 : __builtin_clz((uint32_t)zext_i8_i32(x)) - 24;
}

static int32_t futrts_clzz16(int16_t x) {
  return x == 0 ? 16 : __builtin_clz((uint32_t)zext_i16_i32(x)) - 16;
}

static int32_t futrts_clzz32(int32_t x) {
  return x == 0 ? 32 : __builtin_clz((uint32_t)x);
}

static int32_t futrts_clzz64(int64_t x) {
  return x == 0 ? 64 : __builtin_clzll((uint64_t)x);
}
#endif

#if defined(__OPENCL_VERSION__)
static int32_t futrts_ctzz8(int8_t x) {
  int i = 0;
  for (; i < 8 && (x & 1) == 0; i++, x >>= 1)
    ;
  return i;
}

static int32_t futrts_ctzz16(int16_t x) {
  int i = 0;
  for (; i < 16 && (x & 1) == 0; i++, x >>= 1)
    ;
  return i;
}

static int32_t futrts_ctzz32(int32_t x) {
  int i = 0;
  for (; i < 32 && (x & 1) == 0; i++, x >>= 1)
    ;
  return i;
}

static int32_t futrts_ctzz64(int64_t x) {
  int i = 0;
  for (; i < 64 && (x & 1) == 0; i++, x >>= 1)
    ;
  return i;
}

#elif defined(__CUDA_ARCH__)

static int32_t futrts_ctzz8(int8_t x) {
  int y = __ffs(x);
  return y == 0 ? 8 : y - 1;
}

static int32_t futrts_ctzz16(int16_t x) {
  int y = __ffs(x);
  return y == 0 ? 16 : y - 1;
}

static int32_t futrts_ctzz32(int32_t x) {
  int y = __ffs(x);
  return y == 0 ? 32 : y - 1;
}

static int32_t futrts_ctzz64(int64_t x) {
  int y = __ffsll(x);
  return y == 0 ? 64 : y - 1;
}

#else // Not OpenCL or CUDA, but plain C.

static int32_t futrts_ctzz8(int8_t x) {
  return x == 0 ? 8 : __builtin_ctz((uint32_t)x);
}

static int32_t futrts_ctzz16(int16_t x) {
  return x == 0 ? 16 : __builtin_ctz((uint32_t)x);
}

static int32_t futrts_ctzz32(int32_t x) {
  return x == 0 ? 32 : __builtin_ctz((uint32_t)x);
}

static int32_t futrts_ctzz64(int64_t x) {
  return x == 0 ? 64 : __builtin_ctzll((uint64_t)x);
}
#endif

static inline float fdiv32(float x, float y) {
  return x / y;
}

static inline float fadd32(float x, float y) {
  return x + y;
}

static inline float fsub32(float x, float y) {
  return x - y;
}

static inline float fmul32(float x, float y) {
  return x * y;
}

static inline bool cmplt32(float x, float y) {
  return x < y;
}

static inline bool cmple32(float x, float y) {
  return x <= y;
}

static inline float sitofp_i8_f32(int8_t x) {
  return (float) x;
}

static inline float sitofp_i16_f32(int16_t x) {
  return (float) x;
}

static inline float sitofp_i32_f32(int32_t x) {
  return (float) x;
}

static inline float sitofp_i64_f32(int64_t x) {
  return (float) x;
}

static inline float uitofp_i8_f32(uint8_t x) {
  return (float) x;
}

static inline float uitofp_i16_f32(uint16_t x) {
  return (float) x;
}

static inline float uitofp_i32_f32(uint32_t x) {
  return (float) x;
}

static inline float uitofp_i64_f32(uint64_t x) {
  return (float) x;
}

static inline int8_t fptosi_f32_i8(float x) {
  return (int8_t) x;
}

static inline int16_t fptosi_f32_i16(float x) {
  return (int16_t) x;
}

static inline int32_t fptosi_f32_i32(float x) {
  return (int32_t) x;
}

static inline int64_t fptosi_f32_i64(float x) {
  return (int64_t) x;
}

static inline uint8_t fptoui_f32_i8(float x) {
  return (uint8_t) x;
}

static inline uint16_t fptoui_f32_i16(float x) {
  return (uint16_t) x;
}

static inline uint32_t fptoui_f32_i32(float x) {
  return (uint32_t) x;
}

static inline uint64_t fptoui_f32_i64(float x) {
  return (uint64_t) x;
}

#ifdef __OPENCL_VERSION__
static inline float fabs32(float x) {
  return fabs(x);
}

static inline float fmax32(float x, float y) {
  return fmax(x, y);
}

static inline float fmin32(float x, float y) {
  return fmin(x, y);
}

static inline float fpow32(float x, float y) {
  return pow(x, y);
}

#else // Not OpenCL, but CUDA or plain C.

static inline float fabs32(float x) {
  return fabsf(x);
}

static inline float fmax32(float x, float y) {
  return fmaxf(x, y);
}

static inline float fmin32(float x, float y) {
  return fminf(x, y);
}

static inline float fpow32(float x, float y) {
  return powf(x, y);
}
#endif

static inline bool futrts_isnan32(float x) {
  return isnan(x);
}

static inline bool futrts_isinf32(float x) {
  return isinf(x);
}

#ifdef __OPENCL_VERSION__
static inline float futrts_log32(float x) {
  return log(x);
}

static inline float futrts_log2_32(float x) {
  return log2(x);
}

static inline float futrts_log10_32(float x) {
  return log10(x);
}

static inline float futrts_sqrt32(float x) {
  return sqrt(x);
}

static inline float futrts_exp32(float x) {
  return exp(x);
}

static inline float futrts_cos32(float x) {
  return cos(x);
}

static inline float futrts_sin32(float x) {
  return sin(x);
}

static inline float futrts_tan32(float x) {
  return tan(x);
}

static inline float futrts_acos32(float x) {
  return acos(x);
}

static inline float futrts_asin32(float x) {
  return asin(x);
}

static inline float futrts_atan32(float x) {
  return atan(x);
}

static inline float futrts_cosh32(float x) {
  return cosh(x);
}

static inline float futrts_sinh32(float x) {
  return sinh(x);
}

static inline float futrts_tanh32(float x) {
  return tanh(x);
}

static inline float futrts_acosh32(float x) {
  return acosh(x);
}

static inline float futrts_asinh32(float x) {
  return asinh(x);
}

static inline float futrts_atanh32(float x) {
  return atanh(x);
}

static inline float futrts_atan2_32(float x, float y) {
  return atan2(x, y);
}

static inline float futrts_hypot32(float x, float y) {
  return hypot(x, y);
}

static inline float futrts_gamma32(float x) {
  return tgamma(x);
}

static inline float futrts_lgamma32(float x) {
  return lgamma(x);
}

static inline float fmod32(float x, float y) {
  return fmod(x, y);
}

static inline float futrts_round32(float x) {
  return rint(x);
}

static inline float futrts_floor32(float x) {
  return floor(x);
}

static inline float futrts_ceil32(float x) {
  return ceil(x);
}

static inline float futrts_lerp32(float v0, float v1, float t) {
  return mix(v0, v1, t);
}

static inline float futrts_mad32(float a, float b, float c) {
  return mad(a, b, c);
}

static inline float futrts_fma32(float a, float b, float c) {
  return fma(a, b, c);
}

#else // Not OpenCL, but CUDA or plain C.

static inline float futrts_log32(float x) {
  return logf(x);
}

static inline float futrts_log2_32(float x) {
  return log2f(x);
}

static inline float futrts_log10_32(float x) {
  return log10f(x);
}

static inline float futrts_sqrt32(float x) {
  return sqrtf(x);
}

static inline float futrts_exp32(float x) {
  return expf(x);
}

static inline float futrts_cos32(float x) {
  return cosf(x);
}

static inline float futrts_sin32(float x) {
  return sinf(x);
}

static inline float futrts_tan32(float x) {
  return tanf(x);
}

static inline float futrts_acos32(float x) {
  return acosf(x);
}

static inline float futrts_asin32(float x) {
  return asinf(x);
}

static inline float futrts_atan32(float x) {
  return atanf(x);
}

static inline float futrts_cosh32(float x) {
  return coshf(x);
}

static inline float futrts_sinh32(float x) {
  return sinhf(x);
}

static inline float futrts_tanh32(float x) {
  return tanhf(x);
}

static inline float futrts_acosh32(float x) {
  return acoshf(x);
}

static inline float futrts_asinh32(float x) {
  return asinhf(x);
}

static inline float futrts_atanh32(float x) {
  return atanhf(x);
}

static inline float futrts_atan2_32(float x, float y) {
  return atan2f(x, y);
}

static inline float futrts_hypot32(float x, float y) {
  return hypotf(x, y);
}

static inline float futrts_gamma32(float x) {
  return tgammaf(x);
}

static inline float futrts_lgamma32(float x) {
  return lgammaf(x);
}

static inline float fmod32(float x, float y) {
  return fmodf(x, y);
}

static inline float futrts_round32(float x) {
  return rintf(x);
}

static inline float futrts_floor32(float x) {
  return floorf(x);
}

static inline float futrts_ceil32(float x) {
  return ceilf(x);
}

static inline float futrts_lerp32(float v0, float v1, float t) {
  return v0 + (v1 - v0) * t;
}

static inline float futrts_mad32(float a, float b, float c) {
  return a * b + c;
}

static inline float futrts_fma32(float a, float b, float c) {
  return fmaf(a, b, c);
}
#endif

static inline int32_t futrts_to_bits32(float x) {
  union {
    float f;
    int32_t t;
  } p;

  p.f = x;
  return p.t;
}

static inline float futrts_from_bits32(int32_t x) {
  union {
    int32_t f;
    float t;
  } p;

  p.f = x;
  return p.t;
}

static inline float fsignum32(float x) {
  return futrts_isnan32(x) ? x : (x > 0) - (x < 0);
}

#ifdef FUTHARK_F64_ENABLED

static inline double fdiv64(double x, double y) {
  return x / y;
}

static inline double fadd64(double x, double y) {
  return x + y;
}

static inline double fsub64(double x, double y) {
  return x - y;
}

static inline double fmul64(double x, double y) {
  return x * y;
}

static inline bool cmplt64(double x, double y) {
  return x < y;
}

static inline bool cmple64(double x, double y) {
  return x <= y;
}

static inline double sitofp_i8_f64(int8_t x) {
  return (double) x;
}

static inline double sitofp_i16_f64(int16_t x) {
  return (double) x;
}

static inline double sitofp_i32_f64(int32_t x) {
  return (double) x;
}

static inline double sitofp_i64_f64(int64_t x) {
  return (double) x;
}

static inline double uitofp_i8_f64(uint8_t x) {
  return (double) x;
}

static inline double uitofp_i16_f64(uint16_t x) {
  return (double) x;
}

static inline double uitofp_i32_f64(uint32_t x) {
  return (double) x;
}

static inline double uitofp_i64_f64(uint64_t x) {
  return (double) x;
}

static inline int8_t fptosi_f64_i8(double x) {
  return (int8_t) x;
}

static inline int16_t fptosi_f64_i16(double x) {
  return (int16_t) x;
}

static inline int32_t fptosi_f64_i32(double x) {
  return (int32_t) x;
}

static inline int64_t fptosi_f64_i64(double x) {
  return (int64_t) x;
}

static inline uint8_t fptoui_f64_i8(double x) {
  return (uint8_t) x;
}

static inline uint16_t fptoui_f64_i16(double x) {
  return (uint16_t) x;
}

static inline uint32_t fptoui_f64_i32(double x) {
  return (uint32_t) x;
}

static inline uint64_t fptoui_f64_i64(double x) {
  return (uint64_t) x;
}

static inline double fabs64(double x) {
  return fabs(x);
}

static inline double fmax64(double x, double y) {
  return fmax(x, y);
}

static inline double fmin64(double x, double y) {
  return fmin(x, y);
}

static inline double fpow64(double x, double y) {
  return pow(x, y);
}

static inline double futrts_log64(double x) {
  return log(x);
}

static inline double futrts_log2_64(double x) {
  return log2(x);
}

static inline double futrts_log10_64(double x) {
  return log10(x);
}

static inline double futrts_sqrt64(double x) {
  return sqrt(x);
}

static inline double futrts_exp64(double x) {
  return exp(x);
}

static inline double futrts_cos64(double x) {
  return cos(x);
}

static inline double futrts_sin64(double x) {
  return sin(x);
}

static inline double futrts_tan64(double x) {
  return tan(x);
}

static inline double futrts_acos64(double x) {
  return acos(x);
}

static inline double futrts_asin64(double x) {
  return asin(x);
}

static inline double futrts_atan64(double x) {
  return atan(x);
}

static inline double futrts_cosh64(double x) {
  return cosh(x);
}

static inline double futrts_sinh64(double x) {
  return sinh(x);
}

static inline double futrts_tanh64(double x) {
  return tanh(x);
}

static inline double futrts_acosh64(double x) {
  return acosh(x);
}

static inline double futrts_asinh64(double x) {
  return asinh(x);
}

static inline double futrts_atanh64(double x) {
  return atanh(x);
}

static inline double futrts_atan2_64(double x, double y) {
  return atan2(x, y);
}

static inline double futrts_hypot64(double x, double y) {
  return hypot(x, y);
}

static inline double futrts_gamma64(double x) {
  return tgamma(x);
}

static inline double futrts_lgamma64(double x) {
  return lgamma(x);
}

static inline double futrts_fma64(double a, double b, double c) {
  return fma(a, b, c);
}

static inline double futrts_round64(double x) {
  return rint(x);
}

static inline double futrts_ceil64(double x) {
  return ceil(x);
}

static inline double futrts_floor64(double x) {
  return floor(x);
}

static inline bool futrts_isnan64(double x) {
  return isnan(x);
}

static inline bool futrts_isinf64(double x) {
  return isinf(x);
}

static inline int64_t futrts_to_bits64(double x) {
  union {
    double f;
    int64_t t;
  } p;

  p.f = x;
  return p.t;
}

static inline double futrts_from_bits64(int64_t x) {
  union {
    int64_t f;
    double t;
  } p;

  p.f = x;
  return p.t;
}

static inline double fmod64(double x, double y) {
  return fmod(x, y);
}

static inline double fsignum64(double x) {
  return futrts_isnan64(x) ? x : (x > 0) - (x < 0);
}

static inline double futrts_lerp64(double v0, double v1, double t) {
#ifdef __OPENCL_VERSION__
  return mix(v0, v1, t);
#else
  return v0 + (v1 - v0) * t;
#endif
}

static inline double futrts_mad64(double a, double b, double c) {
#ifdef __OPENCL_VERSION__
  return mad(a, b, c);
#else
  return a * b + c;
#endif
}

static inline float fpconv_f32_f32(float x) {
  return (float) x;
}

static inline double fpconv_f32_f64(float x) {
  return (double) x;
}

static inline float fpconv_f64_f32(double x) {
  return (float) x;
}

static inline double fpconv_f64_f64(double x) {
  return (double) x;
}

#endif

// End of scalar.h.
// Start of scalar_f16.h.

// Half-precision is emulated if needed (e.g. in straight C) with the
// native type used if possible.  The emulation works by typedef'ing
// 'float' to 'f16', and then implementing all operations on single
// precision.  To cut down on duplication, we use the same code for
// those Futhark functions that require just operators or casts.  The
// in-memory representation for arrays will still be 16 bits even
// under emulation, so the compiler will have to be careful when
// generating reads or writes.

#if !defined(cl_khr_fp16) && !(defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 600)
#define EMULATE_F16
#endif

#if !defined(EMULATE_F16) && defined(__OPENCL_VERSION__)
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
#endif

#ifdef EMULATE_F16

// Note that the half-precision storage format is still 16 bits - the
// compiler will have to be real careful!
typedef float f16;

#else

#ifdef __CUDA_ARCH__
#include <cuda_fp16.h>
#endif

typedef half f16;

#endif

// Some of these functions convert to single precision because half
// precision versions are not available.

static inline f16 fadd16(f16 x, f16 y) {
  return x + y;
}

static inline f16 fsub16(f16 x, f16 y) {
  return x - y;
}

static inline f16 fmul16(f16 x, f16 y) {
  return x * y;
}

static inline bool cmplt16(f16 x, f16 y) {
  return x < y;
}

static inline bool cmple16(f16 x, f16 y) {
  return x <= y;
}

static inline f16 sitofp_i8_f16(int8_t x) {
  return (f16) x;
}

static inline f16 sitofp_i16_f16(int16_t x) {
  return (f16) x;
}

static inline f16 sitofp_i32_f16(int32_t x) {
  return (f16) x;
}

static inline f16 sitofp_i64_f16(int64_t x) {
  return (f16) x;
}

static inline f16 uitofp_i8_f16(uint8_t x) {
  return (f16) x;
}

static inline f16 uitofp_i16_f16(uint16_t x) {
  return (f16) x;
}

static inline f16 uitofp_i32_f16(uint32_t x) {
  return (f16) x;
}

static inline f16 uitofp_i64_f16(uint64_t x) {
  return (f16) x;
}

static inline int8_t fptosi_f16_i8(f16 x) {
  return (int8_t) (float) x;
}

static inline int16_t fptosi_f16_i16(f16 x) {
  return (int16_t) x;
}

static inline int32_t fptosi_f16_i32(f16 x) {
  return (int32_t) x;
}

static inline int64_t fptosi_f16_i64(f16 x) {
  return (int64_t) x;
}

static inline uint8_t fptoui_f16_i8(f16 x) {
  return (uint8_t) (float) x;
}

static inline uint16_t fptoui_f16_i16(f16 x) {
  return (uint16_t) x;
}

static inline uint32_t fptoui_f16_i32(f16 x) {
  return (uint32_t) x;
}

static inline uint64_t fptoui_f16_i64(f16 x) {
  return (uint64_t) x;
}

#ifndef EMULATE_F16

#ifdef __OPENCL_VERSION__
static inline f16 fabs16(f16 x) {
  return fabs(x);
}

static inline f16 fmax16(f16 x, f16 y) {
  return fmax(x, y);
}

static inline f16 fmin16(f16 x, f16 y) {
  return fmin(x, y);
}

static inline f16 fpow16(f16 x, f16 y) {
  return pow(x, y);
}

#else // Assuming CUDA.

static inline f16 fabs16(f16 x) {
  return fabsf(x);
}

static inline f16 fmax16(f16 x, f16 y) {
  return fmaxf(x, y);
}

static inline f16 fmin16(f16 x, f16 y) {
  return fminf(x, y);
}

static inline f16 fpow16(f16 x, f16 y) {
  return powf(x, y);
}
#endif

static inline bool futrts_isnan16(f16 x) {
  return isnan((float)x);
}

static inline bool futrts_isinf16(f16 x) {
  return isinf((float)x);
}

#ifdef __OPENCL_VERSION__
static inline f16 futrts_log16(f16 x) {
  return log(x);
}

static inline f16 futrts_log2_16(f16 x) {
  return log2(x);
}

static inline f16 futrts_log10_16(f16 x) {
  return log10(x);
}

static inline f16 futrts_sqrt16(f16 x) {
  return sqrt(x);
}

static inline f16 futrts_exp16(f16 x) {
  return exp(x);
}

static inline f16 futrts_cos16(f16 x) {
  return cos(x);
}

static inline f16 futrts_sin16(f16 x) {
  return sin(x);
}

static inline f16 futrts_tan16(f16 x) {
  return tan(x);
}

static inline f16 futrts_acos16(f16 x) {
  return acos(x);
}

static inline f16 futrts_asin16(f16 x) {
  return asin(x);
}

static inline f16 futrts_atan16(f16 x) {
  return atan(x);
}

static inline f16 futrts_cosh16(f16 x) {
  return cosh(x);
}

static inline f16 futrts_sinh16(f16 x) {
  return sinh(x);
}

static inline f16 futrts_tanh16(f16 x) {
  return tanh(x);
}

static inline f16 futrts_acosh16(f16 x) {
  return acosh(x);
}

static inline f16 futrts_asinh16(f16 x) {
  return asinh(x);
}

static inline f16 futrts_atanh16(f16 x) {
  return atanh(x);
}

static inline f16 futrts_atan2_16(f16 x, f16 y) {
  return atan2(x, y);
}

static inline f16 futrts_hypot16(f16 x, f16 y) {
  return hypot(x, y);
}

static inline f16 futrts_gamma16(f16 x) {
  return tgamma(x);
}

static inline f16 futrts_lgamma16(f16 x) {
  return lgamma(x);
}

static inline f16 fmod16(f16 x, f16 y) {
  return fmod(x, y);
}

static inline f16 futrts_round16(f16 x) {
  return rint(x);
}

static inline f16 futrts_floor16(f16 x) {
  return floor(x);
}

static inline f16 futrts_ceil16(f16 x) {
  return ceil(x);
}

static inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {
  return mix(v0, v1, t);
}

static inline f16 futrts_mad16(f16 a, f16 b, f16 c) {
  return mad(a, b, c);
}

static inline f16 futrts_fma16(f16 a, f16 b, f16 c) {
  return fma(a, b, c);
}

#else // Assume CUDA.

static inline f16 futrts_log16(f16 x) {
  return hlog(x);
}

static inline f16 futrts_log2_16(f16 x) {
  return hlog2(x);
}

static inline f16 futrts_log10_16(f16 x) {
  return hlog10(x);
}

static inline f16 futrts_sqrt16(f16 x) {
  return hsqrt(x);
}

static inline f16 futrts_exp16(f16 x) {
  return hexp(x);
}

static inline f16 futrts_cos16(f16 x) {
  return hcos(x);
}

static inline f16 futrts_sin16(f16 x) {
  return hsin(x);
}

static inline f16 futrts_tan16(f16 x) {
  return tanf(x);
}

static inline f16 futrts_acos16(f16 x) {
  return acosf(x);
}

static inline f16 futrts_asin16(f16 x) {
  return asinf(x);
}

static inline f16 futrts_atan16(f16 x) {
  return atanf(x);
}

static inline f16 futrts_cosh16(f16 x) {
  return coshf(x);
}

static inline f16 futrts_sinh16(f16 x) {
  return sinhf(x);
}

static inline f16 futrts_tanh16(f16 x) {
  return tanhf(x);
}

static inline f16 futrts_acosh16(f16 x) {
  return acoshf(x);
}

static inline f16 futrts_asinh16(f16 x) {
  return asinhf(x);
}

static inline f16 futrts_atanh16(f16 x) {
  return atanhf(x);
}

static inline f16 futrts_atan2_16(f16 x, f16 y) {
  return atan2f(x, y);
}

static inline f16 futrts_hypot16(f16 x, f16 y) {
  return hypotf(x, y);
}

static inline f16 futrts_gamma16(f16 x) {
  return tgammaf(x);
}

static inline f16 futrts_lgamma16(f16 x) {
  return lgammaf(x);
}

static inline f16 fmod16(f16 x, f16 y) {
  return fmodf(x, y);
}

static inline f16 futrts_round16(f16 x) {
  return rintf(x);
}

static inline f16 futrts_floor16(f16 x) {
  return hfloor(x);
}

static inline f16 futrts_ceil16(f16 x) {
  return hceil(x);
}

static inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {
  return v0 + (v1 - v0) * t;
}

static inline f16 futrts_mad16(f16 a, f16 b, f16 c) {
  return a * b + c;
}

static inline f16 futrts_fma16(f16 a, f16 b, f16 c) {
  return fmaf(a, b, c);
}

#endif

// The CUDA __half type cannot be put in unions for some reason, so we
// use bespoke conversion functions instead.
#ifdef __CUDA_ARCH__
static inline int16_t futrts_to_bits16(f16 x) {
  return __half_as_ushort(x);
}
static inline f16 futrts_from_bits16(int16_t x) {
  return __ushort_as_half(x);
}
#else
static inline int16_t futrts_to_bits16(f16 x) {
  union {
    f16 f;
    int16_t t;
  } p;

  p.f = x;
  return p.t;
}

static inline f16 futrts_from_bits16(int16_t x) {
  union {
    int16_t f;
    f16 t;
  } p;

  p.f = x;
  return p.t;
}
#endif

#else // No native f16 - emulate.

static inline f16 fabs16(f16 x) {
  return fabs32(x);
}

static inline f16 fmax16(f16 x, f16 y) {
  return fmax32(x, y);
}

static inline f16 fmin16(f16 x, f16 y) {
  return fmin32(x, y);
}

static inline f16 fpow16(f16 x, f16 y) {
  return fpow32(x, y);
}

static inline bool futrts_isnan16(f16 x) {
  return futrts_isnan32(x);
}

static inline bool futrts_isinf16(f16 x) {
  return futrts_isinf32(x);
}

static inline f16 futrts_log16(f16 x) {
  return futrts_log32(x);
}

static inline f16 futrts_log2_16(f16 x) {
  return futrts_log2_32(x);
}

static inline f16 futrts_log10_16(f16 x) {
  return futrts_log10_32(x);
}

static inline f16 futrts_sqrt16(f16 x) {
  return futrts_sqrt32(x);
}

static inline f16 futrts_exp16(f16 x) {
  return futrts_exp32(x);
}

static inline f16 futrts_cos16(f16 x) {
  return futrts_cos32(x);
}

static inline f16 futrts_sin16(f16 x) {
  return futrts_sin32(x);
}

static inline f16 futrts_tan16(f16 x) {
  return futrts_tan32(x);
}

static inline f16 futrts_acos16(f16 x) {
  return futrts_acos32(x);
}

static inline f16 futrts_asin16(f16 x) {
  return futrts_asin32(x);
}

static inline f16 futrts_atan16(f16 x) {
  return futrts_atan32(x);
}

static inline f16 futrts_cosh16(f16 x) {
  return futrts_cosh32(x);
}

static inline f16 futrts_sinh16(f16 x) {
  return futrts_sinh32(x);
}

static inline f16 futrts_tanh16(f16 x) {
  return futrts_tanh32(x);
}

static inline f16 futrts_acosh16(f16 x) {
  return futrts_acosh32(x);
}

static inline f16 futrts_asinh16(f16 x) {
  return futrts_asinh32(x);
}

static inline f16 futrts_atanh16(f16 x) {
  return futrts_atanh32(x);
}

static inline f16 futrts_atan2_16(f16 x, f16 y) {
  return futrts_atan2_32(x, y);
}

static inline f16 futrts_hypot16(f16 x, f16 y) {
  return futrts_hypot32(x, y);
}

static inline f16 futrts_gamma16(f16 x) {
  return futrts_gamma32(x);
}

static inline f16 futrts_lgamma16(f16 x) {
  return futrts_lgamma32(x);
}

static inline f16 fmod16(f16 x, f16 y) {
  return fmod32(x, y);
}

static inline f16 futrts_round16(f16 x) {
  return futrts_round32(x);
}

static inline f16 futrts_floor16(f16 x) {
  return futrts_floor32(x);
}

static inline f16 futrts_ceil16(f16 x) {
  return futrts_ceil32(x);
}

static inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {
  return futrts_lerp32(v0, v1, t);
}

static inline f16 futrts_mad16(f16 a, f16 b, f16 c) {
  return futrts_mad32(a, b, c);
}

static inline f16 futrts_fma16(f16 a, f16 b, f16 c) {
  return futrts_fma32(a, b, c);
}

// Even when we are using an OpenCL that does not support cl_khr_fp16,
// it must still support vload_half for actually creating a
// half-precision number, which can then be efficiently converted to a
// float.  Similarly for vstore_half.
#ifdef __OPENCL_VERSION__

static inline int16_t futrts_to_bits16(f16 x) {
  int16_t y;
  // Violating strict aliasing here.
  vstore_half((float)x, 0, (half*)&y);
  return y;
}

static inline f16 futrts_from_bits16(int16_t x) {
  return (f16)vload_half(0, (half*)&x);
}

#else

static inline int16_t futrts_to_bits16(f16 x) {
  return (int16_t)float2halfbits(x);
}

static inline f16 futrts_from_bits16(int16_t x) {
  return halfbits2float((uint16_t)x);
}

static inline f16 fsignum16(f16 x) {
  return futrts_isnan16(x) ? x : (x > 0) - (x < 0);
}

#endif

#endif

static inline float fpconv_f16_f16(f16 x) {
  return x;
}

static inline float fpconv_f16_f32(f16 x) {
  return x;
}

static inline f16 fpconv_f32_f16(float x) {
  return x;
}

#ifdef FUTHARK_F64_ENABLED

static inline double fpconv_f16_f64(f16 x) {
  return (double) x;
}

static inline f16 fpconv_f64_f16(double x) {
  return (f16) x;
}

#endif


// End of scalar_f16.h.

static int init_constants(struct futhark_context *);
static int free_constants(struct futhark_context *);
static int32_t mainzicounter_mem_realtype_229870[10240];
static int32_t mainzicounter_mem_realtype_229886[10240];
static int32_t mainzicounter_mem_realtype_229922[10240];
static int32_t mainzicounter_mem_realtype_229938[10240];
static int32_t mainzicounter_mem_realtype_229974[10240];
static int32_t mainzicounter_mem_realtype_229990[10240];
static int32_t mainzicounter_mem_realtype_230031[10240];
static int32_t mainzicounter_mem_realtype_230062[10240];
static int32_t mainzicounter_mem_realtype_230093[10240];
static int32_t mainzicounter_mem_realtype_230134[10240];
static int32_t mainzicounter_mem_realtype_230150[10240];
static int32_t mainzicounter_mem_realtype_230176[10240];
static int32_t mainzicounter_mem_realtype_230192[10240];
static int32_t mainzicounter_mem_realtype_230218[10240];
static int32_t mainzicounter_mem_realtype_230234[10240];
static int32_t mainzicounter_mem_realtype_230295[10240];
static int32_t mainzicounter_mem_realtype_230311[10240];
static int32_t mainzicounter_mem_realtype_230347[10240];
static int32_t mainzicounter_mem_realtype_230363[10240];
static int32_t mainzicounter_mem_realtype_230399[10240];
static int32_t mainzicounter_mem_realtype_230415[10240];
static int32_t mainzicounter_mem_realtype_230531[10240];
struct memblock_device {
    int *references;
    cl_mem mem;
    int64_t size;
    const char *desc;
};
struct memblock {
    int *references;
    unsigned char *mem;
    int64_t size;
    const char *desc;
};
typedef cl_mem fl_mem_t;
// Start of free_list.h.

// An entry in the free list.  May be invalid, to avoid having to
// deallocate entries as soon as they are removed.  There is also a
// tag, to help with memory reuse.
struct free_list_entry {
  size_t size;
  fl_mem_t mem;
  const char *tag;
  unsigned char valid;
};

struct free_list {
  struct free_list_entry *entries;        // Pointer to entries.
  int capacity;                           // Number of entries.
  int used;                               // Number of valid entries.
};

static void free_list_init(struct free_list *l) {
  l->capacity = 30; // Picked arbitrarily.
  l->used = 0;
  l->entries = (struct free_list_entry*) malloc(sizeof(struct free_list_entry) * l->capacity);
  for (int i = 0; i < l->capacity; i++) {
    l->entries[i].valid = 0;
  }
}

// Remove invalid entries from the free list.
static void free_list_pack(struct free_list *l) {
  int p = 0;
  for (int i = 0; i < l->capacity; i++) {
    if (l->entries[i].valid) {
      l->entries[p] = l->entries[i];
      if (i > p) {
        l->entries[i].valid = 0;
      }
      p++;
    }
  }

  // Now p is the number of used elements.  We don't want it to go
  // less than the default capacity (although in practice it's OK as
  // long as it doesn't become 1).
  if (p < 30) {
    p = 30;
  }
  l->entries = realloc(l->entries, p * sizeof(struct free_list_entry));
  l->capacity = p;
}

static void free_list_destroy(struct free_list *l) {
  assert(l->used == 0);
  free(l->entries);
}

static int free_list_find_invalid(struct free_list *l) {
  int i;
  for (i = 0; i < l->capacity; i++) {
    if (!l->entries[i].valid) {
      break;
    }
  }
  return i;
}

static void free_list_insert(struct free_list *l, size_t size, fl_mem_t mem, const char *tag) {
  int i = free_list_find_invalid(l);

  if (i == l->capacity) {
    // List is full; so we have to grow it.
    int new_capacity = l->capacity * 2 * sizeof(struct free_list_entry);
    l->entries = realloc(l->entries, new_capacity);
    for (int j = 0; j < l->capacity; j++) {
      l->entries[j+l->capacity].valid = 0;
    }
    l->capacity *= 2;
  }

  // Now 'i' points to the first invalid entry.
  l->entries[i].valid = 1;
  l->entries[i].size = size;
  l->entries[i].mem = mem;
  l->entries[i].tag = tag;

  l->used++;
}

// Find and remove a memory block of the indicated tag, or if that
// does not exist, another memory block with exactly the desired size.
// Returns 0 on success.
static int free_list_find(struct free_list *l, size_t size,
                          size_t *size_out, fl_mem_t *mem_out) {
  int size_match = -1;
  int i;
  for (i = 0; i < l->capacity; i++) {
    if (l->entries[i].valid &&
        size <= l->entries[i].size &&
        (size_match < 0 || l->entries[i].size < l->entries[size_match].size)) {
      // If this entry is valid, has sufficient size, and is smaller than the
      // best entry found so far, use this entry.
      size_match = i;
    }
  }

  if (size_match >= 0) {
    l->entries[size_match].valid = 0;
    *size_out = l->entries[size_match].size;
    *mem_out = l->entries[size_match].mem;
    l->used--;
    return 0;
  } else {
    return 1;
  }
}

// Remove the first block in the free list.  Returns 0 if a block was
// removed, and nonzero if the free list was already empty.
static int free_list_first(struct free_list *l, fl_mem_t *mem_out) {
  for (int i = 0; i < l->capacity; i++) {
    if (l->entries[i].valid) {
      l->entries[i].valid = 0;
      *mem_out = l->entries[i].mem;
      l->used--;
      return 0;
    }
  }

  return 1;
}

// End of free_list.h.

// Start of opencl.h.

#define OPENCL_SUCCEED_FATAL(e) opencl_succeed_fatal(e, #e, __FILE__, __LINE__)
#define OPENCL_SUCCEED_NONFATAL(e) opencl_succeed_nonfatal(e, #e, __FILE__, __LINE__)
// Take care not to override an existing error.
#define OPENCL_SUCCEED_OR_RETURN(e) {             \
    char *serror = OPENCL_SUCCEED_NONFATAL(e);    \
    if (serror) {                                 \
      if (!ctx->error) {                          \
        ctx->error = serror;                      \
        return bad;                               \
      } else {                                    \
        free(serror);                             \
      }                                           \
    }                                             \
  }

// OPENCL_SUCCEED_OR_RETURN returns the value of the variable 'bad' in
// scope.  By default, it will be this one.  Create a local variable
// of some other type if needed.  This is a bit of a hack, but it
// saves effort in the code generator.
static const int bad = 1;

struct opencl_config {
  int debugging;
  int profiling;
  int logging;
  int preferred_device_num;
  const char *preferred_platform;
  const char *preferred_device;
  int ignore_blacklist;

  const char* dump_program_to;
  const char* load_program_from;
  const char* dump_binary_to;
  const char* load_binary_from;

  size_t default_group_size;
  size_t default_num_groups;
  size_t default_tile_size;
  size_t default_reg_tile_size;
  size_t default_threshold;

  int default_group_size_changed;
  int default_tile_size_changed;

  int num_sizes;
  const char **size_names;
  const char **size_vars;
  int64_t *size_values;
  const char **size_classes;
};

static void opencl_config_init(struct opencl_config *cfg,
                               int num_sizes,
                               const char *size_names[],
                               const char *size_vars[],
                               int64_t *size_values,
                               const char *size_classes[]) {
  cfg->debugging = 0;
  cfg->logging = 0;
  cfg->profiling = 0;
  cfg->preferred_device_num = 0;
  cfg->preferred_platform = "";
  cfg->preferred_device = "";
  cfg->ignore_blacklist = 0;
  cfg->dump_program_to = NULL;
  cfg->load_program_from = NULL;
  cfg->dump_binary_to = NULL;
  cfg->load_binary_from = NULL;

  // The following are dummy sizes that mean the concrete defaults
  // will be set during initialisation via hardware-inspection-based
  // heuristics.
  cfg->default_group_size = 0;
  cfg->default_num_groups = 0;
  cfg->default_tile_size = 0;
  cfg->default_reg_tile_size = 0;
  cfg->default_threshold = 0;

  cfg->default_group_size_changed = 0;
  cfg->default_tile_size_changed = 0;

  cfg->num_sizes = num_sizes;
  cfg->size_names = size_names;
  cfg->size_vars = size_vars;
  cfg->size_values = size_values;
  cfg->size_classes = size_classes;
}

// A record of something that happened.
struct profiling_record {
  cl_event *event;
  int *runs;
  int64_t *runtime;
};

struct opencl_context {
  cl_device_id device;
  cl_context ctx;
  cl_command_queue queue;

  struct opencl_config cfg;

  struct free_list free_list;

  size_t max_group_size;
  size_t max_num_groups;
  size_t max_tile_size;
  size_t max_threshold;
  size_t max_local_memory;

  size_t lockstep_width;

  struct profiling_record *profiling_records;
  int profiling_records_capacity;
  int profiling_records_used;
};

struct opencl_device_option {
  cl_platform_id platform;
  cl_device_id device;
  cl_device_type device_type;
  char *platform_name;
  char *device_name;
};

// This function must be defined by the user.  It is invoked by
// setup_opencl() after the platform and device has been found, but
// before the program is loaded.  Its intended use is to tune
// constants based on the selected platform and device.
static void post_opencl_setup(struct opencl_context*, struct opencl_device_option*);

static char *strclone(const char *str) {
  size_t size = strlen(str) + 1;
  char *copy = (char*) malloc(size);
  if (copy == NULL) {
    return NULL;
  }

  memcpy(copy, str, size);
  return copy;
}

static const char* opencl_error_string(cl_int err)
{
    switch (err) {
        case CL_SUCCESS:                            return "Success!";
        case CL_DEVICE_NOT_FOUND:                   return "Device not found.";
        case CL_DEVICE_NOT_AVAILABLE:               return "Device not available";
        case CL_COMPILER_NOT_AVAILABLE:             return "Compiler not available";
        case CL_MEM_OBJECT_ALLOCATION_FAILURE:      return "Memory object allocation failure";
        case CL_OUT_OF_RESOURCES:                   return "Out of resources";
        case CL_OUT_OF_HOST_MEMORY:                 return "Out of host memory";
        case CL_PROFILING_INFO_NOT_AVAILABLE:       return "Profiling information not available";
        case CL_MEM_COPY_OVERLAP:                   return "Memory copy overlap";
        case CL_IMAGE_FORMAT_MISMATCH:              return "Image format mismatch";
        case CL_IMAGE_FORMAT_NOT_SUPPORTED:         return "Image format not supported";
        case CL_BUILD_PROGRAM_FAILURE:              return "Program build failure";
        case CL_MAP_FAILURE:                        return "Map failure";
        case CL_INVALID_VALUE:                      return "Invalid value";
        case CL_INVALID_DEVICE_TYPE:                return "Invalid device type";
        case CL_INVALID_PLATFORM:                   return "Invalid platform";
        case CL_INVALID_DEVICE:                     return "Invalid device";
        case CL_INVALID_CONTEXT:                    return "Invalid context";
        case CL_INVALID_QUEUE_PROPERTIES:           return "Invalid queue properties";
        case CL_INVALID_COMMAND_QUEUE:              return "Invalid command queue";
        case CL_INVALID_HOST_PTR:                   return "Invalid host pointer";
        case CL_INVALID_MEM_OBJECT:                 return "Invalid memory object";
        case CL_INVALID_IMAGE_FORMAT_DESCRIPTOR:    return "Invalid image format descriptor";
        case CL_INVALID_IMAGE_SIZE:                 return "Invalid image size";
        case CL_INVALID_SAMPLER:                    return "Invalid sampler";
        case CL_INVALID_BINARY:                     return "Invalid binary";
        case CL_INVALID_BUILD_OPTIONS:              return "Invalid build options";
        case CL_INVALID_PROGRAM:                    return "Invalid program";
        case CL_INVALID_PROGRAM_EXECUTABLE:         return "Invalid program executable";
        case CL_INVALID_KERNEL_NAME:                return "Invalid kernel name";
        case CL_INVALID_KERNEL_DEFINITION:          return "Invalid kernel definition";
        case CL_INVALID_KERNEL:                     return "Invalid kernel";
        case CL_INVALID_ARG_INDEX:                  return "Invalid argument index";
        case CL_INVALID_ARG_VALUE:                  return "Invalid argument value";
        case CL_INVALID_ARG_SIZE:                   return "Invalid argument size";
        case CL_INVALID_KERNEL_ARGS:                return "Invalid kernel arguments";
        case CL_INVALID_WORK_DIMENSION:             return "Invalid work dimension";
        case CL_INVALID_WORK_GROUP_SIZE:            return "Invalid work group size";
        case CL_INVALID_WORK_ITEM_SIZE:             return "Invalid work item size";
        case CL_INVALID_GLOBAL_OFFSET:              return "Invalid global offset";
        case CL_INVALID_EVENT_WAIT_LIST:            return "Invalid event wait list";
        case CL_INVALID_EVENT:                      return "Invalid event";
        case CL_INVALID_OPERATION:                  return "Invalid operation";
        case CL_INVALID_GL_OBJECT:                  return "Invalid OpenGL object";
        case CL_INVALID_BUFFER_SIZE:                return "Invalid buffer size";
        case CL_INVALID_MIP_LEVEL:                  return "Invalid mip-map level";
        default:                                    return "Unknown";
    }
}

static void opencl_succeed_fatal(cl_int ret,
                                 const char *call,
                                 const char *file,
                                 int line) {
  if (ret != CL_SUCCESS) {
    futhark_panic(-1, "%s:%d: OpenCL call\n  %s\nfailed with error code %d (%s)\n",
          file, line, call, ret, opencl_error_string(ret));
  }
}

static char* opencl_succeed_nonfatal(cl_int ret,
                                     const char *call,
                                     const char *file,
                                     int line) {
  if (ret != CL_SUCCESS) {
    return msgprintf("%s:%d: OpenCL call\n  %s\nfailed with error code %d (%s)\n",
                     file, line, call, ret, opencl_error_string(ret));
  } else {
    return NULL;
  }
}

static void set_preferred_platform(struct opencl_config *cfg, const char *s) {
  cfg->preferred_platform = s;
  cfg->ignore_blacklist = 1;
}

static void set_preferred_device(struct opencl_config *cfg, const char *s) {
  int x = 0;
  if (*s == '#') {
    s++;
    while (isdigit(*s)) {
      x = x * 10 + (*s++)-'0';
    }
    // Skip trailing spaces.
    while (isspace(*s)) {
      s++;
    }
  }
  cfg->preferred_device = s;
  cfg->preferred_device_num = x;
  cfg->ignore_blacklist = 1;
}

static char* opencl_platform_info(cl_platform_id platform,
                                  cl_platform_info param) {
  size_t req_bytes;
  char *info;

  OPENCL_SUCCEED_FATAL(clGetPlatformInfo(platform, param, 0, NULL, &req_bytes));

  info = (char*) malloc(req_bytes);

  OPENCL_SUCCEED_FATAL(clGetPlatformInfo(platform, param, req_bytes, info, NULL));

  return info;
}

static char* opencl_device_info(cl_device_id device,
                                cl_device_info param) {
  size_t req_bytes;
  char *info;

  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device, param, 0, NULL, &req_bytes));

  info = (char*) malloc(req_bytes);

  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device, param, req_bytes, info, NULL));

  return info;
}

static void opencl_all_device_options(struct opencl_device_option **devices_out,
                                      size_t *num_devices_out) {
  size_t num_devices = 0, num_devices_added = 0;

  cl_platform_id *all_platforms;
  cl_uint *platform_num_devices;

  cl_uint num_platforms;

  // Find the number of platforms.
  OPENCL_SUCCEED_FATAL(clGetPlatformIDs(0, NULL, &num_platforms));

  // Make room for them.
  all_platforms = calloc(num_platforms, sizeof(cl_platform_id));
  platform_num_devices = calloc(num_platforms, sizeof(cl_uint));

  // Fetch all the platforms.
  OPENCL_SUCCEED_FATAL(clGetPlatformIDs(num_platforms, all_platforms, NULL));

  // Count the number of devices for each platform, as well as the
  // total number of devices.
  for (cl_uint i = 0; i < num_platforms; i++) {
    if (clGetDeviceIDs(all_platforms[i], CL_DEVICE_TYPE_ALL,
                       0, NULL, &platform_num_devices[i]) == CL_SUCCESS) {
      num_devices += platform_num_devices[i];
    } else {
      platform_num_devices[i] = 0;
    }
  }

  // Make room for all the device options.
  struct opencl_device_option *devices =
    calloc(num_devices, sizeof(struct opencl_device_option));

  // Loop through the platforms, getting information about their devices.
  for (cl_uint i = 0; i < num_platforms; i++) {
    cl_platform_id platform = all_platforms[i];
    cl_uint num_platform_devices = platform_num_devices[i];

    if (num_platform_devices == 0) {
      continue;
    }

    char *platform_name = opencl_platform_info(platform, CL_PLATFORM_NAME);
    cl_device_id *platform_devices =
      calloc(num_platform_devices, sizeof(cl_device_id));

    // Fetch all the devices.
    OPENCL_SUCCEED_FATAL(clGetDeviceIDs(platform, CL_DEVICE_TYPE_ALL,
                                  num_platform_devices, platform_devices, NULL));

    // Loop through the devices, adding them to the devices array.
    for (cl_uint i = 0; i < num_platform_devices; i++) {
      char *device_name = opencl_device_info(platform_devices[i], CL_DEVICE_NAME);
      devices[num_devices_added].platform = platform;
      devices[num_devices_added].device = platform_devices[i];
      OPENCL_SUCCEED_FATAL(clGetDeviceInfo(platform_devices[i], CL_DEVICE_TYPE,
                                     sizeof(cl_device_type),
                                     &devices[num_devices_added].device_type,
                                     NULL));
      // We don't want the structs to share memory, so copy the platform name.
      // Each device name is already unique.
      devices[num_devices_added].platform_name = strclone(platform_name);
      devices[num_devices_added].device_name = device_name;
      num_devices_added++;
    }
    free(platform_devices);
    free(platform_name);
  }
  free(all_platforms);
  free(platform_num_devices);

  *devices_out = devices;
  *num_devices_out = num_devices;
}

// Returns 0 on success.
static int list_devices(void) {
  struct opencl_device_option *devices;
  size_t num_devices;

  opencl_all_device_options(&devices, &num_devices);

  const char *cur_platform = "";
  for (size_t i = 0; i < num_devices; i++) {
    struct opencl_device_option device = devices[i];
    if (strcmp(cur_platform, device.platform_name) != 0) {
      printf("Platform: %s\n", device.platform_name);
      cur_platform = device.platform_name;
    }
    printf("[%d]: %s\n", (int)i, device.device_name);
  }

  // Free all the platform and device names.
  for (size_t j = 0; j < num_devices; j++) {
    free(devices[j].platform_name);
    free(devices[j].device_name);
  }
  free(devices);

  return 0;
}

// Returns 0 on success.
static int select_device_interactively(struct opencl_config *cfg) {
  struct opencl_device_option *devices;
  size_t num_devices;
  int ret = 1;

  opencl_all_device_options(&devices, &num_devices);

  printf("Choose OpenCL device:\n");
  const char *cur_platform = "";
  for (size_t i = 0; i < num_devices; i++) {
    struct opencl_device_option device = devices[i];
    if (strcmp(cur_platform, device.platform_name) != 0) {
      printf("Platform: %s\n", device.platform_name);
      cur_platform = device.platform_name;
    }
    printf("[%d] %s\n", (int)i, device.device_name);
  }

  int selection;
  printf("Choice: ");
  if (scanf("%d", &selection) == 1) {
    ret = 0;
    cfg->preferred_platform = "";
    cfg->preferred_device = "";
    cfg->preferred_device_num = selection;
    cfg->ignore_blacklist = 1;
  }

  // Free all the platform and device names.
  for (size_t j = 0; j < num_devices; j++) {
    free(devices[j].platform_name);
    free(devices[j].device_name);
  }
  free(devices);

  return ret;
}

static int is_blacklisted(const char *platform_name, const char *device_name,
                          const struct opencl_config *cfg) {
  if (strcmp(cfg->preferred_platform, "") != 0 ||
      strcmp(cfg->preferred_device, "") != 0) {
    return 0;
  } else if (strstr(platform_name, "Apple") != NULL &&
             strstr(device_name, "Intel(R) Core(TM)") != NULL) {
    return 1;
  } else {
    return 0;
  }
}

static struct opencl_device_option get_preferred_device(const struct opencl_config *cfg) {
  struct opencl_device_option *devices;
  size_t num_devices;

  opencl_all_device_options(&devices, &num_devices);

  int num_device_matches = 0;

  for (size_t i = 0; i < num_devices; i++) {
    struct opencl_device_option device = devices[i];
    if (strstr(device.platform_name, cfg->preferred_platform) != NULL &&
        strstr(device.device_name, cfg->preferred_device) != NULL &&
        (cfg->ignore_blacklist ||
         !is_blacklisted(device.platform_name, device.device_name, cfg)) &&
        num_device_matches++ == cfg->preferred_device_num) {
      // Free all the platform and device names, except the ones we have chosen.
      for (size_t j = 0; j < num_devices; j++) {
        if (j != i) {
          free(devices[j].platform_name);
          free(devices[j].device_name);
        }
      }
      free(devices);
      return device;
    }
  }

  futhark_panic(1, "Could not find acceptable OpenCL device.\n");
  exit(1); // Never reached
}

static void describe_device_option(struct opencl_device_option device) {
  fprintf(stderr, "Using platform: %s\n", device.platform_name);
  fprintf(stderr, "Using device: %s\n", device.device_name);
}

static cl_build_status build_opencl_program(cl_program program, cl_device_id device, const char* options) {
  cl_int clBuildProgram_error = clBuildProgram(program, 1, &device, options, NULL, NULL);

  // Avoid termination due to CL_BUILD_PROGRAM_FAILURE
  if (clBuildProgram_error != CL_SUCCESS &&
      clBuildProgram_error != CL_BUILD_PROGRAM_FAILURE) {
    OPENCL_SUCCEED_FATAL(clBuildProgram_error);
  }

  cl_build_status build_status;
  OPENCL_SUCCEED_FATAL(clGetProgramBuildInfo(program,
                                             device,
                                             CL_PROGRAM_BUILD_STATUS,
                                             sizeof(cl_build_status),
                                             &build_status,
                                             NULL));

  if (build_status != CL_SUCCESS) {
    char *build_log;
    size_t ret_val_size;
    OPENCL_SUCCEED_FATAL(clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size));

    build_log = (char*) malloc(ret_val_size+1);
    OPENCL_SUCCEED_FATAL(clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL));

    // The spec technically does not say whether the build log is zero-terminated, so let's be careful.
    build_log[ret_val_size] = '\0';

    fprintf(stderr, "Build log:\n%s\n", build_log);

    free(build_log);
  }

  return build_status;
}

// Fields in a bitmask indicating which types we must be sure are
// available.
enum opencl_required_type { OPENCL_F64 = 1 };

// We take as input several strings representing the program, because
// C does not guarantee that the compiler supports particularly large
// literals.  Notably, Visual C has a limit of 2048 characters.  The
// array must be NULL-terminated.
static cl_program setup_opencl_with_command_queue(struct opencl_context *ctx,
                                                  cl_command_queue queue,
                                                  const char *srcs[],
                                                  int required_types,
                                                  const char *extra_build_opts[]) {
  int error;

  free_list_init(&ctx->free_list);
  ctx->queue = queue;

  OPENCL_SUCCEED_FATAL(clGetCommandQueueInfo(ctx->queue, CL_QUEUE_CONTEXT, sizeof(cl_context), &ctx->ctx, NULL));

  // Fill out the device info.  This is redundant work if we are
  // called from setup_opencl() (which is the common case), but I
  // doubt it matters much.
  struct opencl_device_option device_option;
  OPENCL_SUCCEED_FATAL(clGetCommandQueueInfo(ctx->queue, CL_QUEUE_DEVICE,
                                       sizeof(cl_device_id),
                                       &device_option.device,
                                       NULL));
  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device_option.device, CL_DEVICE_PLATFORM,
                                 sizeof(cl_platform_id),
                                 &device_option.platform,
                                 NULL));
  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device_option.device, CL_DEVICE_TYPE,
                                 sizeof(cl_device_type),
                                 &device_option.device_type,
                                 NULL));
  device_option.platform_name = opencl_platform_info(device_option.platform, CL_PLATFORM_NAME);
  device_option.device_name = opencl_device_info(device_option.device, CL_DEVICE_NAME);

  ctx->device = device_option.device;

  if (required_types & OPENCL_F64) {
    cl_uint supported;
    OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device_option.device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE,
                                   sizeof(cl_uint), &supported, NULL));
    if (!supported) {
      futhark_panic(1, "Program uses double-precision floats, but this is not supported on the chosen device: %s\n",
            device_option.device_name);
    }
  }

  size_t max_group_size;
  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device_option.device, CL_DEVICE_MAX_WORK_GROUP_SIZE,
                                 sizeof(size_t), &max_group_size, NULL));

  size_t max_tile_size = sqrt(max_group_size);

  cl_ulong max_local_memory;
  OPENCL_SUCCEED_FATAL(clGetDeviceInfo(device_option.device, CL_DEVICE_LOCAL_MEM_SIZE,
                                       sizeof(size_t), &max_local_memory, NULL));

  // Futhark reserves 4 bytes for bookkeeping information.
  max_local_memory -= 4;

  // The OpenCL implementation may reserve some local memory bytes for
  // various purposes.  In principle, we should use
  // clGetKernelWorkGroupInfo() to figure out for each kernel how much
  // is actually available, but our current code generator design
  // makes this infeasible.  Instead, we have this nasty hack where we
  // arbitrarily subtract some bytes, based on empirical measurements
  // (but which might be arbitrarily wrong).  Fortunately, we rarely
  // try to really push the local memory usage.
  if (strstr(device_option.platform_name, "NVIDIA CUDA") != NULL) {
    max_local_memory -= 12;
  } else if (strstr(device_option.platform_name, "AMD") != NULL) {
    max_local_memory -= 16;
  }

  // Make sure this function is defined.
  post_opencl_setup(ctx, &device_option);

  if (max_group_size < ctx->cfg.default_group_size) {
    if (ctx->cfg.default_group_size_changed) {
      fprintf(stderr, "Note: Device limits default group size to %zu (down from %zu).\n",
              max_group_size, ctx->cfg.default_group_size);
    }
    ctx->cfg.default_group_size = max_group_size;
  }

  if (max_tile_size < ctx->cfg.default_tile_size) {
    if (ctx->cfg.default_tile_size_changed) {
      fprintf(stderr, "Note: Device limits default tile size to %zu (down from %zu).\n",
              max_tile_size, ctx->cfg.default_tile_size);
    }
    ctx->cfg.default_tile_size = max_tile_size;
  }

  ctx->max_group_size = max_group_size;
  ctx->max_tile_size = max_tile_size; // No limit.
  ctx->max_threshold = ctx->max_num_groups = 0; // No limit.
  ctx->max_local_memory = max_local_memory;

  // Now we go through all the sizes, clamp them to the valid range,
  // or set them to the default.
  for (int i = 0; i < ctx->cfg.num_sizes; i++) {
    const char *size_class = ctx->cfg.size_classes[i];
    int64_t *size_value = &ctx->cfg.size_values[i];
    const char* size_name = ctx->cfg.size_names[i];
    int64_t max_value = 0, default_value = 0;

    if (strstr(size_class, "group_size") == size_class) {
      max_value = max_group_size;
      default_value = ctx->cfg.default_group_size;
    } else if (strstr(size_class, "num_groups") == size_class) {
      max_value = max_group_size; // Futhark assumes this constraint.
      default_value = ctx->cfg.default_num_groups;
      // XXX: as a quick and dirty hack, use twice as many threads for
      // histograms by default.  We really should just be smarter
      // about sizes somehow.
      if (strstr(size_name, ".seghist_") != NULL) {
        default_value *= 2;
      }
    } else if (strstr(size_class, "tile_size") == size_class) {
      max_value = sqrt(max_group_size);
      default_value = ctx->cfg.default_tile_size;
    } else if (strstr(size_class, "reg_tile_size") == size_class) {
      max_value = 0; // No limit.
      default_value = ctx->cfg.default_reg_tile_size;
    } else if (strstr(size_class, "threshold") == size_class) {
      // Threshold can be as large as it takes.
      default_value = ctx->cfg.default_threshold;
    } else {
      // Bespoke sizes have no limit or default.
    }
    if (*size_value == 0) {
      *size_value = default_value;
    } else if (max_value > 0 && *size_value > max_value) {
      fprintf(stderr, "Note: Device limits %s to %d (down from %d)\n",
              size_name, (int)max_value, (int)*size_value);
      *size_value = max_value;
    }
  }

  if (ctx->lockstep_width == 0) {
    ctx->lockstep_width = 1;
  }

  if (ctx->cfg.logging) {
    fprintf(stderr, "Lockstep width: %d\n", (int)ctx->lockstep_width);
    fprintf(stderr, "Default group size: %d\n", (int)ctx->cfg.default_group_size);
    fprintf(stderr, "Default number of groups: %d\n", (int)ctx->cfg.default_num_groups);
  }

  char *fut_opencl_src = NULL;
  cl_program prog;
  error = CL_SUCCESS;

  if (ctx->cfg.load_binary_from == NULL) {
    size_t src_size = 0;

    // Maybe we have to read OpenCL source from somewhere else (used for debugging).
    if (ctx->cfg.load_program_from != NULL) {
      fut_opencl_src = slurp_file(ctx->cfg.load_program_from, NULL);
      assert(fut_opencl_src != NULL);
    } else {
      // Construct the OpenCL source concatenating all the fragments.
      for (const char **src = srcs; src && *src; src++) {
        src_size += strlen(*src);
      }

      fut_opencl_src = (char*) malloc(src_size + 1);

      size_t n, i;
      for (i = 0, n = 0; srcs && srcs[i]; i++) {
        strncpy(fut_opencl_src+n, srcs[i], src_size-n);
        n += strlen(srcs[i]);
      }
      fut_opencl_src[src_size] = 0;
    }

    if (ctx->cfg.dump_program_to != NULL) {
      if (ctx->cfg.debugging) {
        fprintf(stderr, "Dumping OpenCL source to %s...\n", ctx->cfg.dump_program_to);
      }

      dump_file(ctx->cfg.dump_program_to, fut_opencl_src, strlen(fut_opencl_src));
    }

    if (ctx->cfg.debugging) {
      fprintf(stderr, "Creating OpenCL program...\n");
    }

    const char* src_ptr[] = {fut_opencl_src};
    prog = clCreateProgramWithSource(ctx->ctx, 1, src_ptr, &src_size, &error);
    OPENCL_SUCCEED_FATAL(error);
  } else {
    if (ctx->cfg.debugging) {
      fprintf(stderr, "Loading OpenCL binary from %s...\n", ctx->cfg.load_binary_from);
    }
    size_t binary_size;
    unsigned char *fut_opencl_bin =
      (unsigned char*) slurp_file(ctx->cfg.load_binary_from, &binary_size);
    assert(fut_opencl_bin != NULL);
    const unsigned char *binaries[1] = { fut_opencl_bin };
    cl_int status = 0;

    prog = clCreateProgramWithBinary(ctx->ctx, 1, &device_option.device,
                                     &binary_size, binaries,
                                     &status, &error);

    OPENCL_SUCCEED_FATAL(status);
    OPENCL_SUCCEED_FATAL(error);
  }

  int compile_opts_size = 1024;

  for (int i = 0; i < ctx->cfg.num_sizes; i++) {
    compile_opts_size += strlen(ctx->cfg.size_names[i]) + 20;
  }

  for (int i = 0; extra_build_opts[i] != NULL; i++) {
    compile_opts_size += strlen(extra_build_opts[i] + 1);
  }

  char *compile_opts = (char*) malloc(compile_opts_size);

  int w = snprintf(compile_opts, compile_opts_size,
                   "-DLOCKSTEP_WIDTH=%d ",
                   (int)ctx->lockstep_width);

  for (int i = 0; i < ctx->cfg.num_sizes; i++) {
    w += snprintf(compile_opts+w, compile_opts_size-w,
                  "-D%s=%d ",
                  ctx->cfg.size_vars[i],
                  (int)ctx->cfg.size_values[i]);
  }

  for (int i = 0; extra_build_opts[i] != NULL; i++) {
    w += snprintf(compile_opts+w, compile_opts_size-w,
                  "%s ", extra_build_opts[i]);
  }

  // Oclgrind claims to support cl_khr_fp16, but this is not actually
  // the case.
  if (strcmp(device_option.platform_name, "Oclgrind") == 0) {
    w += snprintf(compile_opts+w, compile_opts_size-w, "-DEMULATE_F16 ");
  }

  if (ctx->cfg.debugging) {
    fprintf(stderr, "OpenCL compiler options: %s\n", compile_opts);
    fprintf(stderr, "Building OpenCL program...\n");
  }
  OPENCL_SUCCEED_FATAL(build_opencl_program(prog, device_option.device, compile_opts));

  free(compile_opts);
  free(fut_opencl_src);

  if (ctx->cfg.dump_binary_to != NULL) {
    if (ctx->cfg.debugging) {
      fprintf(stderr, "Dumping OpenCL binary to %s...\n", ctx->cfg.dump_binary_to);
    }

    size_t binary_size;
    OPENCL_SUCCEED_FATAL(clGetProgramInfo(prog, CL_PROGRAM_BINARY_SIZES,
                                          sizeof(size_t), &binary_size, NULL));
    unsigned char *binary = (unsigned char*) malloc(binary_size);
    unsigned char *binaries[1] = { binary };
    OPENCL_SUCCEED_FATAL(clGetProgramInfo(prog, CL_PROGRAM_BINARIES,
                                          sizeof(unsigned char*), binaries, NULL));

    dump_file(ctx->cfg.dump_binary_to, binary, binary_size);
  }

  return prog;
}

static cl_program setup_opencl(struct opencl_context *ctx,
                               const char *srcs[],
                               int required_types,
                               const char *extra_build_opts[]) {

  ctx->lockstep_width = 0; // Real value set later.

  struct opencl_device_option device_option = get_preferred_device(&ctx->cfg);

  if (ctx->cfg.logging) {
    describe_device_option(device_option);
  }

  // Note that NVIDIA's OpenCL requires the platform property
  cl_context_properties properties[] = {
    CL_CONTEXT_PLATFORM,
    (cl_context_properties)device_option.platform,
    0
  };

  cl_int clCreateContext_error;
  ctx->ctx = clCreateContext(properties, 1, &device_option.device, NULL, NULL, &clCreateContext_error);
  OPENCL_SUCCEED_FATAL(clCreateContext_error);

  cl_int clCreateCommandQueue_error;
  cl_command_queue queue =
    clCreateCommandQueue(ctx->ctx,
                         device_option.device,
                         ctx->cfg.profiling ? CL_QUEUE_PROFILING_ENABLE : 0,
                         &clCreateCommandQueue_error);
  OPENCL_SUCCEED_FATAL(clCreateCommandQueue_error);

  return setup_opencl_with_command_queue(ctx, queue, srcs, required_types, extra_build_opts);
}

// Count up the runtime all the profiling_records that occured during execution.
// Also clears the buffer of profiling_records.
static cl_int opencl_tally_profiling_records(struct opencl_context *ctx) {
  cl_int err;
  for (int i = 0; i < ctx->profiling_records_used; i++) {
    struct profiling_record record = ctx->profiling_records[i];

    cl_ulong start_t, end_t;

    if ((err = clGetEventProfilingInfo(*record.event,
                                       CL_PROFILING_COMMAND_START,
                                       sizeof(start_t),
                                       &start_t,
                                       NULL)) != CL_SUCCESS) {
      return err;
    }

    if ((err = clGetEventProfilingInfo(*record.event,
                                       CL_PROFILING_COMMAND_END,
                                       sizeof(end_t),
                                       &end_t,
                                       NULL)) != CL_SUCCESS) {
      return err;
    }

    // OpenCL provides nanosecond resolution, but we want
    // microseconds.
    *record.runs += 1;
    *record.runtime += (end_t - start_t)/1000;

    if ((err = clReleaseEvent(*record.event)) != CL_SUCCESS) {
      return err;
    }
    free(record.event);
  }

  ctx->profiling_records_used = 0;

  return CL_SUCCESS;
}

// If profiling, produce an event associated with a profiling record.
static cl_event* opencl_get_event(struct opencl_context *ctx, int *runs, int64_t *runtime) {
    if (ctx->profiling_records_used == ctx->profiling_records_capacity) {
      ctx->profiling_records_capacity *= 2;
      ctx->profiling_records =
        realloc(ctx->profiling_records,
                ctx->profiling_records_capacity *
                sizeof(struct profiling_record));
    }
    cl_event *event = malloc(sizeof(cl_event));
    ctx->profiling_records[ctx->profiling_records_used].event = event;
    ctx->profiling_records[ctx->profiling_records_used].runs = runs;
    ctx->profiling_records[ctx->profiling_records_used].runtime = runtime;
    ctx->profiling_records_used++;
    return event;
}

// Allocate memory from driver. The problem is that OpenCL may perform
// lazy allocation, so we cannot know whether an allocation succeeded
// until the first time we try to use it.  Hence we immediately
// perform a write to see if the allocation succeeded.  This is slow,
// but the assumption is that this operation will be rare (most things
// will go through the free list).
static int opencl_alloc_actual(struct opencl_context *ctx, size_t size, cl_mem *mem_out) {
  int error;
  *mem_out = clCreateBuffer(ctx->ctx, CL_MEM_READ_WRITE, size, NULL, &error);

  if (error != CL_SUCCESS) {
    return error;
  }

  int x = 2;
  error = clEnqueueWriteBuffer(ctx->queue, *mem_out,
                               CL_TRUE,
                               0, sizeof(x), &x,
                               0, NULL, NULL);

  // No need to wait for completion here. clWaitForEvents() cannot
  // return mem object allocation failures. This implies that the
  // buffer is faulted onto the device on enqueue. (Observation by
  // Andreas Kloeckner.)

  return error;
}

static int opencl_alloc(struct opencl_context *ctx, size_t min_size, const char *tag, cl_mem *mem_out) {
  (void)tag;
  if (min_size < sizeof(int)) {
    min_size = sizeof(int);
  }

  size_t size;

  if (free_list_find(&ctx->free_list, min_size, &size, mem_out) == 0) {
    // Successfully found a free block.  Is it big enough?
    //
    // FIXME: we might also want to check whether the block is *too
    // big*, to avoid internal fragmentation.  However, this can
    // sharply impact performance on programs where arrays change size
    // frequently.  Fortunately, such allocations are usually fairly
    // short-lived, as they are necessarily within a loop, so the risk
    // of internal fragmentation resulting in an OOM situation is
    // limited.  However, it would be preferable if we could go back
    // and *shrink* oversize allocations when we encounter an OOM
    // condition.  That is technically feasible, since we do not
    // expose OpenCL pointer values directly to the application, but
    // instead rely on a level of indirection.
    if (size >= min_size) {
      if (ctx->cfg.debugging) {
        fprintf(stderr, "No need to allocate: Found a block in the free list.\n");
      }

      return CL_SUCCESS;
    } else {
      if (ctx->cfg.debugging) {
        fprintf(stderr, "Found a free block, but it was too small.\n");
      }

      // Not just right - free it.
      int error = clReleaseMemObject(*mem_out);
      if (error != CL_SUCCESS) {
        return error;
      }
    }
  }

  // We have to allocate a new block from the driver.  If the
  // allocation does not succeed, then we might be in an out-of-memory
  // situation.  We now start freeing things from the free list until
  // we think we have freed enough that the allocation will succeed.
  // Since we don't know how far the allocation is from fitting, we
  // have to check after every deallocation.  This might be pretty
  // expensive.  Let's hope that this case is hit rarely.

  if (ctx->cfg.debugging) {
    fprintf(stderr, "Actually allocating the desired block.\n");
  }

  int error = opencl_alloc_actual(ctx, min_size, mem_out);

  while (error == CL_MEM_OBJECT_ALLOCATION_FAILURE) {
    if (ctx->cfg.debugging) {
      fprintf(stderr, "Out of OpenCL memory: releasing entry from the free list...\n");
    }
    cl_mem mem;
    if (free_list_first(&ctx->free_list, &mem) == 0) {
      error = clReleaseMemObject(mem);
      if (error != CL_SUCCESS) {
        return error;
      }
    } else {
      break;
    }
    error = opencl_alloc_actual(ctx, min_size, mem_out);
  }

  return error;
}

static int opencl_free(struct opencl_context *ctx, cl_mem mem, const char *tag) {
  size_t size;
  cl_mem existing_mem;

  // If there is already a block with this tag, then remove it.
  if (free_list_find(&ctx->free_list, -1, &size, &existing_mem) == 0) {
    int error = clReleaseMemObject(existing_mem);
    if (error != CL_SUCCESS) {
      return error;
    }
  }

  int error = clGetMemObjectInfo(mem, CL_MEM_SIZE, sizeof(size_t), &size, NULL);

  if (error == CL_SUCCESS) {
    free_list_insert(&ctx->free_list, size, mem, tag);
  }

  return error;
}

static int opencl_free_all(struct opencl_context *ctx) {
  cl_mem mem;
  free_list_pack(&ctx->free_list);
  while (free_list_first(&ctx->free_list, &mem) == 0) {
    int error = clReleaseMemObject(mem);
    if (error != CL_SUCCESS) {
      return error;
    }
  }

  return CL_SUCCESS;
}

// Free everything that belongs to 'ctx', but do not free 'ctx'
// itself.
static void teardown_opencl(struct opencl_context *ctx) {
  (void)opencl_tally_profiling_records(ctx);
  free(ctx->profiling_records);
  (void)opencl_free_all(ctx);
  (void)clReleaseCommandQueue(ctx->queue);
  (void)clReleaseContext(ctx->ctx);
}

// End of opencl.h.

static const char *opencl_program[] =
                  {"\n// Clang-based OpenCL implementations need this for 'static' to work.\n#ifdef cl_clang_storage_class_specifiers\n#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable\n#endif\n#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable\n\n// Some OpenCL programs dislike empty progams, or programs with no kernels.\n// Declare a dummy kernel to ensure they remain our friends.\n__kernel void dummy_kernel(__global unsigned char *dummy, int n)\n{\n    const int thread_gid = get_global_id(0);\n    if (thread_gid >= n) return;\n}\n\n#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable\n#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable\n\ntypedef char int8_t;\ntypedef short int16_t;\ntypedef int int32_t;\ntypedef long int64_t;\n\ntypedef uchar uint8_t;\ntypedef ushort uint16_t;\ntypedef uint uint32_t;\ntypedef ulong uint64_t;\n\n// NVIDIAs OpenCL does not create device-wide memory fences (see #734), so we\n// use inline assembly if we detect we are on an NVIDIA GPU.\n#ifdef cl_nv_pragma_unroll\nstatic inline void mem_fence_global() {\n  asm(\"membar.gl;\");\n}\n#else\nstatic inline void mem_fence_global() {\n  mem_fence(CLK_LOCAL_MEM_FENCE | CLK_GLOBAL_MEM_FENCE);\n}\n#endif\nstatic inline void mem_fence_local() {\n  mem_fence(CLK_LOCAL_MEM_FENCE);\n}\n// Start of half.h.\n\n// Conversion functions are from http://half.sourceforge.net/, but\n// translated to C.\n//\n// Copyright (c) 2012-2021 Christian Rau\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Softwa",
                   "re.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#ifndef __OPENCL_VERSION__\n#define __constant\n#endif\n\n__constant static const uint16_t base_table[512] = {\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100,\n  0x0200, 0x0400, 0x0800, 0x0C00, 0x1000, 0x1400, 0x1800, 0x1C00, 0x2000, 0x2400, 0x2800, 0x2C00, 0x3000, 0x3400, 0x3800, 0x3C00,\n  0x4000, 0x4400, 0x4800, 0x4C00, 0x5000, 0x5400, 0x5800, 0x5C00, 0x6000, 0x6400, 0x6800, 0x6C00, 0x7000, 0x7400, 0x7800, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C0",
                   "0, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,\n  0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8002, 0x8004, 0x8008, 0x8010, 0x8020, 0x8040, 0x8080, 0x8100,\n  0x8200, 0x8400, 0x8800, 0x8C00, 0x9000, 0x9400, 0x9800, 0x9C00, 0xA000, 0xA400, 0xA800, 0xAC00, 0xB000, 0xB400, 0xB800, 0xBC00,\n  0xC000, 0xC400, 0xC800, 0xCC00, 0xD000, 0xD400, 0xD800, 0xDC00, 0xE000, 0xE400, 0xE800, 0xEC00, 0xF000, 0xF400, 0xF800, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC0",
                   "0, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,\n  0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00 };\n\n__constant static const unsigned char shift_table[512] = {\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,\n  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 2",
                   "4, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,\n  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n  24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13 };\n\n__constant static const uint32_t mantissa_table[2048] = {\n  0x00000000, 0x33800000, 0x34000000, 0x34400000, 0x34800000, 0x34A00000, 0x34C00000, 0x34E00000, 0x35000000, 0x35100000, 0x35200000, 0x35300000, 0x35400000, 0x35500000, 0x35600000, 0x35700000,\n  0x35800000, 0x35880000, 0x35900000, 0x35980000, 0x35A00000, 0x35A80000, 0x35B00000, 0x35B80000, 0x35C00000, 0x35C80000, 0x35D00000, 0x35D80000, 0x35E00000, 0x35E80000, 0x35F00000, 0x35F80000,\n  0x36000000, 0x36040000, 0x36080000, 0x360C0000, 0x36100000, 0x36140000, 0x36180000, 0x361C0000, 0x36200000, 0x36240000, 0x36280000, 0x362C0000, 0x36300000, 0x36340000, 0x36380000, 0x363C0000,\n  0x36400000, 0x36440000, 0x36480000, 0x364C0000, 0x36500000, 0x36540000, 0x36580000, 0x365C0000, 0x36600000, 0x36640000, 0x36680000, 0x366C0000, 0x36700000, 0x36740000, 0x36780000, 0x367C0000,\n  0x36800000, 0x36820000, 0x36840000, 0x36860000, 0x36880000, 0x368A0000, 0x368C0000, 0x368E0000, 0x36900000, 0x36920000, 0x36940000, 0x36960000, 0x36980000, 0x369A0000, 0x369C0000, 0x369E0000,\n  0x36A00000, 0x36A20000, 0x36A40000, 0x36A60000, 0x36A80000, 0x36AA00",
                   "00, 0x36AC0000, 0x36AE0000, 0x36B00000, 0x36B20000, 0x36B40000, 0x36B60000, 0x36B80000, 0x36BA0000, 0x36BC0000, 0x36BE0000,\n  0x36C00000, 0x36C20000, 0x36C40000, 0x36C60000, 0x36C80000, 0x36CA0000, 0x36CC0000, 0x36CE0000, 0x36D00000, 0x36D20000, 0x36D40000, 0x36D60000, 0x36D80000, 0x36DA0000, 0x36DC0000, 0x36DE0000,\n  0x36E00000, 0x36E20000, 0x36E40000, 0x36E60000, 0x36E80000, 0x36EA0000, 0x36EC0000, 0x36EE0000, 0x36F00000, 0x36F20000, 0x36F40000, 0x36F60000, 0x36F80000, 0x36FA0000, 0x36FC0000, 0x36FE0000,\n  0x37000000, 0x37010000, 0x37020000, 0x37030000, 0x37040000, 0x37050000, 0x37060000, 0x37070000, 0x37080000, 0x37090000, 0x370A0000, 0x370B0000, 0x370C0000, 0x370D0000, 0x370E0000, 0x370F0000,\n  0x37100000, 0x37110000, 0x37120000, 0x37130000, 0x37140000, 0x37150000, 0x37160000, 0x37170000, 0x37180000, 0x37190000, 0x371A0000, 0x371B0000, 0x371C0000, 0x371D0000, 0x371E0000, 0x371F0000,\n  0x37200000, 0x37210000, 0x37220000, 0x37230000, 0x37240000, 0x37250000, 0x37260000, 0x37270000, 0x37280000, 0x37290000, 0x372A0000, 0x372B0000, 0x372C0000, 0x372D0000, 0x372E0000, 0x372F0000,\n  0x37300000, 0x37310000, 0x37320000, 0x37330000, 0x37340000, 0x37350000, 0x37360000, 0x37370000, 0x37380000, 0x37390000, 0x373A0000, 0x373B0000, 0x373C0000, 0x373D0000, 0x373E0000, 0x373F0000,\n  0x37400000, 0x37410000, 0x37420000, 0x37430000, 0x37440000, 0x37450000, 0x37460000, 0x37470000, 0x37480000, 0x37490000, 0x374A0000, 0x374B0000, 0x374C0000, 0x374D0000, 0x374E0000, 0x374F0000,\n  0x37500000, 0x37510000, 0x37520000, 0x37530000, 0x37540000, 0x37550000, 0x37560000, 0x37570000, 0x37580000, 0x37590000, 0x375A0000, 0x375B0000, 0x375C0000, 0x375D0000, 0x375E0000, 0x375F0000,\n  0x37600000, 0x37610000, 0x37620000, 0x37630000, 0x37640000, 0x37650000, 0x37660000, 0x37670000, 0x37680000, 0x37690000, 0x376A0000, 0x376B0000, 0x376C0000, 0x376D0000, 0x376E0000, 0x376F0000,\n  0x37700000, 0x37710000, 0x37720000, 0x37730000, 0x37740000, 0x37750000, 0x37760000, 0x37770000, 0x37780000, 0x37790000, 0x377A00",
                   "00, 0x377B0000, 0x377C0000, 0x377D0000, 0x377E0000, 0x377F0000,\n  0x37800000, 0x37808000, 0x37810000, 0x37818000, 0x37820000, 0x37828000, 0x37830000, 0x37838000, 0x37840000, 0x37848000, 0x37850000, 0x37858000, 0x37860000, 0x37868000, 0x37870000, 0x37878000,\n  0x37880000, 0x37888000, 0x37890000, 0x37898000, 0x378A0000, 0x378A8000, 0x378B0000, 0x378B8000, 0x378C0000, 0x378C8000, 0x378D0000, 0x378D8000, 0x378E0000, 0x378E8000, 0x378F0000, 0x378F8000,\n  0x37900000, 0x37908000, 0x37910000, 0x37918000, 0x37920000, 0x37928000, 0x37930000, 0x37938000, 0x37940000, 0x37948000, 0x37950000, 0x37958000, 0x37960000, 0x37968000, 0x37970000, 0x37978000,\n  0x37980000, 0x37988000, 0x37990000, 0x37998000, 0x379A0000, 0x379A8000, 0x379B0000, 0x379B8000, 0x379C0000, 0x379C8000, 0x379D0000, 0x379D8000, 0x379E0000, 0x379E8000, 0x379F0000, 0x379F8000,\n  0x37A00000, 0x37A08000, 0x37A10000, 0x37A18000, 0x37A20000, 0x37A28000, 0x37A30000, 0x37A38000, 0x37A40000, 0x37A48000, 0x37A50000, 0x37A58000, 0x37A60000, 0x37A68000, 0x37A70000, 0x37A78000,\n  0x37A80000, 0x37A88000, 0x37A90000, 0x37A98000, 0x37AA0000, 0x37AA8000, 0x37AB0000, 0x37AB8000, 0x37AC0000, 0x37AC8000, 0x37AD0000, 0x37AD8000, 0x37AE0000, 0x37AE8000, 0x37AF0000, 0x37AF8000,\n  0x37B00000, 0x37B08000, 0x37B10000, 0x37B18000, 0x37B20000, 0x37B28000, 0x37B30000, 0x37B38000, 0x37B40000, 0x37B48000, 0x37B50000, 0x37B58000, 0x37B60000, 0x37B68000, 0x37B70000, 0x37B78000,\n  0x37B80000, 0x37B88000, 0x37B90000, 0x37B98000, 0x37BA0000, 0x37BA8000, 0x37BB0000, 0x37BB8000, 0x37BC0000, 0x37BC8000, 0x37BD0000, 0x37BD8000, 0x37BE0000, 0x37BE8000, 0x37BF0000, 0x37BF8000,\n  0x37C00000, 0x37C08000, 0x37C10000, 0x37C18000, 0x37C20000, 0x37C28000, 0x37C30000, 0x37C38000, 0x37C40000, 0x37C48000, 0x37C50000, 0x37C58000, 0x37C60000, 0x37C68000, 0x37C70000, 0x37C78000,\n  0x37C80000, 0x37C88000, 0x37C90000, 0x37C98000, 0x37CA0000, 0x37CA8000, 0x37CB0000, 0x37CB8000, 0x37CC0000, 0x37CC8000, 0x37CD0000, 0x37CD8000, 0x37CE0000, 0x37CE8000, 0x37CF0000, 0x37CF80",
                   "00,\n  0x37D00000, 0x37D08000, 0x37D10000, 0x37D18000, 0x37D20000, 0x37D28000, 0x37D30000, 0x37D38000, 0x37D40000, 0x37D48000, 0x37D50000, 0x37D58000, 0x37D60000, 0x37D68000, 0x37D70000, 0x37D78000,\n  0x37D80000, 0x37D88000, 0x37D90000, 0x37D98000, 0x37DA0000, 0x37DA8000, 0x37DB0000, 0x37DB8000, 0x37DC0000, 0x37DC8000, 0x37DD0000, 0x37DD8000, 0x37DE0000, 0x37DE8000, 0x37DF0000, 0x37DF8000,\n  0x37E00000, 0x37E08000, 0x37E10000, 0x37E18000, 0x37E20000, 0x37E28000, 0x37E30000, 0x37E38000, 0x37E40000, 0x37E48000, 0x37E50000, 0x37E58000, 0x37E60000, 0x37E68000, 0x37E70000, 0x37E78000,\n  0x37E80000, 0x37E88000, 0x37E90000, 0x37E98000, 0x37EA0000, 0x37EA8000, 0x37EB0000, 0x37EB8000, 0x37EC0000, 0x37EC8000, 0x37ED0000, 0x37ED8000, 0x37EE0000, 0x37EE8000, 0x37EF0000, 0x37EF8000,\n  0x37F00000, 0x37F08000, 0x37F10000, 0x37F18000, 0x37F20000, 0x37F28000, 0x37F30000, 0x37F38000, 0x37F40000, 0x37F48000, 0x37F50000, 0x37F58000, 0x37F60000, 0x37F68000, 0x37F70000, 0x37F78000,\n  0x37F80000, 0x37F88000, 0x37F90000, 0x37F98000, 0x37FA0000, 0x37FA8000, 0x37FB0000, 0x37FB8000, 0x37FC0000, 0x37FC8000, 0x37FD0000, 0x37FD8000, 0x37FE0000, 0x37FE8000, 0x37FF0000, 0x37FF8000,\n  0x38000000, 0x38004000, 0x38008000, 0x3800C000, 0x38010000, 0x38014000, 0x38018000, 0x3801C000, 0x38020000, 0x38024000, 0x38028000, 0x3802C000, 0x38030000, 0x38034000, 0x38038000, 0x3803C000,\n  0x38040000, 0x38044000, 0x38048000, 0x3804C000, 0x38050000, 0x38054000, 0x38058000, 0x3805C000, 0x38060000, 0x38064000, 0x38068000, 0x3806C000, 0x38070000, 0x38074000, 0x38078000, 0x3807C000,\n  0x38080000, 0x38084000, 0x38088000, 0x3808C000, 0x38090000, 0x38094000, 0x38098000, 0x3809C000, 0x380A0000, 0x380A4000, 0x380A8000, 0x380AC000, 0x380B0000, 0x380B4000, 0x380B8000, 0x380BC000,\n  0x380C0000, 0x380C4000, 0x380C8000, 0x380CC000, 0x380D0000, 0x380D4000, 0x380D8000, 0x380DC000, 0x380E0000, 0x380E4000, 0x380E8000, 0x380EC000, 0x380F0000, 0x380F4000, 0x380F8000, 0x380FC000,\n  0x38100000, 0x38104000, 0x38108000, 0x3810C000, 0x3811",
                   "0000, 0x38114000, 0x38118000, 0x3811C000, 0x38120000, 0x38124000, 0x38128000, 0x3812C000, 0x38130000, 0x38134000, 0x38138000, 0x3813C000,\n  0x38140000, 0x38144000, 0x38148000, 0x3814C000, 0x38150000, 0x38154000, 0x38158000, 0x3815C000, 0x38160000, 0x38164000, 0x38168000, 0x3816C000, 0x38170000, 0x38174000, 0x38178000, 0x3817C000,\n  0x38180000, 0x38184000, 0x38188000, 0x3818C000, 0x38190000, 0x38194000, 0x38198000, 0x3819C000, 0x381A0000, 0x381A4000, 0x381A8000, 0x381AC000, 0x381B0000, 0x381B4000, 0x381B8000, 0x381BC000,\n  0x381C0000, 0x381C4000, 0x381C8000, 0x381CC000, 0x381D0000, 0x381D4000, 0x381D8000, 0x381DC000, 0x381E0000, 0x381E4000, 0x381E8000, 0x381EC000, 0x381F0000, 0x381F4000, 0x381F8000, 0x381FC000,\n  0x38200000, 0x38204000, 0x38208000, 0x3820C000, 0x38210000, 0x38214000, 0x38218000, 0x3821C000, 0x38220000, 0x38224000, 0x38228000, 0x3822C000, 0x38230000, 0x38234000, 0x38238000, 0x3823C000,\n  0x38240000, 0x38244000, 0x38248000, 0x3824C000, 0x38250000, 0x38254000, 0x38258000, 0x3825C000, 0x38260000, 0x38264000, 0x38268000, 0x3826C000, 0x38270000, 0x38274000, 0x38278000, 0x3827C000,\n  0x38280000, 0x38284000, 0x38288000, 0x3828C000, 0x38290000, 0x38294000, 0x38298000, 0x3829C000, 0x382A0000, 0x382A4000, 0x382A8000, 0x382AC000, 0x382B0000, 0x382B4000, 0x382B8000, 0x382BC000,\n  0x382C0000, 0x382C4000, 0x382C8000, 0x382CC000, 0x382D0000, 0x382D4000, 0x382D8000, 0x382DC000, 0x382E0000, 0x382E4000, 0x382E8000, 0x382EC000, 0x382F0000, 0x382F4000, 0x382F8000, 0x382FC000,\n  0x38300000, 0x38304000, 0x38308000, 0x3830C000, 0x38310000, 0x38314000, 0x38318000, 0x3831C000, 0x38320000, 0x38324000, 0x38328000, 0x3832C000, 0x38330000, 0x38334000, 0x38338000, 0x3833C000,\n  0x38340000, 0x38344000, 0x38348000, 0x3834C000, 0x38350000, 0x38354000, 0x38358000, 0x3835C000, 0x38360000, 0x38364000, 0x38368000, 0x3836C000, 0x38370000, 0x38374000, 0x38378000, 0x3837C000,\n  0x38380000, 0x38384000, 0x38388000, 0x3838C000, 0x38390000, 0x38394000, 0x38398000, 0x3839C000, 0x383A0000, 0x383A",
                   "4000, 0x383A8000, 0x383AC000, 0x383B0000, 0x383B4000, 0x383B8000, 0x383BC000,\n  0x383C0000, 0x383C4000, 0x383C8000, 0x383CC000, 0x383D0000, 0x383D4000, 0x383D8000, 0x383DC000, 0x383E0000, 0x383E4000, 0x383E8000, 0x383EC000, 0x383F0000, 0x383F4000, 0x383F8000, 0x383FC000,\n  0x38400000, 0x38404000, 0x38408000, 0x3840C000, 0x38410000, 0x38414000, 0x38418000, 0x3841C000, 0x38420000, 0x38424000, 0x38428000, 0x3842C000, 0x38430000, 0x38434000, 0x38438000, 0x3843C000,\n  0x38440000, 0x38444000, 0x38448000, 0x3844C000, 0x38450000, 0x38454000, 0x38458000, 0x3845C000, 0x38460000, 0x38464000, 0x38468000, 0x3846C000, 0x38470000, 0x38474000, 0x38478000, 0x3847C000,\n  0x38480000, 0x38484000, 0x38488000, 0x3848C000, 0x38490000, 0x38494000, 0x38498000, 0x3849C000, 0x384A0000, 0x384A4000, 0x384A8000, 0x384AC000, 0x384B0000, 0x384B4000, 0x384B8000, 0x384BC000,\n  0x384C0000, 0x384C4000, 0x384C8000, 0x384CC000, 0x384D0000, 0x384D4000, 0x384D8000, 0x384DC000, 0x384E0000, 0x384E4000, 0x384E8000, 0x384EC000, 0x384F0000, 0x384F4000, 0x384F8000, 0x384FC000,\n  0x38500000, 0x38504000, 0x38508000, 0x3850C000, 0x38510000, 0x38514000, 0x38518000, 0x3851C000, 0x38520000, 0x38524000, 0x38528000, 0x3852C000, 0x38530000, 0x38534000, 0x38538000, 0x3853C000,\n  0x38540000, 0x38544000, 0x38548000, 0x3854C000, 0x38550000, 0x38554000, 0x38558000, 0x3855C000, 0x38560000, 0x38564000, 0x38568000, 0x3856C000, 0x38570000, 0x38574000, 0x38578000, 0x3857C000,\n  0x38580000, 0x38584000, 0x38588000, 0x3858C000, 0x38590000, 0x38594000, 0x38598000, 0x3859C000, 0x385A0000, 0x385A4000, 0x385A8000, 0x385AC000, 0x385B0000, 0x385B4000, 0x385B8000, 0x385BC000,\n  0x385C0000, 0x385C4000, 0x385C8000, 0x385CC000, 0x385D0000, 0x385D4000, 0x385D8000, 0x385DC000, 0x385E0000, 0x385E4000, 0x385E8000, 0x385EC000, 0x385F0000, 0x385F4000, 0x385F8000, 0x385FC000,\n  0x38600000, 0x38604000, 0x38608000, 0x3860C000, 0x38610000, 0x38614000, 0x38618000, 0x3861C000, 0x38620000, 0x38624000, 0x38628000, 0x3862C000, 0x38630000, 0x38634000, 0x3863",
                   "8000, 0x3863C000,\n  0x38640000, 0x38644000, 0x38648000, 0x3864C000, 0x38650000, 0x38654000, 0x38658000, 0x3865C000, 0x38660000, 0x38664000, 0x38668000, 0x3866C000, 0x38670000, 0x38674000, 0x38678000, 0x3867C000,\n  0x38680000, 0x38684000, 0x38688000, 0x3868C000, 0x38690000, 0x38694000, 0x38698000, 0x3869C000, 0x386A0000, 0x386A4000, 0x386A8000, 0x386AC000, 0x386B0000, 0x386B4000, 0x386B8000, 0x386BC000,\n  0x386C0000, 0x386C4000, 0x386C8000, 0x386CC000, 0x386D0000, 0x386D4000, 0x386D8000, 0x386DC000, 0x386E0000, 0x386E4000, 0x386E8000, 0x386EC000, 0x386F0000, 0x386F4000, 0x386F8000, 0x386FC000,\n  0x38700000, 0x38704000, 0x38708000, 0x3870C000, 0x38710000, 0x38714000, 0x38718000, 0x3871C000, 0x38720000, 0x38724000, 0x38728000, 0x3872C000, 0x38730000, 0x38734000, 0x38738000, 0x3873C000,\n  0x38740000, 0x38744000, 0x38748000, 0x3874C000, 0x38750000, 0x38754000, 0x38758000, 0x3875C000, 0x38760000, 0x38764000, 0x38768000, 0x3876C000, 0x38770000, 0x38774000, 0x38778000, 0x3877C000,\n  0x38780000, 0x38784000, 0x38788000, 0x3878C000, 0x38790000, 0x38794000, 0x38798000, 0x3879C000, 0x387A0000, 0x387A4000, 0x387A8000, 0x387AC000, 0x387B0000, 0x387B4000, 0x387B8000, 0x387BC000,\n  0x387C0000, 0x387C4000, 0x387C8000, 0x387CC000, 0x387D0000, 0x387D4000, 0x387D8000, 0x387DC000, 0x387E0000, 0x387E4000, 0x387E8000, 0x387EC000, 0x387F0000, 0x387F4000, 0x387F8000, 0x387FC000,\n  0x38000000, 0x38002000, 0x38004000, 0x38006000, 0x38008000, 0x3800A000, 0x3800C000, 0x3800E000, 0x38010000, 0x38012000, 0x38014000, 0x38016000, 0x38018000, 0x3801A000, 0x3801C000, 0x3801E000,\n  0x38020000, 0x38022000, 0x38024000, 0x38026000, 0x38028000, 0x3802A000, 0x3802C000, 0x3802E000, 0x38030000, 0x38032000, 0x38034000, 0x38036000, 0x38038000, 0x3803A000, 0x3803C000, 0x3803E000,\n  0x38040000, 0x38042000, 0x38044000, 0x38046000, 0x38048000, 0x3804A000, 0x3804C000, 0x3804E000, 0x38050000, 0x38052000, 0x38054000, 0x38056000, 0x38058000, 0x3805A000, 0x3805C000, 0x3805E000,\n  0x38060000, 0x38062000, 0x38064000, 0x38",
                   "066000, 0x38068000, 0x3806A000, 0x3806C000, 0x3806E000, 0x38070000, 0x38072000, 0x38074000, 0x38076000, 0x38078000, 0x3807A000, 0x3807C000, 0x3807E000,\n  0x38080000, 0x38082000, 0x38084000, 0x38086000, 0x38088000, 0x3808A000, 0x3808C000, 0x3808E000, 0x38090000, 0x38092000, 0x38094000, 0x38096000, 0x38098000, 0x3809A000, 0x3809C000, 0x3809E000,\n  0x380A0000, 0x380A2000, 0x380A4000, 0x380A6000, 0x380A8000, 0x380AA000, 0x380AC000, 0x380AE000, 0x380B0000, 0x380B2000, 0x380B4000, 0x380B6000, 0x380B8000, 0x380BA000, 0x380BC000, 0x380BE000,\n  0x380C0000, 0x380C2000, 0x380C4000, 0x380C6000, 0x380C8000, 0x380CA000, 0x380CC000, 0x380CE000, 0x380D0000, 0x380D2000, 0x380D4000, 0x380D6000, 0x380D8000, 0x380DA000, 0x380DC000, 0x380DE000,\n  0x380E0000, 0x380E2000, 0x380E4000, 0x380E6000, 0x380E8000, 0x380EA000, 0x380EC000, 0x380EE000, 0x380F0000, 0x380F2000, 0x380F4000, 0x380F6000, 0x380F8000, 0x380FA000, 0x380FC000, 0x380FE000,\n  0x38100000, 0x38102000, 0x38104000, 0x38106000, 0x38108000, 0x3810A000, 0x3810C000, 0x3810E000, 0x38110000, 0x38112000, 0x38114000, 0x38116000, 0x38118000, 0x3811A000, 0x3811C000, 0x3811E000,\n  0x38120000, 0x38122000, 0x38124000, 0x38126000, 0x38128000, 0x3812A000, 0x3812C000, 0x3812E000, 0x38130000, 0x38132000, 0x38134000, 0x38136000, 0x38138000, 0x3813A000, 0x3813C000, 0x3813E000,\n  0x38140000, 0x38142000, 0x38144000, 0x38146000, 0x38148000, 0x3814A000, 0x3814C000, 0x3814E000, 0x38150000, 0x38152000, 0x38154000, 0x38156000, 0x38158000, 0x3815A000, 0x3815C000, 0x3815E000,\n  0x38160000, 0x38162000, 0x38164000, 0x38166000, 0x38168000, 0x3816A000, 0x3816C000, 0x3816E000, 0x38170000, 0x38172000, 0x38174000, 0x38176000, 0x38178000, 0x3817A000, 0x3817C000, 0x3817E000,\n  0x38180000, 0x38182000, 0x38184000, 0x38186000, 0x38188000, 0x3818A000, 0x3818C000, 0x3818E000, 0x38190000, 0x38192000, 0x38194000, 0x38196000, 0x38198000, 0x3819A000, 0x3819C000, 0x3819E000,\n  0x381A0000, 0x381A2000, 0x381A4000, 0x381A6000, 0x381A8000, 0x381AA000, 0x381AC000, 0x381AE000, 0x38",
                   "1B0000, 0x381B2000, 0x381B4000, 0x381B6000, 0x381B8000, 0x381BA000, 0x381BC000, 0x381BE000,\n  0x381C0000, 0x381C2000, 0x381C4000, 0x381C6000, 0x381C8000, 0x381CA000, 0x381CC000, 0x381CE000, 0x381D0000, 0x381D2000, 0x381D4000, 0x381D6000, 0x381D8000, 0x381DA000, 0x381DC000, 0x381DE000,\n  0x381E0000, 0x381E2000, 0x381E4000, 0x381E6000, 0x381E8000, 0x381EA000, 0x381EC000, 0x381EE000, 0x381F0000, 0x381F2000, 0x381F4000, 0x381F6000, 0x381F8000, 0x381FA000, 0x381FC000, 0x381FE000,\n  0x38200000, 0x38202000, 0x38204000, 0x38206000, 0x38208000, 0x3820A000, 0x3820C000, 0x3820E000, 0x38210000, 0x38212000, 0x38214000, 0x38216000, 0x38218000, 0x3821A000, 0x3821C000, 0x3821E000,\n  0x38220000, 0x38222000, 0x38224000, 0x38226000, 0x38228000, 0x3822A000, 0x3822C000, 0x3822E000, 0x38230000, 0x38232000, 0x38234000, 0x38236000, 0x38238000, 0x3823A000, 0x3823C000, 0x3823E000,\n  0x38240000, 0x38242000, 0x38244000, 0x38246000, 0x38248000, 0x3824A000, 0x3824C000, 0x3824E000, 0x38250000, 0x38252000, 0x38254000, 0x38256000, 0x38258000, 0x3825A000, 0x3825C000, 0x3825E000,\n  0x38260000, 0x38262000, 0x38264000, 0x38266000, 0x38268000, 0x3826A000, 0x3826C000, 0x3826E000, 0x38270000, 0x38272000, 0x38274000, 0x38276000, 0x38278000, 0x3827A000, 0x3827C000, 0x3827E000,\n  0x38280000, 0x38282000, 0x38284000, 0x38286000, 0x38288000, 0x3828A000, 0x3828C000, 0x3828E000, 0x38290000, 0x38292000, 0x38294000, 0x38296000, 0x38298000, 0x3829A000, 0x3829C000, 0x3829E000,\n  0x382A0000, 0x382A2000, 0x382A4000, 0x382A6000, 0x382A8000, 0x382AA000, 0x382AC000, 0x382AE000, 0x382B0000, 0x382B2000, 0x382B4000, 0x382B6000, 0x382B8000, 0x382BA000, 0x382BC000, 0x382BE000,\n  0x382C0000, 0x382C2000, 0x382C4000, 0x382C6000, 0x382C8000, 0x382CA000, 0x382CC000, 0x382CE000, 0x382D0000, 0x382D2000, 0x382D4000, 0x382D6000, 0x382D8000, 0x382DA000, 0x382DC000, 0x382DE000,\n  0x382E0000, 0x382E2000, 0x382E4000, 0x382E6000, 0x382E8000, 0x382EA000, 0x382EC000, 0x382EE000, 0x382F0000, 0x382F2000, 0x382F4000, 0x382F6000, 0x382F8000, 0x38",
                   "2FA000, 0x382FC000, 0x382FE000,\n  0x38300000, 0x38302000, 0x38304000, 0x38306000, 0x38308000, 0x3830A000, 0x3830C000, 0x3830E000, 0x38310000, 0x38312000, 0x38314000, 0x38316000, 0x38318000, 0x3831A000, 0x3831C000, 0x3831E000,\n  0x38320000, 0x38322000, 0x38324000, 0x38326000, 0x38328000, 0x3832A000, 0x3832C000, 0x3832E000, 0x38330000, 0x38332000, 0x38334000, 0x38336000, 0x38338000, 0x3833A000, 0x3833C000, 0x3833E000,\n  0x38340000, 0x38342000, 0x38344000, 0x38346000, 0x38348000, 0x3834A000, 0x3834C000, 0x3834E000, 0x38350000, 0x38352000, 0x38354000, 0x38356000, 0x38358000, 0x3835A000, 0x3835C000, 0x3835E000,\n  0x38360000, 0x38362000, 0x38364000, 0x38366000, 0x38368000, 0x3836A000, 0x3836C000, 0x3836E000, 0x38370000, 0x38372000, 0x38374000, 0x38376000, 0x38378000, 0x3837A000, 0x3837C000, 0x3837E000,\n  0x38380000, 0x38382000, 0x38384000, 0x38386000, 0x38388000, 0x3838A000, 0x3838C000, 0x3838E000, 0x38390000, 0x38392000, 0x38394000, 0x38396000, 0x38398000, 0x3839A000, 0x3839C000, 0x3839E000,\n  0x383A0000, 0x383A2000, 0x383A4000, 0x383A6000, 0x383A8000, 0x383AA000, 0x383AC000, 0x383AE000, 0x383B0000, 0x383B2000, 0x383B4000, 0x383B6000, 0x383B8000, 0x383BA000, 0x383BC000, 0x383BE000,\n  0x383C0000, 0x383C2000, 0x383C4000, 0x383C6000, 0x383C8000, 0x383CA000, 0x383CC000, 0x383CE000, 0x383D0000, 0x383D2000, 0x383D4000, 0x383D6000, 0x383D8000, 0x383DA000, 0x383DC000, 0x383DE000,\n  0x383E0000, 0x383E2000, 0x383E4000, 0x383E6000, 0x383E8000, 0x383EA000, 0x383EC000, 0x383EE000, 0x383F0000, 0x383F2000, 0x383F4000, 0x383F6000, 0x383F8000, 0x383FA000, 0x383FC000, 0x383FE000,\n  0x38400000, 0x38402000, 0x38404000, 0x38406000, 0x38408000, 0x3840A000, 0x3840C000, 0x3840E000, 0x38410000, 0x38412000, 0x38414000, 0x38416000, 0x38418000, 0x3841A000, 0x3841C000, 0x3841E000,\n  0x38420000, 0x38422000, 0x38424000, 0x38426000, 0x38428000, 0x3842A000, 0x3842C000, 0x3842E000, 0x38430000, 0x38432000, 0x38434000, 0x38436000, 0x38438000, 0x3843A000, 0x3843C000, 0x3843E000,\n  0x38440000, 0x38442000, 0x",
                   "38444000, 0x38446000, 0x38448000, 0x3844A000, 0x3844C000, 0x3844E000, 0x38450000, 0x38452000, 0x38454000, 0x38456000, 0x38458000, 0x3845A000, 0x3845C000, 0x3845E000,\n  0x38460000, 0x38462000, 0x38464000, 0x38466000, 0x38468000, 0x3846A000, 0x3846C000, 0x3846E000, 0x38470000, 0x38472000, 0x38474000, 0x38476000, 0x38478000, 0x3847A000, 0x3847C000, 0x3847E000,\n  0x38480000, 0x38482000, 0x38484000, 0x38486000, 0x38488000, 0x3848A000, 0x3848C000, 0x3848E000, 0x38490000, 0x38492000, 0x38494000, 0x38496000, 0x38498000, 0x3849A000, 0x3849C000, 0x3849E000,\n  0x384A0000, 0x384A2000, 0x384A4000, 0x384A6000, 0x384A8000, 0x384AA000, 0x384AC000, 0x384AE000, 0x384B0000, 0x384B2000, 0x384B4000, 0x384B6000, 0x384B8000, 0x384BA000, 0x384BC000, 0x384BE000,\n  0x384C0000, 0x384C2000, 0x384C4000, 0x384C6000, 0x384C8000, 0x384CA000, 0x384CC000, 0x384CE000, 0x384D0000, 0x384D2000, 0x384D4000, 0x384D6000, 0x384D8000, 0x384DA000, 0x384DC000, 0x384DE000,\n  0x384E0000, 0x384E2000, 0x384E4000, 0x384E6000, 0x384E8000, 0x384EA000, 0x384EC000, 0x384EE000, 0x384F0000, 0x384F2000, 0x384F4000, 0x384F6000, 0x384F8000, 0x384FA000, 0x384FC000, 0x384FE000,\n  0x38500000, 0x38502000, 0x38504000, 0x38506000, 0x38508000, 0x3850A000, 0x3850C000, 0x3850E000, 0x38510000, 0x38512000, 0x38514000, 0x38516000, 0x38518000, 0x3851A000, 0x3851C000, 0x3851E000,\n  0x38520000, 0x38522000, 0x38524000, 0x38526000, 0x38528000, 0x3852A000, 0x3852C000, 0x3852E000, 0x38530000, 0x38532000, 0x38534000, 0x38536000, 0x38538000, 0x3853A000, 0x3853C000, 0x3853E000,\n  0x38540000, 0x38542000, 0x38544000, 0x38546000, 0x38548000, 0x3854A000, 0x3854C000, 0x3854E000, 0x38550000, 0x38552000, 0x38554000, 0x38556000, 0x38558000, 0x3855A000, 0x3855C000, 0x3855E000,\n  0x38560000, 0x38562000, 0x38564000, 0x38566000, 0x38568000, 0x3856A000, 0x3856C000, 0x3856E000, 0x38570000, 0x38572000, 0x38574000, 0x38576000, 0x38578000, 0x3857A000, 0x3857C000, 0x3857E000,\n  0x38580000, 0x38582000, 0x38584000, 0x38586000, 0x38588000, 0x3858A000, 0x3858C000, 0x",
                   "3858E000, 0x38590000, 0x38592000, 0x38594000, 0x38596000, 0x38598000, 0x3859A000, 0x3859C000, 0x3859E000,\n  0x385A0000, 0x385A2000, 0x385A4000, 0x385A6000, 0x385A8000, 0x385AA000, 0x385AC000, 0x385AE000, 0x385B0000, 0x385B2000, 0x385B4000, 0x385B6000, 0x385B8000, 0x385BA000, 0x385BC000, 0x385BE000,\n  0x385C0000, 0x385C2000, 0x385C4000, 0x385C6000, 0x385C8000, 0x385CA000, 0x385CC000, 0x385CE000, 0x385D0000, 0x385D2000, 0x385D4000, 0x385D6000, 0x385D8000, 0x385DA000, 0x385DC000, 0x385DE000,\n  0x385E0000, 0x385E2000, 0x385E4000, 0x385E6000, 0x385E8000, 0x385EA000, 0x385EC000, 0x385EE000, 0x385F0000, 0x385F2000, 0x385F4000, 0x385F6000, 0x385F8000, 0x385FA000, 0x385FC000, 0x385FE000,\n  0x38600000, 0x38602000, 0x38604000, 0x38606000, 0x38608000, 0x3860A000, 0x3860C000, 0x3860E000, 0x38610000, 0x38612000, 0x38614000, 0x38616000, 0x38618000, 0x3861A000, 0x3861C000, 0x3861E000,\n  0x38620000, 0x38622000, 0x38624000, 0x38626000, 0x38628000, 0x3862A000, 0x3862C000, 0x3862E000, 0x38630000, 0x38632000, 0x38634000, 0x38636000, 0x38638000, 0x3863A000, 0x3863C000, 0x3863E000,\n  0x38640000, 0x38642000, 0x38644000, 0x38646000, 0x38648000, 0x3864A000, 0x3864C000, 0x3864E000, 0x38650000, 0x38652000, 0x38654000, 0x38656000, 0x38658000, 0x3865A000, 0x3865C000, 0x3865E000,\n  0x38660000, 0x38662000, 0x38664000, 0x38666000, 0x38668000, 0x3866A000, 0x3866C000, 0x3866E000, 0x38670000, 0x38672000, 0x38674000, 0x38676000, 0x38678000, 0x3867A000, 0x3867C000, 0x3867E000,\n  0x38680000, 0x38682000, 0x38684000, 0x38686000, 0x38688000, 0x3868A000, 0x3868C000, 0x3868E000, 0x38690000, 0x38692000, 0x38694000, 0x38696000, 0x38698000, 0x3869A000, 0x3869C000, 0x3869E000,\n  0x386A0000, 0x386A2000, 0x386A4000, 0x386A6000, 0x386A8000, 0x386AA000, 0x386AC000, 0x386AE000, 0x386B0000, 0x386B2000, 0x386B4000, 0x386B6000, 0x386B8000, 0x386BA000, 0x386BC000, 0x386BE000,\n  0x386C0000, 0x386C2000, 0x386C4000, 0x386C6000, 0x386C8000, 0x386CA000, 0x386CC000, 0x386CE000, 0x386D0000, 0x386D2000, 0x386D4000, 0x386D6000, 0x",
                   "386D8000, 0x386DA000, 0x386DC000, 0x386DE000,\n  0x386E0000, 0x386E2000, 0x386E4000, 0x386E6000, 0x386E8000, 0x386EA000, 0x386EC000, 0x386EE000, 0x386F0000, 0x386F2000, 0x386F4000, 0x386F6000, 0x386F8000, 0x386FA000, 0x386FC000, 0x386FE000,\n  0x38700000, 0x38702000, 0x38704000, 0x38706000, 0x38708000, 0x3870A000, 0x3870C000, 0x3870E000, 0x38710000, 0x38712000, 0x38714000, 0x38716000, 0x38718000, 0x3871A000, 0x3871C000, 0x3871E000,\n  0x38720000, 0x38722000, 0x38724000, 0x38726000, 0x38728000, 0x3872A000, 0x3872C000, 0x3872E000, 0x38730000, 0x38732000, 0x38734000, 0x38736000, 0x38738000, 0x3873A000, 0x3873C000, 0x3873E000,\n  0x38740000, 0x38742000, 0x38744000, 0x38746000, 0x38748000, 0x3874A000, 0x3874C000, 0x3874E000, 0x38750000, 0x38752000, 0x38754000, 0x38756000, 0x38758000, 0x3875A000, 0x3875C000, 0x3875E000,\n  0x38760000, 0x38762000, 0x38764000, 0x38766000, 0x38768000, 0x3876A000, 0x3876C000, 0x3876E000, 0x38770000, 0x38772000, 0x38774000, 0x38776000, 0x38778000, 0x3877A000, 0x3877C000, 0x3877E000,\n  0x38780000, 0x38782000, 0x38784000, 0x38786000, 0x38788000, 0x3878A000, 0x3878C000, 0x3878E000, 0x38790000, 0x38792000, 0x38794000, 0x38796000, 0x38798000, 0x3879A000, 0x3879C000, 0x3879E000,\n  0x387A0000, 0x387A2000, 0x387A4000, 0x387A6000, 0x387A8000, 0x387AA000, 0x387AC000, 0x387AE000, 0x387B0000, 0x387B2000, 0x387B4000, 0x387B6000, 0x387B8000, 0x387BA000, 0x387BC000, 0x387BE000,\n  0x387C0000, 0x387C2000, 0x387C4000, 0x387C6000, 0x387C8000, 0x387CA000, 0x387CC000, 0x387CE000, 0x387D0000, 0x387D2000, 0x387D4000, 0x387D6000, 0x387D8000, 0x387DA000, 0x387DC000, 0x387DE000,\n  0x387E0000, 0x387E2000, 0x387E4000, 0x387E6000, 0x387E8000, 0x387EA000, 0x387EC000, 0x387EE000, 0x387F0000, 0x387F2000, 0x387F4000, 0x387F6000, 0x387F8000, 0x387FA000, 0x387FC000, 0x387FE000 };\n__constant static const uint32_t exponent_table[64] = {\n  0x00000000, 0x00800000, 0x01000000, 0x01800000, 0x02000000, 0x02800000, 0x03000000, 0x03800000, 0x04000000, 0x04800000, 0x05000000, 0x05800000, 0x06",
                   "000000, 0x06800000, 0x07000000, 0x07800000,\n  0x08000000, 0x08800000, 0x09000000, 0x09800000, 0x0A000000, 0x0A800000, 0x0B000000, 0x0B800000, 0x0C000000, 0x0C800000, 0x0D000000, 0x0D800000, 0x0E000000, 0x0E800000, 0x0F000000, 0x47800000,\n  0x80000000, 0x80800000, 0x81000000, 0x81800000, 0x82000000, 0x82800000, 0x83000000, 0x83800000, 0x84000000, 0x84800000, 0x85000000, 0x85800000, 0x86000000, 0x86800000, 0x87000000, 0x87800000,\n  0x88000000, 0x88800000, 0x89000000, 0x89800000, 0x8A000000, 0x8A800000, 0x8B000000, 0x8B800000, 0x8C000000, 0x8C800000, 0x8D000000, 0x8D800000, 0x8E000000, 0x8E800000, 0x8F000000, 0xC7800000 };\n__constant static const unsigned short offset_table[64] = {\n  0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n  0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024 };\n\nstatic uint16_t float2halfbits(float value) {\n  union { float x; uint32_t y; } u;\n  u.x = value;\n  uint32_t bits = u.y;\n\n  uint16_t hbits = base_table[bits>>23] + (uint16_t)((bits&0x7FFFFF)>>shift_table[bits>>23]);;\n\n  return hbits;\n}\n\nstatic float halfbits2float(uint16_t value) {\n  uint32_t bits = mantissa_table[offset_table[value>>10]+(value&0x3FF)] + exponent_table[value>>10];\n\n  union { uint32_t x; float y; } u;\n  u.x = bits;\n  return u.y;\n}\n\n// End of half.h.\n// Start of scalar.h.\n\n// Implementation of the primitive scalar operations.  Very\n// repetitive.  This code is inserted directly into both CUDA and\n// OpenCL programs, as well as the CPU code, so it has some #ifdefs to\n// work everywhere.  Some operations are defined as macros because\n// this allows us to use them as constant expressions in things like\n// array sizes and static initialisers.\n\n// Some of the #ifdefs are because OpenCL uses type-generic f",
                   "unctions\n// for some operations (e.g. sqrt), while C and CUDA sensibly use\n// distinct functions for different precisions (e.g. sqrtf() and\n// sqrt()).  This is quite annoying.  Due to C's unfortunate casting\n// rules, it is also really easy to accidentally implement\n// floating-point functions in the wrong precision, so be careful.\n\n// Double-precision definitions are only included if the preprocessor\n// macro FUTHARK_F64_ENABLED is set.\n\nstatic inline uint8_t add8(uint8_t x, uint8_t y) {\n  return x + y;\n}\n\nstatic inline uint16_t add16(uint16_t x, uint16_t y) {\n  return x + y;\n}\n\nstatic inline uint32_t add32(uint32_t x, uint32_t y) {\n  return x + y;\n}\n\nstatic inline uint64_t add64(uint64_t x, uint64_t y) {\n  return x + y;\n}\n\nstatic inline uint8_t sub8(uint8_t x, uint8_t y) {\n  return x - y;\n}\n\nstatic inline uint16_t sub16(uint16_t x, uint16_t y) {\n  return x - y;\n}\n\nstatic inline uint32_t sub32(uint32_t x, uint32_t y) {\n  return x - y;\n}\n\nstatic inline uint64_t sub64(uint64_t x, uint64_t y) {\n  return x - y;\n}\n\nstatic inline uint8_t mul8(uint8_t x, uint8_t y) {\n  return x * y;\n}\n\nstatic inline uint16_t mul16(uint16_t x, uint16_t y) {\n  return x * y;\n}\n\nstatic inline uint32_t mul32(uint32_t x, uint32_t y) {\n  return x * y;\n}\n\nstatic inline uint64_t mul64(uint64_t x, uint64_t y) {\n  return x * y;\n}\n\nstatic inline uint8_t udiv8(uint8_t x, uint8_t y) {\n  return x / y;\n}\n\nstatic inline uint16_t udiv16(uint16_t x, uint16_t y) {\n  return x / y;\n}\n\nstatic inline uint32_t udiv32(uint32_t x, uint32_t y) {\n  return x / y;\n}\n\nstatic inline uint64_t udiv64(uint64_t x, uint64_t y) {\n  return x / y;\n}\n\nstatic inline uint8_t udiv_up8(uint8_t x, uint8_t y) {\n  return (x + y - 1) / y;\n}\n\nstatic inline uint16_t udiv_up16(uint16_t x, uint16_t y) {\n  return (x + y - 1) / y;\n}\n\nstatic inline uint32_t udiv_up32(uint32_t x, uint32_t y) {\n  return (x + y - 1) / y;\n}\n\nstatic inline uint64_t udiv_up64(uint64_t x, uint64_t y) {\n  return (x + y - 1) / y;\n}\n\nstatic inline uint8_t umod8(uint8_t ",
                   "x, uint8_t y) {\n  return x % y;\n}\n\nstatic inline uint16_t umod16(uint16_t x, uint16_t y) {\n  return x % y;\n}\n\nstatic inline uint32_t umod32(uint32_t x, uint32_t y) {\n  return x % y;\n}\n\nstatic inline uint64_t umod64(uint64_t x, uint64_t y) {\n  return x % y;\n}\n\nstatic inline uint8_t udiv_safe8(uint8_t x, uint8_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline uint16_t udiv_safe16(uint16_t x, uint16_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline uint32_t udiv_safe32(uint32_t x, uint32_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline uint64_t udiv_safe64(uint64_t x, uint64_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline uint8_t udiv_up_safe8(uint8_t x, uint8_t y) {\n  return y == 0 ? 0 : (x + y - 1) / y;\n}\n\nstatic inline uint16_t udiv_up_safe16(uint16_t x, uint16_t y) {\n  return y == 0 ? 0 : (x + y - 1) / y;\n}\n\nstatic inline uint32_t udiv_up_safe32(uint32_t x, uint32_t y) {\n  return y == 0 ? 0 : (x + y - 1) / y;\n}\n\nstatic inline uint64_t udiv_up_safe64(uint64_t x, uint64_t y) {\n  return y == 0 ? 0 : (x + y - 1) / y;\n}\n\nstatic inline uint8_t umod_safe8(uint8_t x, uint8_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline uint16_t umod_safe16(uint16_t x, uint16_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline uint32_t umod_safe32(uint32_t x, uint32_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline uint64_t umod_safe64(uint64_t x, uint64_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline int8_t sdiv8(int8_t x, int8_t y) {\n  int8_t q = x / y;\n  int8_t r = x % y;\n\n  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);\n}\n\nstatic inline int16_t sdiv16(int16_t x, int16_t y) {\n  int16_t q = x / y;\n  int16_t r = x % y;\n\n  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);\n}\n\nstatic inline int32_t sdiv32(int32_t x, int32_t y) {\n  int32_t q = x / y;\n  int32_t r = x % y;\n\n  return q - ((r != 0 && r < 0 != y < 0) ? 1 : 0);\n}\n\nstatic inline int64_t sdiv64(int64_t x, int64_t y) {\n  int64_t q = x / y;\n  int64_t r = x % y;\n\n  return q - ((r != 0 && r < 0 != y < 0) ? 1",
                   " : 0);\n}\n\nstatic inline int8_t sdiv_up8(int8_t x, int8_t y) {\n  return sdiv8(x + y - 1, y);\n}\n\nstatic inline int16_t sdiv_up16(int16_t x, int16_t y) {\n  return sdiv16(x + y - 1, y);\n}\n\nstatic inline int32_t sdiv_up32(int32_t x, int32_t y) {\n  return sdiv32(x + y - 1, y);\n}\n\nstatic inline int64_t sdiv_up64(int64_t x, int64_t y) {\n  return sdiv64(x + y - 1, y);\n}\n\nstatic inline int8_t smod8(int8_t x, int8_t y) {\n  int8_t r = x % y;\n\n  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);\n}\n\nstatic inline int16_t smod16(int16_t x, int16_t y) {\n  int16_t r = x % y;\n\n  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);\n}\n\nstatic inline int32_t smod32(int32_t x, int32_t y) {\n  int32_t r = x % y;\n\n  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);\n}\n\nstatic inline int64_t smod64(int64_t x, int64_t y) {\n  int64_t r = x % y;\n\n  return r + (r == 0 || (x > 0 && y > 0) || (x < 0 && y < 0) ? 0 : y);\n}\n\nstatic inline int8_t sdiv_safe8(int8_t x, int8_t y) {\n  return y == 0 ? 0 : sdiv8(x, y);\n}\n\nstatic inline int16_t sdiv_safe16(int16_t x, int16_t y) {\n  return y == 0 ? 0 : sdiv16(x, y);\n}\n\nstatic inline int32_t sdiv_safe32(int32_t x, int32_t y) {\n  return y == 0 ? 0 : sdiv32(x, y);\n}\n\nstatic inline int64_t sdiv_safe64(int64_t x, int64_t y) {\n  return y == 0 ? 0 : sdiv64(x, y);\n}\n\nstatic inline int8_t sdiv_up_safe8(int8_t x, int8_t y) {\n  return sdiv_safe8(x + y - 1, y);\n}\n\nstatic inline int16_t sdiv_up_safe16(int16_t x, int16_t y) {\n  return sdiv_safe16(x + y - 1, y);\n}\n\nstatic inline int32_t sdiv_up_safe32(int32_t x, int32_t y) {\n  return sdiv_safe32(x + y - 1, y);\n}\n\nstatic inline int64_t sdiv_up_safe64(int64_t x, int64_t y) {\n  return sdiv_safe64(x + y - 1, y);\n}\n\nstatic inline int8_t smod_safe8(int8_t x, int8_t y) {\n  return y == 0 ? 0 : smod8(x, y);\n}\n\nstatic inline int16_t smod_safe16(int16_t x, int16_t y) {\n  return y == 0 ? 0 : smod16(x, y);\n}\n\nstatic inline int32_t smod_safe32(int32_t x, int32_t y) {\n  return y == 0 ? 0",
                   " : smod32(x, y);\n}\n\nstatic inline int64_t smod_safe64(int64_t x, int64_t y) {\n  return y == 0 ? 0 : smod64(x, y);\n}\n\nstatic inline int8_t squot8(int8_t x, int8_t y) {\n  return x / y;\n}\n\nstatic inline int16_t squot16(int16_t x, int16_t y) {\n  return x / y;\n}\n\nstatic inline int32_t squot32(int32_t x, int32_t y) {\n  return x / y;\n}\n\nstatic inline int64_t squot64(int64_t x, int64_t y) {\n  return x / y;\n}\n\nstatic inline int8_t srem8(int8_t x, int8_t y) {\n  return x % y;\n}\n\nstatic inline int16_t srem16(int16_t x, int16_t y) {\n  return x % y;\n}\n\nstatic inline int32_t srem32(int32_t x, int32_t y) {\n  return x % y;\n}\n\nstatic inline int64_t srem64(int64_t x, int64_t y) {\n  return x % y;\n}\n\nstatic inline int8_t squot_safe8(int8_t x, int8_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline int16_t squot_safe16(int16_t x, int16_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline int32_t squot_safe32(int32_t x, int32_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline int64_t squot_safe64(int64_t x, int64_t y) {\n  return y == 0 ? 0 : x / y;\n}\n\nstatic inline int8_t srem_safe8(int8_t x, int8_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline int16_t srem_safe16(int16_t x, int16_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline int32_t srem_safe32(int32_t x, int32_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline int64_t srem_safe64(int64_t x, int64_t y) {\n  return y == 0 ? 0 : x % y;\n}\n\nstatic inline int8_t smin8(int8_t x, int8_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline int16_t smin16(int16_t x, int16_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline int32_t smin32(int32_t x, int32_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline int64_t smin64(int64_t x, int64_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline uint8_t umin8(uint8_t x, uint8_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline uint16_t umin16(uint16_t x, uint16_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline uint32_t umin32(uint32_t x, uint32_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline uint64_t umin64(uint",
                   "64_t x, uint64_t y) {\n  return x < y ? x : y;\n}\n\nstatic inline int8_t smax8(int8_t x, int8_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline int16_t smax16(int16_t x, int16_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline int32_t smax32(int32_t x, int32_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline int64_t smax64(int64_t x, int64_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline uint8_t umax8(uint8_t x, uint8_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline uint16_t umax16(uint16_t x, uint16_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline uint32_t umax32(uint32_t x, uint32_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline uint64_t umax64(uint64_t x, uint64_t y) {\n  return x < y ? y : x;\n}\n\nstatic inline uint8_t shl8(uint8_t x, uint8_t y) {\n  return (uint8_t)(x << y);\n}\n\nstatic inline uint16_t shl16(uint16_t x, uint16_t y) {\n  return (uint16_t)(x << y);\n}\n\nstatic inline uint32_t shl32(uint32_t x, uint32_t y) {\n  return x << y;\n}\n\nstatic inline uint64_t shl64(uint64_t x, uint64_t y) {\n  return x << y;\n}\n\nstatic inline uint8_t lshr8(uint8_t x, uint8_t y) {\n  return x >> y;\n}\n\nstatic inline uint16_t lshr16(uint16_t x, uint16_t y) {\n  return x >> y;\n}\n\nstatic inline uint32_t lshr32(uint32_t x, uint32_t y) {\n  return x >> y;\n}\n\nstatic inline uint64_t lshr64(uint64_t x, uint64_t y) {\n  return x >> y;\n}\n\nstatic inline int8_t ashr8(int8_t x, int8_t y) {\n  return x >> y;\n}\n\nstatic inline int16_t ashr16(int16_t x, int16_t y) {\n  return x >> y;\n}\n\nstatic inline int32_t ashr32(int32_t x, int32_t y) {\n  return x >> y;\n}\n\nstatic inline int64_t ashr64(int64_t x, int64_t y) {\n  return x >> y;\n}\n\nstatic inline uint8_t and8(uint8_t x, uint8_t y) {\n  return x & y;\n}\n\nstatic inline uint16_t and16(uint16_t x, uint16_t y) {\n  return x & y;\n}\n\nstatic inline uint32_t and32(uint32_t x, uint32_t y) {\n  return x & y;\n}\n\nstatic inline uint64_t and64(uint64_t x, uint64_t y) {\n  return x & y;\n}\n\nstatic inline uint8_t or8(uint8_t x, uint8_t y) {\n  return x | y;\n}\n\nstatic inline uint16_t or16(uint16_t x,",
                   " uint16_t y) {\n  return x | y;\n}\n\nstatic inline uint32_t or32(uint32_t x, uint32_t y) {\n  return x | y;\n}\n\nstatic inline uint64_t or64(uint64_t x, uint64_t y) {\n  return x | y;\n}\n\nstatic inline uint8_t xor8(uint8_t x, uint8_t y) {\n  return x ^ y;\n}\n\nstatic inline uint16_t xor16(uint16_t x, uint16_t y) {\n  return x ^ y;\n}\n\nstatic inline uint32_t xor32(uint32_t x, uint32_t y) {\n  return x ^ y;\n}\n\nstatic inline uint64_t xor64(uint64_t x, uint64_t y) {\n  return x ^ y;\n}\n\nstatic inline bool ult8(uint8_t x, uint8_t y) {\n  return x < y;\n}\n\nstatic inline bool ult16(uint16_t x, uint16_t y) {\n  return x < y;\n}\n\nstatic inline bool ult32(uint32_t x, uint32_t y) {\n  return x < y;\n}\n\nstatic inline bool ult64(uint64_t x, uint64_t y) {\n  return x < y;\n}\n\nstatic inline bool ule8(uint8_t x, uint8_t y) {\n  return x <= y;\n}\n\nstatic inline bool ule16(uint16_t x, uint16_t y) {\n  return x <= y;\n}\n\nstatic inline bool ule32(uint32_t x, uint32_t y) {\n  return x <= y;\n}\n\nstatic inline bool ule64(uint64_t x, uint64_t y) {\n  return x <= y;\n}\n\nstatic inline bool slt8(int8_t x, int8_t y) {\n  return x < y;\n}\n\nstatic inline bool slt16(int16_t x, int16_t y) {\n  return x < y;\n}\n\nstatic inline bool slt32(int32_t x, int32_t y) {\n  return x < y;\n}\n\nstatic inline bool slt64(int64_t x, int64_t y) {\n  return x < y;\n}\n\nstatic inline bool sle8(int8_t x, int8_t y) {\n  return x <= y;\n}\n\nstatic inline bool sle16(int16_t x, int16_t y) {\n  return x <= y;\n}\n\nstatic inline bool sle32(int32_t x, int32_t y) {\n  return x <= y;\n}\n\nstatic inline bool sle64(int64_t x, int64_t y) {\n  return x <= y;\n}\n\nstatic inline uint8_t pow8(uint8_t x, uint8_t y) {\n  uint8_t res = 1, rem = y;\n\n  while (rem != 0) {\n    if (rem & 1)\n      res *= x;\n    rem >>= 1;\n    x *= x;\n  }\n  return res;\n}\n\nstatic inline uint16_t pow16(uint16_t x, uint16_t y) {\n  uint16_t res = 1, rem = y;\n\n  while (rem != 0) {\n    if (rem & 1)\n      res *= x;\n    rem >>= 1;\n    x *= x;\n  }\n  return res;\n}\n\nstatic inline uint32_t pow32(uint32_t x, uint32_t y) {\n  ui",
                   "nt32_t res = 1, rem = y;\n\n  while (rem != 0) {\n    if (rem & 1)\n      res *= x;\n    rem >>= 1;\n    x *= x;\n  }\n  return res;\n}\n\nstatic inline uint64_t pow64(uint64_t x, uint64_t y) {\n  uint64_t res = 1, rem = y;\n\n  while (rem != 0) {\n    if (rem & 1)\n      res *= x;\n    rem >>= 1;\n    x *= x;\n  }\n  return res;\n}\n\nstatic inline bool itob_i8_bool(int8_t x) {\n  return x;\n}\n\nstatic inline bool itob_i16_bool(int16_t x) {\n  return x;\n}\n\nstatic inline bool itob_i32_bool(int32_t x) {\n  return x;\n}\n\nstatic inline bool itob_i64_bool(int64_t x) {\n  return x;\n}\n\nstatic inline int8_t btoi_bool_i8(bool x) {\n  return x;\n}\n\nstatic inline int16_t btoi_bool_i16(bool x) {\n  return x;\n}\n\nstatic inline int32_t btoi_bool_i32(bool x) {\n  return x;\n}\n\nstatic inline int64_t btoi_bool_i64(bool x) {\n  return x;\n}\n\n#define sext_i8_i8(x) ((int8_t) (int8_t) (x))\n#define sext_i8_i16(x) ((int16_t) (int8_t) (x))\n#define sext_i8_i32(x) ((int32_t) (int8_t) (x))\n#define sext_i8_i64(x) ((int64_t) (int8_t) (x))\n#define sext_i16_i8(x) ((int8_t) (int16_t) (x))\n#define sext_i16_i16(x) ((int16_t) (int16_t) (x))\n#define sext_i16_i32(x) ((int32_t) (int16_t) (x))\n#define sext_i16_i64(x) ((int64_t) (int16_t) (x))\n#define sext_i32_i8(x) ((int8_t) (int32_t) (x))\n#define sext_i32_i16(x) ((int16_t) (int32_t) (x))\n#define sext_i32_i32(x) ((int32_t) (int32_t) (x))\n#define sext_i32_i64(x) ((int64_t) (int32_t) (x))\n#define sext_i64_i8(x) ((int8_t) (int64_t) (x))\n#define sext_i64_i16(x) ((int16_t) (int64_t) (x))\n#define sext_i64_i32(x) ((int32_t) (int64_t) (x))\n#define sext_i64_i64(x) ((int64_t) (int64_t) (x))\n#define zext_i8_i8(x) ((int8_t) (uint8_t) (x))\n#define zext_i8_i16(x) ((int16_t) (uint8_t) (x))\n#define zext_i8_i32(x) ((int32_t) (uint8_t) (x))\n#define zext_i8_i64(x) ((int64_t) (uint8_t) (x))\n#define zext_i16_i8(x) ((int8_t) (uint16_t) (x))\n#define zext_i16_i16(x) ((int16_t) (uint16_t) (x))\n#define zext_i16_i32(x) ((int32_t) (uint16_t) (x))\n#define zext_i16_i64(x) ((int64_t) (uint16_t) (x))\n#define zext_i32_i8(x",
                   ") ((int8_t) (uint32_t) (x))\n#define zext_i32_i16(x) ((int16_t) (uint32_t) (x))\n#define zext_i32_i32(x) ((int32_t) (uint32_t) (x))\n#define zext_i32_i64(x) ((int64_t) (uint32_t) (x))\n#define zext_i64_i8(x) ((int8_t) (uint64_t) (x))\n#define zext_i64_i16(x) ((int16_t) (uint64_t) (x))\n#define zext_i64_i32(x) ((int32_t) (uint64_t) (x))\n#define zext_i64_i64(x) ((int64_t) (uint64_t) (x))\n\nstatic int8_t abs8(int8_t x) {\n  return (int8_t)abs(x);\n}\n\nstatic int16_t abs16(int16_t x) {\n  return (int16_t)abs(x);\n}\n\nstatic int32_t abs32(int32_t x) {\n  return abs(x);\n}\n\nstatic int64_t abs64(int64_t x) {\n#if defined(__OPENCL_VERSION__)\n  return abs(x);\n#else\n  return llabs(x);\n#endif\n}\n\n#if defined(__OPENCL_VERSION__)\nstatic int32_t futrts_popc8(int8_t x) {\n  return popcount(x);\n}\n\nstatic int32_t futrts_popc16(int16_t x) {\n  return popcount(x);\n}\n\nstatic int32_t futrts_popc32(int32_t x) {\n  return popcount(x);\n}\n\nstatic int32_t futrts_popc64(int64_t x) {\n  return popcount(x);\n}\n#elif defined(__CUDA_ARCH__)\n\nstatic int32_t futrts_popc8(int8_t x) {\n  return __popc(zext_i8_i32(x));\n}\n\nstatic int32_t futrts_popc16(int16_t x) {\n  return __popc(zext_i16_i32(x));\n}\n\nstatic int32_t futrts_popc32(int32_t x) {\n  return __popc(x);\n}\n\nstatic int32_t futrts_popc64(int64_t x) {\n  return __popcll(x);\n}\n\n#else // Not OpenCL or CUDA, but plain C.\n\nstatic int32_t futrts_popc8(uint8_t x) {\n  int c = 0;\n  for (; x; ++c) { x &= x - 1; }\n  return c;\n}\n\nstatic int32_t futrts_popc16(uint16_t x) {\n  int c = 0;\n  for (; x; ++c) { x &= x - 1; }\n  return c;\n}\n\nstatic int32_t futrts_popc32(uint32_t x) {\n  int c = 0;\n  for (; x; ++c) { x &= x - 1; }\n  return c;\n}\n\nstatic int32_t futrts_popc64(uint64_t x) {\n  int c = 0;\n  for (; x; ++c) { x &= x - 1; }\n  return c;\n}\n#endif\n\n#if defined(__OPENCL_VERSION__)\nstatic uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {\n  return mul_hi(a, b);\n}\n\nstatic uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {\n  return mul_hi(a, b);\n}\n\nstatic uint32_t futrts_mul_hi32(uint32_t a, uint",
                   "32_t b) {\n  return mul_hi(a, b);\n}\n\nstatic uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {\n  return mul_hi(a, b);\n}\n\n#elif defined(__CUDA_ARCH__)\n\nstatic uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {\n  uint16_t aa = a;\n  uint16_t bb = b;\n\n  return aa * bb >> 8;\n}\n\nstatic uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {\n  uint32_t aa = a;\n  uint32_t bb = b;\n\n  return aa * bb >> 16;\n}\n\nstatic uint32_t futrts_mul_hi32(uint32_t a, uint32_t b) {\n  return mulhi(a, b);\n}\n\nstatic uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {\n  return mul64hi(a, b);\n}\n\n#else // Not OpenCL or CUDA, but plain C.\n\nstatic uint8_t futrts_mul_hi8(uint8_t a, uint8_t b) {\n  uint16_t aa = a;\n  uint16_t bb = b;\n\n  return aa * bb >> 8;\n}\n\nstatic uint16_t futrts_mul_hi16(uint16_t a, uint16_t b) {\n  uint32_t aa = a;\n  uint32_t bb = b;\n\n  return aa * bb >> 16;\n}\n\nstatic uint32_t futrts_mul_hi32(uint32_t a, uint32_t b) {\n  uint64_t aa = a;\n  uint64_t bb = b;\n\n  return aa * bb >> 32;\n}\n\nstatic uint64_t futrts_mul_hi64(uint64_t a, uint64_t b) {\n  __uint128_t aa = a;\n  __uint128_t bb = b;\n\n  return aa * bb >> 64;\n}\n#endif\n\n#if defined(__OPENCL_VERSION__)\nstatic uint8_t futrts_mad_hi8(uint8_t a, uint8_t b, uint8_t c) {\n  return mad_hi(a, b, c);\n}\n\nstatic uint16_t futrts_mad_hi16(uint16_t a, uint16_t b, uint16_t c) {\n  return mad_hi(a, b, c);\n}\n\nstatic uint32_t futrts_mad_hi32(uint32_t a, uint32_t b, uint32_t c) {\n  return mad_hi(a, b, c);\n}\n\nstatic uint64_t futrts_mad_hi64(uint64_t a, uint64_t b, uint64_t c) {\n  return mad_hi(a, b, c);\n}\n\n#else // Not OpenCL\n\nstatic uint8_t futrts_mad_hi8(uint8_t a, uint8_t b, uint8_t c) {\n  return futrts_mul_hi8(a, b) + c;\n}\n\nstatic uint16_t futrts_mad_hi16(uint16_t a, uint16_t b, uint16_t c) {\n  return futrts_mul_hi16(a, b) + c;\n}\n\nstatic uint32_t futrts_mad_hi32(uint32_t a, uint32_t b, uint32_t c) {\n  return futrts_mul_hi32(a, b) + c;\n}\n\nstatic uint64_t futrts_mad_hi64(uint64_t a, uint64_t b, uint64_t c) {\n  return futrts_mul_hi64(a, b) + c;\n}\n#endif\n\n#if defined",
                   "(__OPENCL_VERSION__)\nstatic int32_t futrts_clzz8(int8_t x) {\n  return clz(x);\n}\n\nstatic int32_t futrts_clzz16(int16_t x) {\n  return clz(x);\n}\n\nstatic int32_t futrts_clzz32(int32_t x) {\n  return clz(x);\n}\n\nstatic int32_t futrts_clzz64(int64_t x) {\n  return clz(x);\n}\n\n#elif defined(__CUDA_ARCH__)\n\nstatic int32_t futrts_clzz8(int8_t x) {\n  return __clz(zext_i8_i32(x)) - 24;\n}\n\nstatic int32_t futrts_clzz16(int16_t x) {\n  return __clz(zext_i16_i32(x)) - 16;\n}\n\nstatic int32_t futrts_clzz32(int32_t x) {\n  return __clz(x);\n}\n\nstatic int32_t futrts_clzz64(int64_t x) {\n  return __clzll(x);\n}\n\n#else // Not OpenCL or CUDA, but plain C.\n\nstatic int32_t futrts_clzz8(int8_t x) {\n  return x == 0 ? 8 : __builtin_clz((uint32_t)zext_i8_i32(x)) - 24;\n}\n\nstatic int32_t futrts_clzz16(int16_t x) {\n  return x == 0 ? 16 : __builtin_clz((uint32_t)zext_i16_i32(x)) - 16;\n}\n\nstatic int32_t futrts_clzz32(int32_t x) {\n  return x == 0 ? 32 : __builtin_clz((uint32_t)x);\n}\n\nstatic int32_t futrts_clzz64(int64_t x) {\n  return x == 0 ? 64 : __builtin_clzll((uint64_t)x);\n}\n#endif\n\n#if defined(__OPENCL_VERSION__)\nstatic int32_t futrts_ctzz8(int8_t x) {\n  int i = 0;\n  for (; i < 8 && (x & 1) == 0; i++, x >>= 1)\n    ;\n  return i;\n}\n\nstatic int32_t futrts_ctzz16(int16_t x) {\n  int i = 0;\n  for (; i < 16 && (x & 1) == 0; i++, x >>= 1)\n    ;\n  return i;\n}\n\nstatic int32_t futrts_ctzz32(int32_t x) {\n  int i = 0;\n  for (; i < 32 && (x & 1) == 0; i++, x >>= 1)\n    ;\n  return i;\n}\n\nstatic int32_t futrts_ctzz64(int64_t x) {\n  int i = 0;\n  for (; i < 64 && (x & 1) == 0; i++, x >>= 1)\n    ;\n  return i;\n}\n\n#elif defined(__CUDA_ARCH__)\n\nstatic int32_t futrts_ctzz8(int8_t x) {\n  int y = __ffs(x);\n  return y == 0 ? 8 : y - 1;\n}\n\nstatic int32_t futrts_ctzz16(int16_t x) {\n  int y = __ffs(x);\n  return y == 0 ? 16 : y - 1;\n}\n\nstatic int32_t futrts_ctzz32(int32_t x) {\n  int y = __ffs(x);\n  return y == 0 ? 32 : y - 1;\n}\n\nstatic int32_t futrts_ctzz64(int64_t x) {\n  int y = __ffsll(x);\n  return y == 0 ? 64 : y - 1;\n}\n\n#else // N",
                   "ot OpenCL or CUDA, but plain C.\n\nstatic int32_t futrts_ctzz8(int8_t x) {\n  return x == 0 ? 8 : __builtin_ctz((uint32_t)x);\n}\n\nstatic int32_t futrts_ctzz16(int16_t x) {\n  return x == 0 ? 16 : __builtin_ctz((uint32_t)x);\n}\n\nstatic int32_t futrts_ctzz32(int32_t x) {\n  return x == 0 ? 32 : __builtin_ctz((uint32_t)x);\n}\n\nstatic int32_t futrts_ctzz64(int64_t x) {\n  return x == 0 ? 64 : __builtin_ctzll((uint64_t)x);\n}\n#endif\n\nstatic inline float fdiv32(float x, float y) {\n  return x / y;\n}\n\nstatic inline float fadd32(float x, float y) {\n  return x + y;\n}\n\nstatic inline float fsub32(float x, float y) {\n  return x - y;\n}\n\nstatic inline float fmul32(float x, float y) {\n  return x * y;\n}\n\nstatic inline bool cmplt32(float x, float y) {\n  return x < y;\n}\n\nstatic inline bool cmple32(float x, float y) {\n  return x <= y;\n}\n\nstatic inline float sitofp_i8_f32(int8_t x) {\n  return (float) x;\n}\n\nstatic inline float sitofp_i16_f32(int16_t x) {\n  return (float) x;\n}\n\nstatic inline float sitofp_i32_f32(int32_t x) {\n  return (float) x;\n}\n\nstatic inline float sitofp_i64_f32(int64_t x) {\n  return (float) x;\n}\n\nstatic inline float uitofp_i8_f32(uint8_t x) {\n  return (float) x;\n}\n\nstatic inline float uitofp_i16_f32(uint16_t x) {\n  return (float) x;\n}\n\nstatic inline float uitofp_i32_f32(uint32_t x) {\n  return (float) x;\n}\n\nstatic inline float uitofp_i64_f32(uint64_t x) {\n  return (float) x;\n}\n\nstatic inline int8_t fptosi_f32_i8(float x) {\n  return (int8_t) x;\n}\n\nstatic inline int16_t fptosi_f32_i16(float x) {\n  return (int16_t) x;\n}\n\nstatic inline int32_t fptosi_f32_i32(float x) {\n  return (int32_t) x;\n}\n\nstatic inline int64_t fptosi_f32_i64(float x) {\n  return (int64_t) x;\n}\n\nstatic inline uint8_t fptoui_f32_i8(float x) {\n  return (uint8_t) x;\n}\n\nstatic inline uint16_t fptoui_f32_i16(float x) {\n  return (uint16_t) x;\n}\n\nstatic inline uint32_t fptoui_f32_i32(float x) {\n  return (uint32_t) x;\n}\n\nstatic inline uint64_t fptoui_f32_i64(float x) {\n  return (uint64_t) x;\n}\n\n#ifdef __OPENCL_VERSION__\n",
                   "static inline float fabs32(float x) {\n  return fabs(x);\n}\n\nstatic inline float fmax32(float x, float y) {\n  return fmax(x, y);\n}\n\nstatic inline float fmin32(float x, float y) {\n  return fmin(x, y);\n}\n\nstatic inline float fpow32(float x, float y) {\n  return pow(x, y);\n}\n\n#else // Not OpenCL, but CUDA or plain C.\n\nstatic inline float fabs32(float x) {\n  return fabsf(x);\n}\n\nstatic inline float fmax32(float x, float y) {\n  return fmaxf(x, y);\n}\n\nstatic inline float fmin32(float x, float y) {\n  return fminf(x, y);\n}\n\nstatic inline float fpow32(float x, float y) {\n  return powf(x, y);\n}\n#endif\n\nstatic inline bool futrts_isnan32(float x) {\n  return isnan(x);\n}\n\nstatic inline bool futrts_isinf32(float x) {\n  return isinf(x);\n}\n\n#ifdef __OPENCL_VERSION__\nstatic inline float futrts_log32(float x) {\n  return log(x);\n}\n\nstatic inline float futrts_log2_32(float x) {\n  return log2(x);\n}\n\nstatic inline float futrts_log10_32(float x) {\n  return log10(x);\n}\n\nstatic inline float futrts_sqrt32(float x) {\n  return sqrt(x);\n}\n\nstatic inline float futrts_exp32(float x) {\n  return exp(x);\n}\n\nstatic inline float futrts_cos32(float x) {\n  return cos(x);\n}\n\nstatic inline float futrts_sin32(float x) {\n  return sin(x);\n}\n\nstatic inline float futrts_tan32(float x) {\n  return tan(x);\n}\n\nstatic inline float futrts_acos32(float x) {\n  return acos(x);\n}\n\nstatic inline float futrts_asin32(float x) {\n  return asin(x);\n}\n\nstatic inline float futrts_atan32(float x) {\n  return atan(x);\n}\n\nstatic inline float futrts_cosh32(float x) {\n  return cosh(x);\n}\n\nstatic inline float futrts_sinh32(float x) {\n  return sinh(x);\n}\n\nstatic inline float futrts_tanh32(float x) {\n  return tanh(x);\n}\n\nstatic inline float futrts_acosh32(float x) {\n  return acosh(x);\n}\n\nstatic inline float futrts_asinh32(float x) {\n  return asinh(x);\n}\n\nstatic inline float futrts_atanh32(float x) {\n  return atanh(x);\n}\n\nstatic inline float futrts_atan2_32(float x, float y) {\n  return atan2(x, y);\n}\n\nstatic inline float futrts_hypot32(float ",
                   "x, float y) {\n  return hypot(x, y);\n}\n\nstatic inline float futrts_gamma32(float x) {\n  return tgamma(x);\n}\n\nstatic inline float futrts_lgamma32(float x) {\n  return lgamma(x);\n}\n\nstatic inline float fmod32(float x, float y) {\n  return fmod(x, y);\n}\n\nstatic inline float futrts_round32(float x) {\n  return rint(x);\n}\n\nstatic inline float futrts_floor32(float x) {\n  return floor(x);\n}\n\nstatic inline float futrts_ceil32(float x) {\n  return ceil(x);\n}\n\nstatic inline float futrts_lerp32(float v0, float v1, float t) {\n  return mix(v0, v1, t);\n}\n\nstatic inline float futrts_mad32(float a, float b, float c) {\n  return mad(a, b, c);\n}\n\nstatic inline float futrts_fma32(float a, float b, float c) {\n  return fma(a, b, c);\n}\n\n#else // Not OpenCL, but CUDA or plain C.\n\nstatic inline float futrts_log32(float x) {\n  return logf(x);\n}\n\nstatic inline float futrts_log2_32(float x) {\n  return log2f(x);\n}\n\nstatic inline float futrts_log10_32(float x) {\n  return log10f(x);\n}\n\nstatic inline float futrts_sqrt32(float x) {\n  return sqrtf(x);\n}\n\nstatic inline float futrts_exp32(float x) {\n  return expf(x);\n}\n\nstatic inline float futrts_cos32(float x) {\n  return cosf(x);\n}\n\nstatic inline float futrts_sin32(float x) {\n  return sinf(x);\n}\n\nstatic inline float futrts_tan32(float x) {\n  return tanf(x);\n}\n\nstatic inline float futrts_acos32(float x) {\n  return acosf(x);\n}\n\nstatic inline float futrts_asin32(float x) {\n  return asinf(x);\n}\n\nstatic inline float futrts_atan32(float x) {\n  return atanf(x);\n}\n\nstatic inline float futrts_cosh32(float x) {\n  return coshf(x);\n}\n\nstatic inline float futrts_sinh32(float x) {\n  return sinhf(x);\n}\n\nstatic inline float futrts_tanh32(float x) {\n  return tanhf(x);\n}\n\nstatic inline float futrts_acosh32(float x) {\n  return acoshf(x);\n}\n\nstatic inline float futrts_asinh32(float x) {\n  return asinhf(x);\n}\n\nstatic inline float futrts_atanh32(float x) {\n  return atanhf(x);\n}\n\nstatic inline float futrts_atan2_32(float x, float y) {\n  return atan2f(x, y);\n}\n\nstatic inline flo",
                   "at futrts_hypot32(float x, float y) {\n  return hypotf(x, y);\n}\n\nstatic inline float futrts_gamma32(float x) {\n  return tgammaf(x);\n}\n\nstatic inline float futrts_lgamma32(float x) {\n  return lgammaf(x);\n}\n\nstatic inline float fmod32(float x, float y) {\n  return fmodf(x, y);\n}\n\nstatic inline float futrts_round32(float x) {\n  return rintf(x);\n}\n\nstatic inline float futrts_floor32(float x) {\n  return floorf(x);\n}\n\nstatic inline float futrts_ceil32(float x) {\n  return ceilf(x);\n}\n\nstatic inline float futrts_lerp32(float v0, float v1, float t) {\n  return v0 + (v1 - v0) * t;\n}\n\nstatic inline float futrts_mad32(float a, float b, float c) {\n  return a * b + c;\n}\n\nstatic inline float futrts_fma32(float a, float b, float c) {\n  return fmaf(a, b, c);\n}\n#endif\n\nstatic inline int32_t futrts_to_bits32(float x) {\n  union {\n    float f;\n    int32_t t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n\nstatic inline float futrts_from_bits32(int32_t x) {\n  union {\n    int32_t f;\n    float t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n\nstatic inline float fsignum32(float x) {\n  return futrts_isnan32(x) ? x : (x > 0) - (x < 0);\n}\n\n#ifdef FUTHARK_F64_ENABLED\n\nstatic inline double fdiv64(double x, double y) {\n  return x / y;\n}\n\nstatic inline double fadd64(double x, double y) {\n  return x + y;\n}\n\nstatic inline double fsub64(double x, double y) {\n  return x - y;\n}\n\nstatic inline double fmul64(double x, double y) {\n  return x * y;\n}\n\nstatic inline bool cmplt64(double x, double y) {\n  return x < y;\n}\n\nstatic inline bool cmple64(double x, double y) {\n  return x <= y;\n}\n\nstatic inline double sitofp_i8_f64(int8_t x) {\n  return (double) x;\n}\n\nstatic inline double sitofp_i16_f64(int16_t x) {\n  return (double) x;\n}\n\nstatic inline double sitofp_i32_f64(int32_t x) {\n  return (double) x;\n}\n\nstatic inline double sitofp_i64_f64(int64_t x) {\n  return (double) x;\n}\n\nstatic inline double uitofp_i8_f64(uint8_t x) {\n  return (double) x;\n}\n\nstatic inline double uitofp_i16_f64(uint16_t x) {\n  return (double) x;\n}\n\nstatic inline doub",
                   "le uitofp_i32_f64(uint32_t x) {\n  return (double) x;\n}\n\nstatic inline double uitofp_i64_f64(uint64_t x) {\n  return (double) x;\n}\n\nstatic inline int8_t fptosi_f64_i8(double x) {\n  return (int8_t) x;\n}\n\nstatic inline int16_t fptosi_f64_i16(double x) {\n  return (int16_t) x;\n}\n\nstatic inline int32_t fptosi_f64_i32(double x) {\n  return (int32_t) x;\n}\n\nstatic inline int64_t fptosi_f64_i64(double x) {\n  return (int64_t) x;\n}\n\nstatic inline uint8_t fptoui_f64_i8(double x) {\n  return (uint8_t) x;\n}\n\nstatic inline uint16_t fptoui_f64_i16(double x) {\n  return (uint16_t) x;\n}\n\nstatic inline uint32_t fptoui_f64_i32(double x) {\n  return (uint32_t) x;\n}\n\nstatic inline uint64_t fptoui_f64_i64(double x) {\n  return (uint64_t) x;\n}\n\nstatic inline double fabs64(double x) {\n  return fabs(x);\n}\n\nstatic inline double fmax64(double x, double y) {\n  return fmax(x, y);\n}\n\nstatic inline double fmin64(double x, double y) {\n  return fmin(x, y);\n}\n\nstatic inline double fpow64(double x, double y) {\n  return pow(x, y);\n}\n\nstatic inline double futrts_log64(double x) {\n  return log(x);\n}\n\nstatic inline double futrts_log2_64(double x) {\n  return log2(x);\n}\n\nstatic inline double futrts_log10_64(double x) {\n  return log10(x);\n}\n\nstatic inline double futrts_sqrt64(double x) {\n  return sqrt(x);\n}\n\nstatic inline double futrts_exp64(double x) {\n  return exp(x);\n}\n\nstatic inline double futrts_cos64(double x) {\n  return cos(x);\n}\n\nstatic inline double futrts_sin64(double x) {\n  return sin(x);\n}\n\nstatic inline double futrts_tan64(double x) {\n  return tan(x);\n}\n\nstatic inline double futrts_acos64(double x) {\n  return acos(x);\n}\n\nstatic inline double futrts_asin64(double x) {\n  return asin(x);\n}\n\nstatic inline double futrts_atan64(double x) {\n  return atan(x);\n}\n\nstatic inline double futrts_cosh64(double x) {\n  return cosh(x);\n}\n\nstatic inline double futrts_sinh64(double x) {\n  return sinh(x);\n}\n\nstatic inline double futrts_tanh64(double x) {\n  return tanh(x);\n}\n\nstatic inline double futrts_acosh64(double x) {\n",
                   "  return acosh(x);\n}\n\nstatic inline double futrts_asinh64(double x) {\n  return asinh(x);\n}\n\nstatic inline double futrts_atanh64(double x) {\n  return atanh(x);\n}\n\nstatic inline double futrts_atan2_64(double x, double y) {\n  return atan2(x, y);\n}\n\nstatic inline double futrts_hypot64(double x, double y) {\n  return hypot(x, y);\n}\n\nstatic inline double futrts_gamma64(double x) {\n  return tgamma(x);\n}\n\nstatic inline double futrts_lgamma64(double x) {\n  return lgamma(x);\n}\n\nstatic inline double futrts_fma64(double a, double b, double c) {\n  return fma(a, b, c);\n}\n\nstatic inline double futrts_round64(double x) {\n  return rint(x);\n}\n\nstatic inline double futrts_ceil64(double x) {\n  return ceil(x);\n}\n\nstatic inline double futrts_floor64(double x) {\n  return floor(x);\n}\n\nstatic inline bool futrts_isnan64(double x) {\n  return isnan(x);\n}\n\nstatic inline bool futrts_isinf64(double x) {\n  return isinf(x);\n}\n\nstatic inline int64_t futrts_to_bits64(double x) {\n  union {\n    double f;\n    int64_t t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n\nstatic inline double futrts_from_bits64(int64_t x) {\n  union {\n    int64_t f;\n    double t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n\nstatic inline double fmod64(double x, double y) {\n  return fmod(x, y);\n}\n\nstatic inline double fsignum64(double x) {\n  return futrts_isnan64(x) ? x : (x > 0) - (x < 0);\n}\n\nstatic inline double futrts_lerp64(double v0, double v1, double t) {\n#ifdef __OPENCL_VERSION__\n  return mix(v0, v1, t);\n#else\n  return v0 + (v1 - v0) * t;\n#endif\n}\n\nstatic inline double futrts_mad64(double a, double b, double c) {\n#ifdef __OPENCL_VERSION__\n  return mad(a, b, c);\n#else\n  return a * b + c;\n#endif\n}\n\nstatic inline float fpconv_f32_f32(float x) {\n  return (float) x;\n}\n\nstatic inline double fpconv_f32_f64(float x) {\n  return (double) x;\n}\n\nstatic inline float fpconv_f64_f32(double x) {\n  return (float) x;\n}\n\nstatic inline double fpconv_f64_f64(double x) {\n  return (double) x;\n}\n\n#endif\n\n// End of scalar.h.\n// Start of scalar_f16.h.\n\n// Half-precis",
                   "ion is emulated if needed (e.g. in straight C) with the\n// native type used if possible.  The emulation works by typedef'ing\n// 'float' to 'f16', and then implementing all operations on single\n// precision.  To cut down on duplication, we use the same code for\n// those Futhark functions that require just operators or casts.  The\n// in-memory representation for arrays will still be 16 bits even\n// under emulation, so the compiler will have to be careful when\n// generating reads or writes.\n\n#if !defined(cl_khr_fp16) && !(defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 600)\n#define EMULATE_F16\n#endif\n\n#if !defined(EMULATE_F16) && defined(__OPENCL_VERSION__)\n#pragma OPENCL EXTENSION cl_khr_fp16 : enable\n#endif\n\n#ifdef EMULATE_F16\n\n// Note that the half-precision storage format is still 16 bits - the\n// compiler will have to be real careful!\ntypedef float f16;\n\n#else\n\n#ifdef __CUDA_ARCH__\n#include <cuda_fp16.h>\n#endif\n\ntypedef half f16;\n\n#endif\n\n// Some of these functions convert to single precision because half\n// precision versions are not available.\n\nstatic inline f16 fadd16(f16 x, f16 y) {\n  return x + y;\n}\n\nstatic inline f16 fsub16(f16 x, f16 y) {\n  return x - y;\n}\n\nstatic inline f16 fmul16(f16 x, f16 y) {\n  return x * y;\n}\n\nstatic inline bool cmplt16(f16 x, f16 y) {\n  return x < y;\n}\n\nstatic inline bool cmple16(f16 x, f16 y) {\n  return x <= y;\n}\n\nstatic inline f16 sitofp_i8_f16(int8_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 sitofp_i16_f16(int16_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 sitofp_i32_f16(int32_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 sitofp_i64_f16(int64_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 uitofp_i8_f16(uint8_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 uitofp_i16_f16(uint16_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 uitofp_i32_f16(uint32_t x) {\n  return (f16) x;\n}\n\nstatic inline f16 uitofp_i64_f16(uint64_t x) {\n  return (f16) x;\n}\n\nstatic inline int8_t fptosi_f16_i8(f16 x) {\n  return (int8_t) (float) x;\n}\n\nstatic inline int16_t f",
                   "ptosi_f16_i16(f16 x) {\n  return (int16_t) x;\n}\n\nstatic inline int32_t fptosi_f16_i32(f16 x) {\n  return (int32_t) x;\n}\n\nstatic inline int64_t fptosi_f16_i64(f16 x) {\n  return (int64_t) x;\n}\n\nstatic inline uint8_t fptoui_f16_i8(f16 x) {\n  return (uint8_t) (float) x;\n}\n\nstatic inline uint16_t fptoui_f16_i16(f16 x) {\n  return (uint16_t) x;\n}\n\nstatic inline uint32_t fptoui_f16_i32(f16 x) {\n  return (uint32_t) x;\n}\n\nstatic inline uint64_t fptoui_f16_i64(f16 x) {\n  return (uint64_t) x;\n}\n\n#ifndef EMULATE_F16\n\n#ifdef __OPENCL_VERSION__\nstatic inline f16 fabs16(f16 x) {\n  return fabs(x);\n}\n\nstatic inline f16 fmax16(f16 x, f16 y) {\n  return fmax(x, y);\n}\n\nstatic inline f16 fmin16(f16 x, f16 y) {\n  return fmin(x, y);\n}\n\nstatic inline f16 fpow16(f16 x, f16 y) {\n  return pow(x, y);\n}\n\n#else // Assuming CUDA.\n\nstatic inline f16 fabs16(f16 x) {\n  return fabsf(x);\n}\n\nstatic inline f16 fmax16(f16 x, f16 y) {\n  return fmaxf(x, y);\n}\n\nstatic inline f16 fmin16(f16 x, f16 y) {\n  return fminf(x, y);\n}\n\nstatic inline f16 fpow16(f16 x, f16 y) {\n  return powf(x, y);\n}\n#endif\n\nstatic inline bool futrts_isnan16(f16 x) {\n  return isnan((float)x);\n}\n\nstatic inline bool futrts_isinf16(f16 x) {\n  return isinf((float)x);\n}\n\n#ifdef __OPENCL_VERSION__\nstatic inline f16 futrts_log16(f16 x) {\n  return log(x);\n}\n\nstatic inline f16 futrts_log2_16(f16 x) {\n  return log2(x);\n}\n\nstatic inline f16 futrts_log10_16(f16 x) {\n  return log10(x);\n}\n\nstatic inline f16 futrts_sqrt16(f16 x) {\n  return sqrt(x);\n}\n\nstatic inline f16 futrts_exp16(f16 x) {\n  return exp(x);\n}\n\nstatic inline f16 futrts_cos16(f16 x) {\n  return cos(x);\n}\n\nstatic inline f16 futrts_sin16(f16 x) {\n  return sin(x);\n}\n\nstatic inline f16 futrts_tan16(f16 x) {\n  return tan(x);\n}\n\nstatic inline f16 futrts_acos16(f16 x) {\n  return acos(x);\n}\n\nstatic inline f16 futrts_asin16(f16 x) {\n  return asin(x);\n}\n\nstatic inline f16 futrts_atan16(f16 x) {\n  return atan(x);\n}\n\nstatic inline f16 futrts_cosh16(f16 x) {\n  return cosh(x);\n}\n\nstatic inline f16 futrts",
                   "_sinh16(f16 x) {\n  return sinh(x);\n}\n\nstatic inline f16 futrts_tanh16(f16 x) {\n  return tanh(x);\n}\n\nstatic inline f16 futrts_acosh16(f16 x) {\n  return acosh(x);\n}\n\nstatic inline f16 futrts_asinh16(f16 x) {\n  return asinh(x);\n}\n\nstatic inline f16 futrts_atanh16(f16 x) {\n  return atanh(x);\n}\n\nstatic inline f16 futrts_atan2_16(f16 x, f16 y) {\n  return atan2(x, y);\n}\n\nstatic inline f16 futrts_hypot16(f16 x, f16 y) {\n  return hypot(x, y);\n}\n\nstatic inline f16 futrts_gamma16(f16 x) {\n  return tgamma(x);\n}\n\nstatic inline f16 futrts_lgamma16(f16 x) {\n  return lgamma(x);\n}\n\nstatic inline f16 fmod16(f16 x, f16 y) {\n  return fmod(x, y);\n}\n\nstatic inline f16 futrts_round16(f16 x) {\n  return rint(x);\n}\n\nstatic inline f16 futrts_floor16(f16 x) {\n  return floor(x);\n}\n\nstatic inline f16 futrts_ceil16(f16 x) {\n  return ceil(x);\n}\n\nstatic inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {\n  return mix(v0, v1, t);\n}\n\nstatic inline f16 futrts_mad16(f16 a, f16 b, f16 c) {\n  return mad(a, b, c);\n}\n\nstatic inline f16 futrts_fma16(f16 a, f16 b, f16 c) {\n  return fma(a, b, c);\n}\n\n#else // Assume CUDA.\n\nstatic inline f16 futrts_log16(f16 x) {\n  return hlog(x);\n}\n\nstatic inline f16 futrts_log2_16(f16 x) {\n  return hlog2(x);\n}\n\nstatic inline f16 futrts_log10_16(f16 x) {\n  return hlog10(x);\n}\n\nstatic inline f16 futrts_sqrt16(f16 x) {\n  return hsqrt(x);\n}\n\nstatic inline f16 futrts_exp16(f16 x) {\n  return hexp(x);\n}\n\nstatic inline f16 futrts_cos16(f16 x) {\n  return hcos(x);\n}\n\nstatic inline f16 futrts_sin16(f16 x) {\n  return hsin(x);\n}\n\nstatic inline f16 futrts_tan16(f16 x) {\n  return tanf(x);\n}\n\nstatic inline f16 futrts_acos16(f16 x) {\n  return acosf(x);\n}\n\nstatic inline f16 futrts_asin16(f16 x) {\n  return asinf(x);\n}\n\nstatic inline f16 futrts_atan16(f16 x) {\n  return atanf(x);\n}\n\nstatic inline f16 futrts_cosh16(f16 x) {\n  return coshf(x);\n}\n\nstatic inline f16 futrts_sinh16(f16 x) {\n  return sinhf(x);\n}\n\nstatic inline f16 futrts_tanh16(f16 x) {\n  return tanhf(x);\n}\n\nstatic inline f16 futrts_acosh",
                   "16(f16 x) {\n  return acoshf(x);\n}\n\nstatic inline f16 futrts_asinh16(f16 x) {\n  return asinhf(x);\n}\n\nstatic inline f16 futrts_atanh16(f16 x) {\n  return atanhf(x);\n}\n\nstatic inline f16 futrts_atan2_16(f16 x, f16 y) {\n  return atan2f(x, y);\n}\n\nstatic inline f16 futrts_hypot16(f16 x, f16 y) {\n  return hypotf(x, y);\n}\n\nstatic inline f16 futrts_gamma16(f16 x) {\n  return tgammaf(x);\n}\n\nstatic inline f16 futrts_lgamma16(f16 x) {\n  return lgammaf(x);\n}\n\nstatic inline f16 fmod16(f16 x, f16 y) {\n  return fmodf(x, y);\n}\n\nstatic inline f16 futrts_round16(f16 x) {\n  return rintf(x);\n}\n\nstatic inline f16 futrts_floor16(f16 x) {\n  return hfloor(x);\n}\n\nstatic inline f16 futrts_ceil16(f16 x) {\n  return hceil(x);\n}\n\nstatic inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {\n  return v0 + (v1 - v0) * t;\n}\n\nstatic inline f16 futrts_mad16(f16 a, f16 b, f16 c) {\n  return a * b + c;\n}\n\nstatic inline f16 futrts_fma16(f16 a, f16 b, f16 c) {\n  return fmaf(a, b, c);\n}\n\n#endif\n\n// The CUDA __half type cannot be put in unions for some reason, so we\n// use bespoke conversion functions instead.\n#ifdef __CUDA_ARCH__\nstatic inline int16_t futrts_to_bits16(f16 x) {\n  return __half_as_ushort(x);\n}\nstatic inline f16 futrts_from_bits16(int16_t x) {\n  return __ushort_as_half(x);\n}\n#else\nstatic inline int16_t futrts_to_bits16(f16 x) {\n  union {\n    f16 f;\n    int16_t t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n\nstatic inline f16 futrts_from_bits16(int16_t x) {\n  union {\n    int16_t f;\n    f16 t;\n  } p;\n\n  p.f = x;\n  return p.t;\n}\n#endif\n\n#else // No native f16 - emulate.\n\nstatic inline f16 fabs16(f16 x) {\n  return fabs32(x);\n}\n\nstatic inline f16 fmax16(f16 x, f16 y) {\n  return fmax32(x, y);\n}\n\nstatic inline f16 fmin16(f16 x, f16 y) {\n  return fmin32(x, y);\n}\n\nstatic inline f16 fpow16(f16 x, f16 y) {\n  return fpow32(x, y);\n}\n\nstatic inline bool futrts_isnan16(f16 x) {\n  return futrts_isnan32(x);\n}\n\nstatic inline bool futrts_isinf16(f16 x) {\n  return futrts_isinf32(x);\n}\n\nstatic inline f16 futrts_log16(f16 x) {\n  r",
                   "eturn futrts_log32(x);\n}\n\nstatic inline f16 futrts_log2_16(f16 x) {\n  return futrts_log2_32(x);\n}\n\nstatic inline f16 futrts_log10_16(f16 x) {\n  return futrts_log10_32(x);\n}\n\nstatic inline f16 futrts_sqrt16(f16 x) {\n  return futrts_sqrt32(x);\n}\n\nstatic inline f16 futrts_exp16(f16 x) {\n  return futrts_exp32(x);\n}\n\nstatic inline f16 futrts_cos16(f16 x) {\n  return futrts_cos32(x);\n}\n\nstatic inline f16 futrts_sin16(f16 x) {\n  return futrts_sin32(x);\n}\n\nstatic inline f16 futrts_tan16(f16 x) {\n  return futrts_tan32(x);\n}\n\nstatic inline f16 futrts_acos16(f16 x) {\n  return futrts_acos32(x);\n}\n\nstatic inline f16 futrts_asin16(f16 x) {\n  return futrts_asin32(x);\n}\n\nstatic inline f16 futrts_atan16(f16 x) {\n  return futrts_atan32(x);\n}\n\nstatic inline f16 futrts_cosh16(f16 x) {\n  return futrts_cosh32(x);\n}\n\nstatic inline f16 futrts_sinh16(f16 x) {\n  return futrts_sinh32(x);\n}\n\nstatic inline f16 futrts_tanh16(f16 x) {\n  return futrts_tanh32(x);\n}\n\nstatic inline f16 futrts_acosh16(f16 x) {\n  return futrts_acosh32(x);\n}\n\nstatic inline f16 futrts_asinh16(f16 x) {\n  return futrts_asinh32(x);\n}\n\nstatic inline f16 futrts_atanh16(f16 x) {\n  return futrts_atanh32(x);\n}\n\nstatic inline f16 futrts_atan2_16(f16 x, f16 y) {\n  return futrts_atan2_32(x, y);\n}\n\nstatic inline f16 futrts_hypot16(f16 x, f16 y) {\n  return futrts_hypot32(x, y);\n}\n\nstatic inline f16 futrts_gamma16(f16 x) {\n  return futrts_gamma32(x);\n}\n\nstatic inline f16 futrts_lgamma16(f16 x) {\n  return futrts_lgamma32(x);\n}\n\nstatic inline f16 fmod16(f16 x, f16 y) {\n  return fmod32(x, y);\n}\n\nstatic inline f16 futrts_round16(f16 x) {\n  return futrts_round32(x);\n}\n\nstatic inline f16 futrts_floor16(f16 x) {\n  return futrts_floor32(x);\n}\n\nstatic inline f16 futrts_ceil16(f16 x) {\n  return futrts_ceil32(x);\n}\n\nstatic inline f16 futrts_lerp16(f16 v0, f16 v1, f16 t) {\n  return futrts_lerp32(v0, v1, t);\n}\n\nstatic inline f16 futrts_mad16(f16 a, f16 b, f16 c) {\n  return futrts_mad32(a, b, c);\n}\n\nstatic inline f16 futrts_fma16(f16 a, f16 b, f16 c",
                   ") {\n  return futrts_fma32(a, b, c);\n}\n\n// Even when we are using an OpenCL that does not support cl_khr_fp16,\n// it must still support vload_half for actually creating a\n// half-precision number, which can then be efficiently converted to a\n// float.  Similarly for vstore_half.\n#ifdef __OPENCL_VERSION__\n\nstatic inline int16_t futrts_to_bits16(f16 x) {\n  int16_t y;\n  // Violating strict aliasing here.\n  vstore_half((float)x, 0, (half*)&y);\n  return y;\n}\n\nstatic inline f16 futrts_from_bits16(int16_t x) {\n  return (f16)vload_half(0, (half*)&x);\n}\n\n#else\n\nstatic inline int16_t futrts_to_bits16(f16 x) {\n  return (int16_t)float2halfbits(x);\n}\n\nstatic inline f16 futrts_from_bits16(int16_t x) {\n  return halfbits2float((uint16_t)x);\n}\n\nstatic inline f16 fsignum16(f16 x) {\n  return futrts_isnan16(x) ? x : (x > 0) - (x < 0);\n}\n\n#endif\n\n#endif\n\nstatic inline float fpconv_f16_f16(f16 x) {\n  return x;\n}\n\nstatic inline float fpconv_f16_f32(f16 x) {\n  return x;\n}\n\nstatic inline f16 fpconv_f32_f16(float x) {\n  return x;\n}\n\n#ifdef FUTHARK_F64_ENABLED\n\nstatic inline double fpconv_f16_f64(f16 x) {\n  return (double) x;\n}\n\nstatic inline f16 fpconv_f64_f16(double x) {\n  return (f16) x;\n}\n\n#endif\n\n\n// End of scalar_f16.h.\n// Start of atomics.h\n\ninline int32_t atomic_xchg_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicExch((int32_t*)p, x);\n#else\n  return atomic_xor(p, x);\n#endif\n}\n\ninline int32_t atomic_xchg_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicExch((int32_t*)p, x);\n#else\n  return atomic_xor(p, x);\n#endif\n}\n\ninline int32_t atomic_cmpxchg_i32_global(volatile __global int32_t *p,\n                                         int32_t cmp, int32_t val) {\n#ifdef FUTHARK_CUDA\n  return atomicCAS((int32_t*)p, cmp, val);\n#else\n  return atomic_cmpxchg(p, cmp, val);\n#endif\n}\n\ninline int32_t atomic_cmpxchg_i32_local(volatile __local int32_t *p,\n                                        int32_t cmp, int32_t val) {\n#ifde",
                   "f FUTHARK_CUDA\n  return atomicCAS((int32_t*)p, cmp, val);\n#else\n  return atomic_cmpxchg(p, cmp, val);\n#endif\n}\n\ninline int32_t atomic_add_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((int32_t*)p, x);\n#else\n  return atomic_add(p, x);\n#endif\n}\n\ninline int32_t atomic_add_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((int32_t*)p, x);\n#else\n  return atomic_add(p, x);\n#endif\n}\n\ninline float atomic_fadd_f32_global(volatile __global float *p, float x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((float*)p, x);\n#else\n  union { int32_t i; float f; } old;\n  union { int32_t i; float f; } assumed;\n  old.f = *p;\n  do {\n    assumed.f = old.f;\n    old.f = old.f + x;\n    old.i = atomic_cmpxchg_i32_global((volatile __global int32_t*)p, assumed.i, old.i);\n  } while (assumed.i != old.i);\n  return old.f;\n#endif\n}\n\ninline float atomic_fadd_f32_local(volatile __local float *p, float x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((float*)p, x);\n#else\n  union { int32_t i; float f; } old;\n  union { int32_t i; float f; } assumed;\n  old.f = *p;\n  do {\n    assumed.f = old.f;\n    old.f = old.f + x;\n    old.i = atomic_cmpxchg_i32_local((volatile __local int32_t*)p, assumed.i, old.i);\n  } while (assumed.i != old.i);\n  return old.f;\n#endif\n}\n\ninline int32_t atomic_smax_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((int32_t*)p, x);\n#else\n  return atomic_max(p, x);\n#endif\n}\n\ninline int32_t atomic_smax_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((int32_t*)p, x);\n#else\n  return atomic_max(p, x);\n#endif\n}\n\ninline int32_t atomic_smin_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((int32_t*)p, x);\n#else\n  return atomic_min(p, x);\n#endif\n}\n\ninline int32_t atomic_smin_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((int32_t*)p, x);\n#else\n  ret",
                   "urn atomic_min(p, x);\n#endif\n}\n\ninline uint32_t atomic_umax_i32_global(volatile __global uint32_t *p, uint32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((uint32_t*)p, x);\n#else\n  return atomic_max(p, x);\n#endif\n}\n\ninline uint32_t atomic_umax_i32_local(volatile __local uint32_t *p, uint32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((uint32_t*)p, x);\n#else\n  return atomic_max(p, x);\n#endif\n}\n\ninline uint32_t atomic_umin_i32_global(volatile __global uint32_t *p, uint32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((uint32_t*)p, x);\n#else\n  return atomic_min(p, x);\n#endif\n}\n\ninline uint32_t atomic_umin_i32_local(volatile __local uint32_t *p, uint32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((uint32_t*)p, x);\n#else\n  return atomic_min(p, x);\n#endif\n}\n\ninline int32_t atomic_and_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAnd((int32_t*)p, x);\n#else\n  return atomic_and(p, x);\n#endif\n}\n\ninline int32_t atomic_and_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAnd((int32_t*)p, x);\n#else\n  return atomic_and(p, x);\n#endif\n}\n\ninline int32_t atomic_or_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicOr((int32_t*)p, x);\n#else\n  return atomic_or(p, x);\n#endif\n}\n\ninline int32_t atomic_or_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicOr((int32_t*)p, x);\n#else\n  return atomic_or(p, x);\n#endif\n}\n\ninline int32_t atomic_xor_i32_global(volatile __global int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicXor((int32_t*)p, x);\n#else\n  return atomic_xor(p, x);\n#endif\n}\n\ninline int32_t atomic_xor_i32_local(volatile __local int32_t *p, int32_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicXor((int32_t*)p, x);\n#else\n  return atomic_xor(p, x);\n#endif\n}\n\n// Start of 64 bit atomics\n\ninline int64_t atomic_xchg_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicExch((uint64_t*)p, x);\n#else\n ",
                   " return atom_xor(p, x);\n#endif\n}\n\ninline int64_t atomic_xchg_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicExch((uint64_t*)p, x);\n#else\n  return atom_xor(p, x);\n#endif\n}\n\ninline int64_t atomic_cmpxchg_i64_global(volatile __global int64_t *p,\n                                         int64_t cmp, int64_t val) {\n#ifdef FUTHARK_CUDA\n  return atomicCAS((uint64_t*)p, cmp, val);\n#else\n  return atom_cmpxchg(p, cmp, val);\n#endif\n}\n\ninline int64_t atomic_cmpxchg_i64_local(volatile __local int64_t *p,\n                                        int64_t cmp, int64_t val) {\n#ifdef FUTHARK_CUDA\n  return atomicCAS((uint64_t*)p, cmp, val);\n#else\n  return atom_cmpxchg(p, cmp, val);\n#endif\n}\n\ninline int64_t atomic_add_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((uint64_t*)p, x);\n#else\n  return atom_add(p, x);\n#endif\n}\n\ninline int64_t atomic_add_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAdd((uint64_t*)p, x);\n#else\n  return atom_add(p, x);\n#endif\n}\n\n#ifdef FUTHARK_F64_ENABLED\n\ninline double atomic_fadd_f64_global(volatile __global double *p, double x) {\n#if defined(FUTHARK_CUDA) && __CUDA_ARCH__ >= 600\n  return atomicAdd((double*)p, x);\n#else\n  union { int64_t i; double f; } old;\n  union { int64_t i; double f; } assumed;\n  old.f = *p;\n  do {\n    assumed.f = old.f;\n    old.f = old.f + x;\n    old.i = atomic_cmpxchg_i64_global((volatile __global int64_t*)p, assumed.i, old.i);\n  } while (assumed.i != old.i);\n  return old.f;\n#endif\n}\n\ninline double atomic_fadd_f64_local(volatile __local double *p, double x) {\n#if defined(FUTHARK_CUDA) && __CUDA_ARCH__ >= 600\n  return atomicAdd((double*)p, x);\n#else\n  union { int64_t i; double f; } old;\n  union { int64_t i; double f; } assumed;\n  old.f = *p;\n  do {\n    assumed.f = old.f;\n    old.f = old.f + x;\n    old.i = atomic_cmpxchg_i64_local((volatile __local int64_t*)p, assumed.i, old.i);\n  } while (assumed.i != old.i);\n  r",
                   "eturn old.f;\n#endif\n}\n\n#endif\n\ninline int64_t atomic_smax_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((int64_t*)p, x);\n#else\n  return atom_max(p, x);\n#endif\n}\n\ninline int64_t atomic_smax_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((int64_t*)p, x);\n#else\n  return atom_max(p, x);\n#endif\n}\n\ninline int64_t atomic_smin_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((int64_t*)p, x);\n#else\n  return atom_min(p, x);\n#endif\n}\n\ninline int64_t atomic_smin_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((int64_t*)p, x);\n#else\n  return atom_min(p, x);\n#endif\n}\n\ninline uint64_t atomic_umax_i64_global(volatile __global uint64_t *p, uint64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((uint64_t*)p, x);\n#else\n  return atom_max(p, x);\n#endif\n}\n\ninline uint64_t atomic_umax_i64_local(volatile __local uint64_t *p, uint64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMax((uint64_t*)p, x);\n#else\n  return atom_max(p, x);\n#endif\n}\n\ninline uint64_t atomic_umin_i64_global(volatile __global uint64_t *p, uint64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((uint64_t*)p, x);\n#else\n  return atom_min(p, x);\n#endif\n}\n\ninline uint64_t atomic_umin_i64_local(volatile __local uint64_t *p, uint64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicMin((uint64_t*)p, x);\n#else\n  return atom_min(p, x);\n#endif\n}\n\ninline int64_t atomic_and_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAnd((int64_t*)p, x);\n#else\n  return atom_and(p, x);\n#endif\n}\n\ninline int64_t atomic_and_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicAnd((int64_t*)p, x);\n#else\n  return atom_and(p, x);\n#endif\n}\n\ninline int64_t atomic_or_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicOr((int64_t*)p, x);\n#else\n  return atom_or(p, x);\n#endif\n}\n\ninline int6",
                   "4_t atomic_or_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicOr((int64_t*)p, x);\n#else\n  return atom_or(p, x);\n#endif\n}\n\ninline int64_t atomic_xor_i64_global(volatile __global int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicXor((int64_t*)p, x);\n#else\n  return atom_xor(p, x);\n#endif\n}\n\ninline int64_t atomic_xor_i64_local(volatile __local int64_t *p, int64_t x) {\n#ifdef FUTHARK_CUDA\n  return atomicXor((int64_t*)p, x);\n#else\n  return atom_xor(p, x);\n#endif\n}\n\n// End of atomics.h\n\n\n\n__kernel void builtinzhreplicate_f32zireplicate_225805(int32_t num_elems_225802,\n                                                       float val_225803,\n                                                       __global\n                                                       unsigned char *mem_225801)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t replicate_gtid_225805;\n    int32_t replicate_ltid_225806;\n    int32_t replicate_gid_225807;\n    \n    replicate_gtid_225805 = get_global_id(0);\n    replicate_ltid_225806 = get_local_id(0);\n    replicate_gid_225807 = get_group_id(0);\n    \n    int64_t slice_225811 = num_elems_225802;\n    int64_t rep_i_225810 = sext_i32_i64(replicate_gtid_225805);\n    int64_t remnant_225812 = sext_i32_i64(replicate_gtid_225805) - rep_i_225810;\n    \n    if (slt64(replicate_gtid_225805, num_elems_225802)) {\n        ((__global float *) mem_225801)[rep_i_225810] = val_225803;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void builtinzhreplicate_i64zireplicate_225388(int32_t num_elems_225385,\n                                                       int64_t val_225386,\n                                                       __global\n                                                       unsigned char *mem_225384)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t replicate_gtid_225388;\n    int32_t replicate_ltid_225389;\n  ",
                   "  int32_t replicate_gid_225390;\n    \n    replicate_gtid_225388 = get_global_id(0);\n    replicate_ltid_225389 = get_local_id(0);\n    replicate_gid_225390 = get_group_id(0);\n    \n    int64_t slice_225394 = num_elems_225385;\n    int64_t rep_i_225393 = sext_i32_i64(replicate_gtid_225388);\n    int64_t remnant_225395 = sext_i32_i64(replicate_gtid_225388) - rep_i_225393;\n    \n    if (slt64(replicate_gtid_225388, num_elems_225385)) {\n        ((__global int64_t *) mem_225384)[rep_i_225393] = val_225386;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_f32(__local volatile\n                                    int64_t *block_9_backing_aligned_0,\n                                    int32_t destoffset_1, int32_t srcoffset_3,\n                                    int32_t num_arrays_4, int32_t x_elems_5,\n                                    int32_t y_elems_6, int32_t mulx_7,\n                                    int32_t muly_8, __global\n                                    unsigned char *destmem_0, __global\n                                    unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_",
                   "30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 4) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 4) + our_array_offset_30;\n    int32_t x_index_31 = get_global_id_0_37;\n    int32_t y_index_32 = get_group_id_1_41 * 32 + get_local_id_1_39;\n    float val_44;\n    \n    if (slt32(x_index_31, x_elems_5)) {\n        for (int32_t j_43 = 0; j_43 < 4; j_43++) {\n            int32_t index_in_35 = (y_index_32 + j_43 * 8) * x_elems_5 +\n                    x_index_31;\n            \n            if (slt32(y_index_32 + j_43 * 8, y_elems_6)) {\n                val_44 = ((__global\n                           float *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                              index_in_35)];\n                ((__local float *) block_9)[sext_i32_i64((get_local_id_1_39 +\n                                                          j_43 * 8) * 33 +\n                                            get_local_id_0_38)] = val_44;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 32 + get_local_id_0_38;\n    y_index_32 = get_group_id_0_40 * 32 + get_local_id_1_39;\n    if (slt32(x_index_31, y_elems_6)) {\n        for (int32_t j_43 = 0; j_43 < 4; j_43++) {\n            int32_t index_out_36 = (y_index_32 + j_43 * 8) * y_elems_6 +\n                    x_index_31;\n            \n            if (slt32(y_index_32 + j_43 * 8, x_elems_5)) {\n                val_44 = ((__local\n                           float *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                             33 + get_local_id_1_39 + j_43 *\n                                             8)];\n                ((__global float *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                               index_out_36)] = val_44;\n            }\n        }\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_f32_low_height(__local volatile\n                        ",
                   "                       int64_t *block_9_backing_aligned_0,\n                                               int32_t destoffset_1,\n                                               int32_t srcoffset_3,\n                                               int32_t num_arrays_4,\n                                               int32_t x_elems_5,\n                                               int32_t y_elems_6,\n                                               int32_t mulx_7, int32_t muly_8,\n                                               __global\n                                               unsigned char *destmem_0,\n                                               __global unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 4) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 4) + our_array_offset_30;\n    int32_t x_index_31 = get_group_id_0_40 * 16 * mulx_7 + get_local_id_0_38 +\n            srem32(get_local_id_1_39, mulx_7) * 16;\n    int32_t y_index_32 = get_group_id_1_41 * 16 + squot32(get",
                   "_local_id_1_39,\n                                                          mulx_7);\n    float val_44;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    \n    if (slt32(x_index_31, x_elems_5) && slt32(y_index_32, y_elems_6)) {\n        val_44 = ((__global float *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                               index_in_35)];\n        ((__local float *) block_9)[sext_i32_i64(get_local_id_1_39 * 17 +\n                                    get_local_id_0_38)] = val_44;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 16 + squot32(get_local_id_0_38, mulx_7);\n    y_index_32 = get_group_id_0_40 * 16 * mulx_7 + get_local_id_1_39 +\n        srem32(get_local_id_0_38, mulx_7) * 16;\n    \n    int32_t index_out_36 = y_index_32 * y_elems_6 + x_index_31;\n    \n    if (slt32(x_index_31, y_elems_6) && slt32(y_index_32, x_elems_5)) {\n        val_44 = ((__local float *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                             17 + get_local_id_1_39)];\n        ((__global float *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                       index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_f32_low_width(__local volatile\n                                              int64_t *block_9_backing_aligned_0,\n                                              int32_t destoffset_1,\n                                              int32_t srcoffset_3,\n                                              int32_t num_arrays_4,\n                                              int32_t x_elems_5,\n                                              int32_t y_elems_6, int32_t mulx_7,\n                                              int32_t muly_8, __global\n                                              unsigned char *destmem_0, __global\n                                              unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1",
                   ";\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 4) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 4) + our_array_offset_30;\n    int32_t x_index_31 = get_group_id_0_40 * 16 + squot32(get_local_id_0_38,\n                                                          muly_8);\n    int32_t y_index_32 = get_group_id_1_41 * 16 * muly_8 + get_local_id_1_39 +\n            srem32(get_local_id_0_38, muly_8) * 16;\n    float val_44;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    \n    if (slt32(x_index_31, x_elems_5) && slt32(y_index_32, y_elems_6)) {\n        val_44 = ((__global float *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                               index_in_35)];\n        ((__local float *) block_9)[sext_i32_i64(get_local_id_1_39 * 17 +\n                                    get_local_id_0_38)] = val_44;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 16 * muly_8 + get_local_id_0_38 +\n        srem32(get_local_id_1_39, muly_8) * 16;\n    y_index_32 = get_group_id_0_40 * 16 + squot32(get_local_id_1_3",
                   "9, muly_8);\n    \n    int32_t index_out_36 = y_index_32 * y_elems_6 + x_index_31;\n    \n    if (slt32(x_index_31, y_elems_6) && slt32(y_index_32, x_elems_5)) {\n        val_44 = ((__local float *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                             17 + get_local_id_1_39)];\n        ((__global float *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                       index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_f32_small(__local volatile\n                                          int64_t *block_9_backing_aligned_0,\n                                          int32_t destoffset_1,\n                                          int32_t srcoffset_3,\n                                          int32_t num_arrays_4,\n                                          int32_t x_elems_5, int32_t y_elems_6,\n                                          int32_t mulx_7, int32_t muly_8,\n                                          __global unsigned char *destmem_0,\n                                          __global unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n   ",
                   " \n    int32_t our_array_offset_30 = squot32(get_global_id_0_37, y_elems_6 *\n                                          x_elems_5) * (y_elems_6 * x_elems_5);\n    int32_t x_index_31 = squot32(srem32(get_global_id_0_37, y_elems_6 *\n                                        x_elems_5), y_elems_6);\n    int32_t y_index_32 = srem32(get_global_id_0_37, y_elems_6);\n    float val_44;\n    int32_t odata_offset_33 = squot32(destoffset_1, 4) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 4) + our_array_offset_30;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    int32_t index_out_36 = x_index_31 * y_elems_6 + y_index_32;\n    \n    if (slt32(get_global_id_0_37, x_elems_5 * y_elems_6 * num_arrays_4)) {\n        val_44 = ((__global float *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                               index_in_35)];\n        ((__global float *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                       index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_i64(__local volatile\n                                    int64_t *block_9_backing_aligned_0,\n                                    int32_t destoffset_1, int32_t srcoffset_3,\n                                    int32_t num_arrays_4, int32_t x_elems_5,\n                                    int32_t y_elems_6, int32_t mulx_7,\n                                    int32_t muly_8, __global\n                                    unsigned char *destmem_0, __global\n                                    unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t ge",
                   "t_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 8) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 8) + our_array_offset_30;\n    int32_t x_index_31 = get_global_id_0_37;\n    int32_t y_index_32 = get_group_id_1_41 * 32 + get_local_id_1_39;\n    int64_t val_44;\n    \n    if (slt32(x_index_31, x_elems_5)) {\n        for (int32_t j_43 = 0; j_43 < 4; j_43++) {\n            int32_t index_in_35 = (y_index_32 + j_43 * 8) * x_elems_5 +\n                    x_index_31;\n            \n            if (slt32(y_index_32 + j_43 * 8, y_elems_6)) {\n                val_44 = ((__global\n                           int64_t *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                                index_in_35)];\n                ((__local int64_t *) block_9)[sext_i32_i64((get_local_id_1_39 +\n                                                            j_43 * 8) * 33 +\n                                              get_local_id_0_38)] = val_44;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 32 + get_local_id_0_38;\n    y_index_32 = get_group_id_0_40 * 32 + get_local_id_1_39;\n    if (slt32(x_index_31, y_elems_6)) {\n        for (int32_t j_43 = 0; j_43 < 4; j_43++) {\n            int32_t index_out_36 = (y_index_32 + j_43 * 8) * y_elems_6 +\n                    x_index_31;\n            \n            if (slt32(y_index_32 + j_43 * 8, x_elems_5)) {\n                ",
                   "val_44 = ((__local\n                           int64_t *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                               33 + get_local_id_1_39 + j_43 *\n                                               8)];\n                ((__global int64_t *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                                 index_out_36)] = val_44;\n            }\n        }\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_i64_low_height(__local volatile\n                                               int64_t *block_9_backing_aligned_0,\n                                               int32_t destoffset_1,\n                                               int32_t srcoffset_3,\n                                               int32_t num_arrays_4,\n                                               int32_t x_elems_5,\n                                               int32_t y_elems_6,\n                                               int32_t mulx_7, int32_t muly_8,\n                                               __global\n                                               unsigned char *destmem_0,\n                                               __global unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_4",
                   "1 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 8) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 8) + our_array_offset_30;\n    int32_t x_index_31 = get_group_id_0_40 * 16 * mulx_7 + get_local_id_0_38 +\n            srem32(get_local_id_1_39, mulx_7) * 16;\n    int32_t y_index_32 = get_group_id_1_41 * 16 + squot32(get_local_id_1_39,\n                                                          mulx_7);\n    int64_t val_44;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    \n    if (slt32(x_index_31, x_elems_5) && slt32(y_index_32, y_elems_6)) {\n        val_44 = ((__global int64_t *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                                 index_in_35)];\n        ((__local int64_t *) block_9)[sext_i32_i64(get_local_id_1_39 * 17 +\n                                      get_local_id_0_38)] = val_44;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 16 + squot32(get_local_id_0_38, mulx_7);\n    y_index_32 = get_group_id_0_40 * 16 * mulx_7 + get_local_id_1_39 +\n        srem32(get_local_id_0_38, mulx_7) * 16;\n    \n    int32_t index_out_36 = y_index_32 * y_elems_6 + x_index_31;\n    \n    if (slt32(x_index_31, y_elems_6) && slt32(y_index_32, x_elems_5)) {\n        val_44 = ((__local int64_t *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                               17 + get_local_id_1_39)];\n        ((__global int64_t *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                         index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_i64_low_width(__local volatile\n                                              int64_t *block_9_backing_aligned_0,\n                                              int32_t destoffset_1,\n              ",
                   "                                int32_t srcoffset_3,\n                                              int32_t num_arrays_4,\n                                              int32_t x_elems_5,\n                                              int32_t y_elems_6, int32_t mulx_7,\n                                              int32_t muly_8, __global\n                                              unsigned char *destmem_0, __global\n                                              unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *block_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = get_group_id_2_42 * x_elems_5 * y_elems_6;\n    int32_t odata_offset_33 = squot32(destoffset_1, 8) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 8) + our_array_offset_30;\n    int32_t x_index_31 = get_group_id_0_40 * 16 + squot32(get_local_id_0_38,\n                                                          muly_8);\n    int32_t y_index_32 = get_group_id_1_41 * 16 * muly_8 + get_local_id_1_39 +\n            srem32(get_local_id_0_38, muly_8) * 16;\n    int64_t val_44;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    \n    if (slt32(x_index_31,",
                   " x_elems_5) && slt32(y_index_32, y_elems_6)) {\n        val_44 = ((__global int64_t *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                                 index_in_35)];\n        ((__local int64_t *) block_9)[sext_i32_i64(get_local_id_1_39 * 17 +\n                                      get_local_id_0_38)] = val_44;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    x_index_31 = get_group_id_1_41 * 16 * muly_8 + get_local_id_0_38 +\n        srem32(get_local_id_1_39, muly_8) * 16;\n    y_index_32 = get_group_id_0_40 * 16 + squot32(get_local_id_1_39, muly_8);\n    \n    int32_t index_out_36 = y_index_32 * y_elems_6 + x_index_31;\n    \n    if (slt32(x_index_31, y_elems_6) && slt32(y_index_32, x_elems_5)) {\n        val_44 = ((__local int64_t *) block_9)[sext_i32_i64(get_local_id_0_38 *\n                                               17 + get_local_id_1_39)];\n        ((__global int64_t *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                         index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void gpu_map_transpose_i64_small(__local volatile\n                                          int64_t *block_9_backing_aligned_0,\n                                          int32_t destoffset_1,\n                                          int32_t srcoffset_3,\n                                          int32_t num_arrays_4,\n                                          int32_t x_elems_5, int32_t y_elems_6,\n                                          int32_t mulx_7, int32_t muly_8,\n                                          __global unsigned char *destmem_0,\n                                          __global unsigned char *srcmem_2)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict block_9_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) block_9_backing_aligned_0;\n    __local unsigned char *blo",
                   "ck_9;\n    \n    block_9 = (__local unsigned char *) block_9_backing_0;\n    \n    int32_t get_global_id_0_37;\n    \n    get_global_id_0_37 = get_global_id(0);\n    \n    int32_t get_local_id_0_38;\n    \n    get_local_id_0_38 = get_local_id(0);\n    \n    int32_t get_local_id_1_39;\n    \n    get_local_id_1_39 = get_local_id(1);\n    \n    int32_t get_group_id_0_40;\n    \n    get_group_id_0_40 = get_group_id(0);\n    \n    int32_t get_group_id_1_41;\n    \n    get_group_id_1_41 = get_group_id(1);\n    \n    int32_t get_group_id_2_42;\n    \n    get_group_id_2_42 = get_group_id(2);\n    \n    int32_t our_array_offset_30 = squot32(get_global_id_0_37, y_elems_6 *\n                                          x_elems_5) * (y_elems_6 * x_elems_5);\n    int32_t x_index_31 = squot32(srem32(get_global_id_0_37, y_elems_6 *\n                                        x_elems_5), y_elems_6);\n    int32_t y_index_32 = srem32(get_global_id_0_37, y_elems_6);\n    int64_t val_44;\n    int32_t odata_offset_33 = squot32(destoffset_1, 8) + our_array_offset_30;\n    int32_t idata_offset_34 = squot32(srcoffset_3, 8) + our_array_offset_30;\n    int32_t index_in_35 = y_index_32 * x_elems_5 + x_index_31;\n    int32_t index_out_36 = x_index_31 * y_elems_6 + y_index_32;\n    \n    if (slt32(get_global_id_0_37, x_elems_5 * y_elems_6 * num_arrays_4)) {\n        val_44 = ((__global int64_t *) srcmem_2)[sext_i32_i64(idata_offset_34 +\n                                                 index_in_35)];\n        ((__global int64_t *) destmem_0)[sext_i32_i64(odata_offset_33 +\n                                         index_out_36)] = val_44;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_225406(int64_t m_196691, int64_t n_196692,\n                                int64_t i_196779, __global\n                                unsigned char *mem_222246, __global\n                                unsigned char *mem_222254)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_225406;\n",
                   "    int32_t copy_ltid_225407;\n    int32_t copy_gid_225408;\n    \n    copy_gtid_225406 = get_global_id(0);\n    copy_ltid_225407 = get_local_id(0);\n    copy_gid_225408 = get_group_id(0);\n    \n    int64_t slice_225412 = m_196691;\n    int64_t copy_i_225411 = sext_i32_i64(copy_gtid_225406);\n    int64_t remnant_225413 = sext_i32_i64(copy_gtid_225406) - copy_i_225411;\n    \n    if (slt64(sext_i32_i64(copy_gtid_225406), m_196691)) {\n        int64_t tmp_225414;\n        \n        tmp_225414 = ((__global int64_t *) mem_222246)[i_196779 +\n                                                       copy_i_225411 *\n                                                       n_196692];\n        ((__global int64_t *) mem_222254)[copy_i_225411] = tmp_225414;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_225565(int64_t m_196691, int64_t n_p_196694,\n                                int64_t defunc_0_f_res_196740, int64_t i_196831,\n                                __global unsigned char *mem_222307, __global\n                                unsigned char *mem_222317)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_225565;\n    int32_t copy_ltid_225566;\n    int32_t copy_gid_225567;\n    \n    copy_gtid_225565 = get_global_id(0);\n    copy_ltid_225566 = get_local_id(0);\n    copy_gid_225567 = get_group_id(0);\n    \n    int64_t slice_225572 = n_p_196694;\n    int64_t slice_225573 = m_196691 * slice_225572;\n    int64_t copy_i_225570 = squot64(sext_i32_i64(copy_gtid_225565),\n                                    slice_225572);\n    int64_t remnant_225574 = sext_i32_i64(copy_gtid_225565) - copy_i_225570 *\n            slice_225572;\n    int64_t copy_i_225571 = remnant_225574;\n    int64_t remnant_225575 = remnant_225574 - copy_i_225571;\n    \n    if (slt64(sext_i32_i64(copy_gtid_225565), m_196691 * n_p_196694)) {\n        int64_t tmp_225576;\n        \n        tmp_225576 = ((__global int64_t *) mem_222307)[i_196831 +\n                             ",
                   "                          (copy_i_225570 *\n                                                        (defunc_0_f_res_196740 *\n                                                         n_p_196694) +\n                                                        copy_i_225571 *\n                                                        defunc_0_f_res_196740)];\n        ((__global int64_t *) mem_222317)[copy_i_225570 * n_p_196694 +\n                                          copy_i_225571] = tmp_225576;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_227488(int64_t m_196691, int64_t n_196692,\n                                int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                unsigned char *mem_param_222550, __global\n                                unsigned char *mem_223621)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_227488;\n    int32_t copy_ltid_227489;\n    int32_t copy_gid_227490;\n    \n    copy_gtid_227488 = get_global_id(0);\n    copy_ltid_227489 = get_local_id(0);\n    copy_gid_227490 = get_group_id(0);\n    \n    int64_t slice_227495 = n_196692;\n    int64_t slice_227496 = m_196691 * slice_227495;\n    int64_t copy_i_227493 = squot64(sext_i32_i64(copy_gtid_227488),\n                                    slice_227495);\n    int64_t remnant_227497 = sext_i32_i64(copy_gtid_227488) - copy_i_227493 *\n            slice_227495;\n    int64_t copy_i_227494 = remnant_227497;\n    int64_t remnant_227498 = remnant_227497 - copy_i_227494;\n    \n    if (slt64(sext_i32_i64(copy_gtid_227488), m_196691 * n_196692)) {\n        float tmp_227499;\n        \n        tmp_227499 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_227493 *\n                                                   ctx_param_ext_222",
                   "546 +\n                                                   copy_i_227494 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223621)[copy_i_227494 * m_196691 +\n                                        copy_i_227493] = tmp_227499;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_227687(int64_t m_196691, int64_t n_196692,\n                                int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                unsigned char *mem_param_222550, __global\n                                unsigned char *mem_223679)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_227687;\n    int32_t copy_ltid_227688;\n    int32_t copy_gid_227689;\n    \n    copy_gtid_227687 = get_global_id(0);\n    copy_ltid_227688 = get_local_id(0);\n    copy_gid_227689 = get_group_id(0);\n    \n    int64_t slice_227694 = n_196692;\n    int64_t slice_227695 = m_196691 * slice_227694;\n    int64_t copy_i_227692 = squot64(sext_i32_i64(copy_gtid_227687),\n                                    slice_227694);\n    int64_t remnant_227696 = sext_i32_i64(copy_gtid_227687) - copy_i_227692 *\n            slice_227694;\n    int64_t copy_i_227693 = remnant_227696;\n    int64_t remnant_227697 = remnant_227696 - copy_i_227693;\n    \n    if (slt64(sext_i32_i64(copy_gtid_227687), m_196691 * n_196692)) {\n        float tmp_227698;\n        \n        tmp_227698 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_227692 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_227693 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223679)[copy_i_227693 * m_",
                   "196691 +\n                                        copy_i_227692] = tmp_227698;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_227937(int64_t m_196691, int64_t n_196692,\n                                int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                unsigned char *mem_param_222550, __global\n                                unsigned char *mem_223786)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_227937;\n    int32_t copy_ltid_227938;\n    int32_t copy_gid_227939;\n    \n    copy_gtid_227937 = get_global_id(0);\n    copy_ltid_227938 = get_local_id(0);\n    copy_gid_227939 = get_group_id(0);\n    \n    int64_t slice_227944 = n_196692;\n    int64_t slice_227945 = m_196691 * slice_227944;\n    int64_t copy_i_227942 = squot64(sext_i32_i64(copy_gtid_227937),\n                                    slice_227944);\n    int64_t remnant_227946 = sext_i32_i64(copy_gtid_227937) - copy_i_227942 *\n            slice_227944;\n    int64_t copy_i_227943 = remnant_227946;\n    int64_t remnant_227947 = remnant_227946 - copy_i_227943;\n    \n    if (slt64(sext_i32_i64(copy_gtid_227937), m_196691 * n_196692)) {\n        float tmp_227948;\n        \n        tmp_227948 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_227942 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_227943 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223786)[copy_i_227943 * m_196691 +\n                                        copy_i_227942] = tmp_227948;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228315(int64_t m_196691, int64_t n_196692,\n                        ",
                   "        int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                unsigned char *mem_param_222550, __global\n                                unsigned char *mem_223999)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_228315;\n    int32_t copy_ltid_228316;\n    int32_t copy_gid_228317;\n    \n    copy_gtid_228315 = get_global_id(0);\n    copy_ltid_228316 = get_local_id(0);\n    copy_gid_228317 = get_group_id(0);\n    \n    int64_t slice_228322 = n_196692;\n    int64_t slice_228323 = m_196691 * slice_228322;\n    int64_t copy_i_228320 = squot64(sext_i32_i64(copy_gtid_228315),\n                                    slice_228322);\n    int64_t remnant_228324 = sext_i32_i64(copy_gtid_228315) - copy_i_228320 *\n            slice_228322;\n    int64_t copy_i_228321 = remnant_228324;\n    int64_t remnant_228325 = remnant_228324 - copy_i_228321;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228315), m_196691 * n_196692)) {\n        float tmp_228326;\n        \n        tmp_228326 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228320 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228321 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_223999)[copy_i_228321 * m_196691 +\n                                        copy_i_228320] = tmp_228326;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228537(int64_t m_196691, int64_t n_196692,\n                                int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                uns",
                   "igned char *mem_param_222550, __global\n                                unsigned char *mem_224122)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy_gtid_228537;\n    int32_t copy_ltid_228538;\n    int32_t copy_gid_228539;\n    \n    copy_gtid_228537 = get_global_id(0);\n    copy_ltid_228538 = get_local_id(0);\n    copy_gid_228539 = get_group_id(0);\n    \n    int64_t slice_228544 = n_196692;\n    int64_t slice_228545 = m_196691 * slice_228544;\n    int64_t copy_i_228542 = squot64(sext_i32_i64(copy_gtid_228537),\n                                    slice_228544);\n    int64_t remnant_228546 = sext_i32_i64(copy_gtid_228537) - copy_i_228542 *\n            slice_228544;\n    int64_t copy_i_228543 = remnant_228546;\n    int64_t remnant_228547 = remnant_228546 - copy_i_228543;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228537), m_196691 * n_196692)) {\n        float tmp_228548;\n        \n        tmp_228548 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228542 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228543 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_224122)[copy_i_228543 * m_196691 +\n                                        copy_i_228542] = tmp_228548;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainzicopy_228810(int64_t m_196691, int64_t n_196692,\n                                int64_t ctx_param_ext_222545,\n                                int64_t ctx_param_ext_222546,\n                                int64_t ctx_param_ext_222548, __global\n                                unsigned char *mem_param_222550, __global\n                                unsigned char *mem_224294)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    int32_t copy",
                   "_gtid_228810;\n    int32_t copy_ltid_228811;\n    int32_t copy_gid_228812;\n    \n    copy_gtid_228810 = get_global_id(0);\n    copy_ltid_228811 = get_local_id(0);\n    copy_gid_228812 = get_group_id(0);\n    \n    int64_t slice_228817 = n_196692;\n    int64_t slice_228818 = m_196691 * slice_228817;\n    int64_t copy_i_228815 = squot64(sext_i32_i64(copy_gtid_228810),\n                                    slice_228817);\n    int64_t remnant_228819 = sext_i32_i64(copy_gtid_228810) - copy_i_228815 *\n            slice_228817;\n    int64_t copy_i_228816 = remnant_228819;\n    int64_t remnant_228820 = remnant_228819 - copy_i_228816;\n    \n    if (slt64(sext_i32_i64(copy_gtid_228810), m_196691 * n_196692)) {\n        float tmp_228821;\n        \n        tmp_228821 = ((__global\n                       float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                  (copy_i_228815 *\n                                                   ctx_param_ext_222546 +\n                                                   copy_i_228816 *\n                                                   ctx_param_ext_222548)];\n        ((__global float *) mem_224294)[copy_i_228816 * m_196691 +\n                                        copy_i_228815] = tmp_228821;\n    }\n    \n  error_0:\n    return;\n}\n__kernel void mainziscan_stage1_200090(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_225327_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int32_t num_threads_225321, __global\n                                       unsigned char *Y_mem_222225, __global\n                                       unsigned char *mem_222246)\n{\n    #define segscan_group_sizze_200084 (mainzisegscan_group_sizze_200064)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned cha",
                   "r *restrict scan_arr_mem_225327_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_225327_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225322;\n    int32_t local_tid_225323;\n    int64_t group_sizze_225326;\n    int32_t wave_sizze_225325;\n    int32_t group_tid_225324;\n    \n    global_tid_225322 = get_global_id(0);\n    local_tid_225323 = get_local_id(0);\n    group_sizze_225326 = get_local_size(0);\n    wave_sizze_225325 = LOCKSTEP_WIDTH;\n    group_tid_225324 = get_group_id(0);\n    \n    int32_t phys_tid_200090 = global_tid_225322;\n    __local unsigned char *scan_arr_mem_225327;\n    \n    scan_arr_mem_225327 = (__local\n                           unsigned char *) scan_arr_mem_225327_backing_0;\n    \n    int64_t x_200091;\n    int64_t x_200092;\n    \n    x_200091 = (int64_t) 0;\n    for (int64_t j_225329 = 0; j_225329 < sdiv_up64(m_196691 * n_196692,\n                                                    sext_i32_i64(num_threads_225321));\n         j_225329++) {\n        int64_t chunk_offset_225330 = segscan_group_sizze_200084 * j_225329 +\n                sext_i32_i64(group_tid_225324) * (segscan_group_sizze_200084 *\n                                                  sdiv_up64(m_196691 * n_196692,\n                                                            sext_i32_i64(num_threads_225321)));\n        int64_t flat_idx_225331 = chunk_offset_225330 +\n                sext_i32_i64(local_tid_225323);\n        int64_t gtid_200088 = squot64(flat_idx_225331, n_196692);\n        int64_t gtid_200089 = flat_idx_225331 - squot64(flat_idx_225331,\n                                                        n_196692) * n_196692;\n        \n        // threads in bounds read input\n        {\n            if (slt64(gtid_200088, m_196691) && slt64(gtid_200089, n_196692)) {\n                float x_200095;\n                \n                x_200095 = ((__global float *) Y_mem_222225)[gtid",
                   "_200088 *\n                                                             n_196692 +\n                                                             gtid_200089];\n                \n                bool isnan_res_200096;\n                \n                isnan_res_200096 = futrts_isnan32(x_200095);\n                \n                bool defunc_0_p_res_200097 = !isnan_res_200096;\n                int64_t defunc_0_f_res_200098 =\n                        btoi_bool_i64(defunc_0_p_res_200097);\n                \n                // write to-scan values to parameters\n                {\n                    x_200092 = defunc_0_f_res_200098;\n                }\n                // write mapped values results to global memory\n                { }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n                if (!(slt64(gtid_200088, m_196691) && slt64(gtid_200089,\n                                                            n_196692))) {\n                    x_200092 = (int64_t) 0;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                int64_t defunc_1_op_res_200093 = add64(x_200091, x_200092);\n                \n                ((__local\n                  int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)] =\n                    defunc_1_op_res_200093;\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            int64_t x_225332;\n            int64_t x_225333;\n            int64_t x_225335;\n            int64_t x_225336;\n            bool ltid_in_bounds_225338 = slt64(sext_i32_i64(local_tid_225323),\n                                               segscan_group_sizze_200084);\n            int32_t skip_threads_225339;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_225338) {\n                    x_225333 = ((volatile __local\n     ",
                   "                            int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)];\n                    if ((local_tid_225323 - squot32(local_tid_225323, 32) *\n                         32) == 0) {\n                        x_225332 = x_225333;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_225339 = 1;\n                while (slt32(skip_threads_225339, 32)) {\n                    bool thread_active_225340 = sle32(skip_threads_225339,\n                                                      local_tid_225323 -\n                                                      squot32(local_tid_225323,\n                                                              32) * 32) &&\n                         ltid_in_bounds_225338;\n                    \n                    if (thread_active_225340) {\n                        // read operands\n                        {\n                            x_225332 = ((volatile __local\n                                         int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323) -\n                                                                         sext_i32_i64(skip_threads_225339)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_225341 =\n                             slt64(srem64(sext_i32_i64(local_tid_225323) +\n                                          chunk_offset_225330, n_196692),\n                                   sext_i32_i64(local_tid_225323) +\n                                   chunk_offset_225330 -\n                                   (sext_i32_i64(local_tid_225323 -\n                                    skip_threads_225339) +\n                                    chunk_offset_225330));\n                        \n                        if (thread_active_225340 && inactive_225341) {\n                            x_225332 = x_225333;\n",
                   "                        }\n                        if (thread_active_225340) {\n                            if (!inactive_225341) {\n                                int64_t defunc_1_op_res_225334 = add64(x_225332,\n                                                                       x_225333);\n                                \n                                x_225332 = defunc_1_op_res_225334;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_225325, skip_threads_225339)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_225340) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)] =\n                                x_225332;\n                            x_225333 = x_225332;\n                        }\n                    }\n                    if (sle32(wave_sizze_225325, skip_threads_225339)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_225339 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_225323 - squot32(local_tid_225323, 32) * 32) ==\n                    31 && ltid_in_bounds_225338) {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_225327)[sext_i32_i64(squot32(local_tid_225323,\n                                                                           32))] =\n                        x_225332;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_225342;\n                \n      ",
                   "          // read input for in-block scan\n                {\n                    if (squot32(local_tid_225323, 32) == 0 &&\n                        ltid_in_bounds_225338) {\n                        x_225336 = ((volatile __local\n                                     int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)];\n                        if ((local_tid_225323 - squot32(local_tid_225323, 32) *\n                             32) == 0) {\n                            x_225335 = x_225336;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_225342 = 1;\n                    while (slt32(skip_threads_225342, 32)) {\n                        bool thread_active_225343 = sle32(skip_threads_225342,\n                                                          local_tid_225323 -\n                                                          squot32(local_tid_225323,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_225323, 32) == 0 &&\n                              ltid_in_bounds_225338);\n                        \n                        if (thread_active_225343) {\n                            // read operands\n                            {\n                                x_225335 = ((volatile __local\n                                             int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323) -\n                                                                             sext_i32_i64(skip_threads_225342)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_225344 =\n                                 slt64(srem64(sext_i32_i64(local_tid_225323 *\n                                              32 + 32 - 1) +\n                                              chunk_of",
                   "fset_225330, n_196692),\n                                       sext_i32_i64(local_tid_225323 * 32 + 32 -\n                                       1) + chunk_offset_225330 -\n                                       (sext_i32_i64((local_tid_225323 -\n                                                      skip_threads_225342) *\n                                        32 + 32 - 1) + chunk_offset_225330));\n                            \n                            if (thread_active_225343 && inactive_225344) {\n                                x_225335 = x_225336;\n                            }\n                            if (thread_active_225343) {\n                                if (!inactive_225344) {\n                                    int64_t defunc_1_op_res_225337 =\n                                            add64(x_225335, x_225336);\n                                    \n                                    x_225335 = defunc_1_op_res_225337;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_225325, skip_threads_225342)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_225343) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)] =\n                                    x_225335;\n                                x_225336 = x_225335;\n                            }\n                        }\n                        if (sle32(wave_sizze_225325, skip_threads_225342)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_225342 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_225345 = squot32(local",
                   "_tid_225323, 32) == 0 ||\n                 !ltid_in_bounds_225338;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_225345) {\n                        x_225333 = x_225332;\n                        x_225332 = ((__local\n                                     int64_t *) scan_arr_mem_225327)[sext_i32_i64(squot32(local_tid_225323,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225346 =\n                         slt64(srem64(sext_i32_i64(local_tid_225323) +\n                                      chunk_offset_225330, n_196692),\n                               sext_i32_i64(local_tid_225323) +\n                               chunk_offset_225330 -\n                               (sext_i32_i64(squot32(local_tid_225323, 32) *\n                                32 - 1) + chunk_offset_225330));\n                    \n                    if (!no_carry_in_225345) {\n                        if (inactive_225346) {\n                            x_225332 = x_225333;\n                        }\n                    }\n                    if (!no_carry_in_225345) {\n                        if (!inactive_225346) {\n                            int64_t defunc_1_op_res_225334 = add64(x_225332,\n                                                                   x_225333);\n                            \n                            x_225332 = defunc_1_op_res_225334;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_225345) {\n                        ((__local\n                          int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_ti",
                   "d_225323)] =\n                            x_225332;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_225323, 32) == 0 &&\n                    ltid_in_bounds_225338) {\n                    ((__local\n                      int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)] =\n                        x_225333;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if (slt64(gtid_200088, m_196691) && slt64(gtid_200089,\n                                                          n_196692)) {\n                    int64_t tmp_225347;\n                    \n                    tmp_225347 = ((__local\n                                   int64_t *) scan_arr_mem_225327)[sext_i32_i64(local_tid_225323)];\n                    ((__global int64_t *) mem_222246)[gtid_200088 * n_196692 +\n                                                      gtid_200089] = tmp_225347;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_225348 = slt64(srem64(chunk_offset_225330 +\n                                                           segscan_group_sizze_200084,\n                                                           n_196692),\n                                                    chunk_offset_225330 +\n                                                    segscan_group_sizze_200084 -\n                                                    (chunk_offset_225330 +\n                                                     segscan_group_sizze_200084 -\n                                                     (int64_t) 1));\n                bool should_load_carry_225349 = local_tid_225323 == 0 &&\n                    ",
                   " !crosses_segment_225348;\n                \n                if (should_load_carry_225349) {\n                    x_200091 = ((__local\n                                 int64_t *) scan_arr_mem_225327)[segscan_group_sizze_200084 -\n                                                                 (int64_t) 1];\n                }\n                if (!should_load_carry_225349) {\n                    x_200091 = (int64_t) 0;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_200084\n}\n__kernel void mainziscan_stage1_200642(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_225496_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_p_196694,\n                                       int64_t defunc_0_f_res_196740,\n                                       int32_t num_threads_225490, __global\n                                       unsigned char *mem_222263, __global\n                                       unsigned char *mem_222307)\n{\n    #define segscan_group_sizze_200635 (mainzisegscan_group_sizze_200502)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_225496_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_225496_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225491;\n    int32_t local_tid_225492;\n    int64_t group_sizze_225495;\n    int32_t wave_sizze_225494;\n    int32_t group_tid_225493;\n    \n    global_tid_225491 = get_global_id(0);\n    local_tid_225492 = get_local_id(0);\n    group_sizze_225495 = get_local_size(0);\n    wave_sizze_225494 = LOCKSTEP_WIDTH;\n    group_tid_225493 = get_group_id(0);\n    \n    int32_t phys_tid_200642 = g",
                   "lobal_tid_225491;\n    __local unsigned char *scan_arr_mem_225496;\n    \n    scan_arr_mem_225496 = (__local\n                           unsigned char *) scan_arr_mem_225496_backing_0;\n    \n    int64_t x_200643;\n    int64_t x_200644;\n    \n    x_200643 = (int64_t) 0;\n    for (int64_t j_225498 = 0; j_225498 < sdiv_up64(m_196691 * n_p_196694 *\n                                                    defunc_0_f_res_196740,\n                                                    sext_i32_i64(num_threads_225490));\n         j_225498++) {\n        int64_t chunk_offset_225499 = segscan_group_sizze_200635 * j_225498 +\n                sext_i32_i64(group_tid_225493) * (segscan_group_sizze_200635 *\n                                                  sdiv_up64(m_196691 *\n                                                            n_p_196694 *\n                                                            defunc_0_f_res_196740,\n                                                            sext_i32_i64(num_threads_225490)));\n        int64_t flat_idx_225500 = chunk_offset_225499 +\n                sext_i32_i64(local_tid_225492);\n        int64_t gtid_200639 = squot64(flat_idx_225500, n_p_196694 *\n                                      defunc_0_f_res_196740);\n        int64_t gtid_200640 = squot64(flat_idx_225500 - squot64(flat_idx_225500,\n                                                                n_p_196694 *\n                                                                defunc_0_f_res_196740) *\n                                      (n_p_196694 * defunc_0_f_res_196740),\n                                      defunc_0_f_res_196740);\n        int64_t gtid_200641 = flat_idx_225500 - squot64(flat_idx_225500,\n                                                        n_p_196694 *\n                                                        defunc_0_f_res_196740) *\n                (n_p_196694 * defunc_0_f_res_196740) - squot64(flat_idx_225500 -\n                                                               squot64(fl",
                   "at_idx_225500,\n                                                                       n_p_196694 *\n                                                                       defunc_0_f_res_196740) *\n                                                               (n_p_196694 *\n                                                                defunc_0_f_res_196740),\n                                                               defunc_0_f_res_196740) *\n                defunc_0_f_res_196740;\n        \n        // threads in bounds read input\n        {\n            if ((slt64(gtid_200639, m_196691) && slt64(gtid_200640,\n                                                       n_p_196694)) &&\n                slt64(gtid_200641, defunc_0_f_res_196740)) {\n                float x_200648;\n                \n                x_200648 = ((__global float *) mem_222263)[gtid_200639 *\n                                                           (defunc_0_f_res_196740 *\n                                                            n_p_196694) +\n                                                           gtid_200640 *\n                                                           defunc_0_f_res_196740 +\n                                                           gtid_200641];\n                \n                bool isnan_res_200649;\n                \n                isnan_res_200649 = futrts_isnan32(x_200648);\n                \n                bool defunc_0_p_res_200650 = !isnan_res_200649;\n                int64_t defunc_0_f_res_200651 =\n                        btoi_bool_i64(defunc_0_p_res_200650);\n                \n                // write to-scan values to parameters\n                {\n                    x_200644 = defunc_0_f_res_200651;\n                }\n                // write mapped values results to global memory\n                { }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n  ",
                   "              if (!((slt64(gtid_200639, m_196691) && slt64(gtid_200640,\n                                                             n_p_196694)) &&\n                      slt64(gtid_200641, defunc_0_f_res_196740))) {\n                    x_200644 = (int64_t) 0;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                int64_t defunc_1_op_res_200645 = add64(x_200643, x_200644);\n                \n                ((__local\n                  int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)] =\n                    defunc_1_op_res_200645;\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            int64_t x_225501;\n            int64_t x_225502;\n            int64_t x_225504;\n            int64_t x_225505;\n            bool ltid_in_bounds_225507 = slt64(sext_i32_i64(local_tid_225492),\n                                               segscan_group_sizze_200635);\n            int32_t skip_threads_225508;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_225507) {\n                    x_225502 = ((volatile __local\n                                 int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)];\n                    if ((local_tid_225492 - squot32(local_tid_225492, 32) *\n                         32) == 0) {\n                        x_225501 = x_225502;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_225508 = 1;\n                while (slt32(skip_threads_225508, 32)) {\n                    bool thread_active_225509 = sle32(skip_threads_225508,\n                                                      local_tid_225492 -\n                                                      squot32(local_tid_225492,\n                                                              32) * 32) &&\n                         ltid_in_bounds_225507;\n  ",
                   "                  \n                    if (thread_active_225509) {\n                        // read operands\n                        {\n                            x_225501 = ((volatile __local\n                                         int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492) -\n                                                                         sext_i32_i64(skip_threads_225508)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_225510 =\n                             slt64(srem64(sext_i32_i64(local_tid_225492) +\n                                          chunk_offset_225499,\n                                          defunc_0_f_res_196740),\n                                   sext_i32_i64(local_tid_225492) +\n                                   chunk_offset_225499 -\n                                   (sext_i32_i64(local_tid_225492 -\n                                    skip_threads_225508) +\n                                    chunk_offset_225499));\n                        \n                        if (thread_active_225509 && inactive_225510) {\n                            x_225501 = x_225502;\n                        }\n                        if (thread_active_225509) {\n                            if (!inactive_225510) {\n                                int64_t defunc_1_op_res_225503 = add64(x_225501,\n                                                                       x_225502);\n                                \n                                x_225501 = defunc_1_op_res_225503;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_225494, skip_threads_225508)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_225509) {\n                        // write result\n                        {\n                            ((volatile __",
                   "local\n                              int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)] =\n                                x_225501;\n                            x_225502 = x_225501;\n                        }\n                    }\n                    if (sle32(wave_sizze_225494, skip_threads_225508)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_225508 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_225492 - squot32(local_tid_225492, 32) * 32) ==\n                    31 && ltid_in_bounds_225507) {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_225496)[sext_i32_i64(squot32(local_tid_225492,\n                                                                           32))] =\n                        x_225501;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_225511;\n                \n                // read input for in-block scan\n                {\n                    if (squot32(local_tid_225492, 32) == 0 &&\n                        ltid_in_bounds_225507) {\n                        x_225505 = ((volatile __local\n                                     int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)];\n                        if ((local_tid_225492 - squot32(local_tid_225492, 32) *\n                             32) == 0) {\n                            x_225504 = x_225505;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_225511 = 1;\n                    while (slt32(skip_threads_225511, 32)) {\n                        ",
                   "bool thread_active_225512 = sle32(skip_threads_225511,\n                                                          local_tid_225492 -\n                                                          squot32(local_tid_225492,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_225492, 32) == 0 &&\n                              ltid_in_bounds_225507);\n                        \n                        if (thread_active_225512) {\n                            // read operands\n                            {\n                                x_225504 = ((volatile __local\n                                             int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492) -\n                                                                             sext_i32_i64(skip_threads_225511)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_225513 =\n                                 slt64(srem64(sext_i32_i64(local_tid_225492 *\n                                              32 + 32 - 1) +\n                                              chunk_offset_225499,\n                                              defunc_0_f_res_196740),\n                                       sext_i32_i64(local_tid_225492 * 32 + 32 -\n                                       1) + chunk_offset_225499 -\n                                       (sext_i32_i64((local_tid_225492 -\n                                                      skip_threads_225511) *\n                                        32 + 32 - 1) + chunk_offset_225499));\n                            \n                            if (thread_active_225512 && inactive_225513) {\n                                x_225504 = x_225505;\n                            }\n                            if (thread_active_225512) {\n                                if (!inactive_225513) {\n                  ",
                   "                  int64_t defunc_1_op_res_225506 =\n                                            add64(x_225504, x_225505);\n                                    \n                                    x_225504 = defunc_1_op_res_225506;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_225494, skip_threads_225511)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_225512) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)] =\n                                    x_225504;\n                                x_225505 = x_225504;\n                            }\n                        }\n                        if (sle32(wave_sizze_225494, skip_threads_225511)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_225511 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_225514 = squot32(local_tid_225492, 32) == 0 ||\n                 !ltid_in_bounds_225507;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_225514) {\n                        x_225502 = x_225501;\n                        x_225501 = ((__local\n                                     int64_t *) scan_arr_mem_225496)[sext_i32_i64(squot32(local_tid_225492,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                    }\n                }\n                // perform operation\n             ",
                   "   {\n                    bool inactive_225515 =\n                         slt64(srem64(sext_i32_i64(local_tid_225492) +\n                                      chunk_offset_225499,\n                                      defunc_0_f_res_196740),\n                               sext_i32_i64(local_tid_225492) +\n                               chunk_offset_225499 -\n                               (sext_i32_i64(squot32(local_tid_225492, 32) *\n                                32 - 1) + chunk_offset_225499));\n                    \n                    if (!no_carry_in_225514) {\n                        if (inactive_225515) {\n                            x_225501 = x_225502;\n                        }\n                    }\n                    if (!no_carry_in_225514) {\n                        if (!inactive_225515) {\n                            int64_t defunc_1_op_res_225503 = add64(x_225501,\n                                                                   x_225502);\n                            \n                            x_225501 = defunc_1_op_res_225503;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_225514) {\n                        ((__local\n                          int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)] =\n                            x_225501;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_225492, 32) == 0 &&\n                    ltid_in_bounds_225507) {\n                    ((__local\n                      int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)] =\n                        x_225502;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if ((slt64(gtid_200639, m_196691",
                   ") && slt64(gtid_200640,\n                                                           n_p_196694)) &&\n                    slt64(gtid_200641, defunc_0_f_res_196740)) {\n                    int64_t tmp_225516;\n                    \n                    tmp_225516 = ((__local\n                                   int64_t *) scan_arr_mem_225496)[sext_i32_i64(local_tid_225492)];\n                    ((__global int64_t *) mem_222307)[gtid_200639 *\n                                                      (defunc_0_f_res_196740 *\n                                                       n_p_196694) +\n                                                      gtid_200640 *\n                                                      defunc_0_f_res_196740 +\n                                                      gtid_200641] = tmp_225516;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_225517 = slt64(srem64(chunk_offset_225499 +\n                                                           segscan_group_sizze_200635,\n                                                           defunc_0_f_res_196740),\n                                                    chunk_offset_225499 +\n                                                    segscan_group_sizze_200635 -\n                                                    (chunk_offset_225499 +\n                                                     segscan_group_sizze_200635 -\n                                                     (int64_t) 1));\n                bool should_load_carry_225518 = local_tid_225492 == 0 &&\n                     !crosses_segment_225517;\n                \n                if (should_load_carry_225518) {\n                    x_200643 = ((__local\n                                 int64_t *) scan_arr_mem_225496)[segscan_group_sizze_200635 -\n                                                                 (int64_t",
                   ") 1];\n                }\n                if (!should_load_carry_225518) {\n                    x_200643 = (int64_t) 0;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_200635\n}\n__kernel void mainziscan_stage1_211766(__global int *global_failure,\n                                       int failure_is_an_option, __global\n                                       int64_t *global_failure_args,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227142_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_p_196694,\n                                       float i64_res_196737,\n                                       int64_t C_len_196743,\n                                       int64_t lifted_single_ma_l_arg_197247,\n                                       int32_t num_threads_227136, __global\n                                       unsigned char *mem_223557, __global\n                                       unsigned char *ext_mem_223569, __global\n                                       unsigned char *mem_223574)\n{\n    #define segscan_group_sizze_211760 (mainzisegscan_group_sizze_211724)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227142_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227142_backing_aligned_0;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_227137;\n    int32_t local_tid_227138;\n    int64_t group_sizze_227141;\n    int32_t wave_sizze_227140;\n    int32_t group_tid_227139;\n    \n   ",
                   " global_tid_227137 = get_global_id(0);\n    local_tid_227138 = get_local_id(0);\n    group_sizze_227141 = get_local_size(0);\n    wave_sizze_227140 = LOCKSTEP_WIDTH;\n    group_tid_227139 = get_group_id(0);\n    \n    int32_t phys_tid_211766 = global_tid_227137;\n    __local unsigned char *scan_arr_mem_227142;\n    \n    scan_arr_mem_227142 = (__local\n                           unsigned char *) scan_arr_mem_227142_backing_0;\n    \n    float x_211767;\n    float x_211768;\n    \n    x_211767 = 0.0F;\n    for (int64_t j_227144 = 0; j_227144 < sdiv_up64(m_196691 *\n                                                    lifted_single_ma_l_arg_197247,\n                                                    sext_i32_i64(num_threads_227136));\n         j_227144++) {\n        int64_t chunk_offset_227145 = segscan_group_sizze_211760 * j_227144 +\n                sext_i32_i64(group_tid_227139) * (segscan_group_sizze_211760 *\n                                                  sdiv_up64(m_196691 *\n                                                            lifted_single_ma_l_arg_197247,\n                                                            sext_i32_i64(num_threads_227136)));\n        int64_t flat_idx_227146 = chunk_offset_227145 +\n                sext_i32_i64(local_tid_227138);\n        int64_t gtid_211764 = squot64(flat_idx_227146,\n                                      lifted_single_ma_l_arg_197247);\n        int64_t gtid_211765 = flat_idx_227146 - squot64(flat_idx_227146,\n                                                        lifted_single_ma_l_arg_197247) *\n                lifted_single_ma_l_arg_197247;\n        \n        // threads in bounds read input\n        {\n            if (slt64(gtid_211764, m_196691) && slt64(gtid_211765,\n                                                      lifted_single_ma_l_arg_197247)) {\n                bool cond_211773 = gtid_211765 == (int64_t) 0;\n                float defunc_0_f_res_211774;\n                \n                if (cond_211773) {\n                    float ",
                   "x_211771;\n                    \n                    x_211771 = ((__global float *) ext_mem_223569)[gtid_211764];\n                    \n                    float defunc_0_f_res_t_res_211775 = x_211771 /\n                          i64_res_196737;\n                    \n                    defunc_0_f_res_211774 = defunc_0_f_res_t_res_211775;\n                } else {\n                    int64_t x_211776 = add64(n_p_196694, gtid_211765);\n                    int64_t i_211777 = sub64(x_211776, (int64_t) 1);\n                    bool x_211778 = sle64((int64_t) 0, i_211777);\n                    bool y_211779 = slt64(i_211777, C_len_196743);\n                    bool bounds_check_211780 = x_211778 && y_211779;\n                    bool index_certs_211781;\n                    \n                    if (!bounds_check_211780) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          43) == -1) {\n                                global_failure_args[0] = (int64_t) i_211777;\n                                global_failure_args[1] = (int64_t) C_len_196743;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float x_211782;\n                    \n                    x_211782 = ((__global float *) mem_223557)[gtid_211764 *\n                                                               C_len_196743 +\n                                                               i_211777];\n                    \n                    int64_t i_211783 = sub64(gtid_211765, (int64_t) 1);\n                    bool x_211784 = sle64((int64_t) 0, i_211783);\n                    bool y_211785 = slt64(i_211783, C_len_196743);\n                    bool bounds_check_211786 = x_211784 && y_211785;\n                    bool index_certs_211787;",
                   "\n                    \n                    if (!bounds_check_211786) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          44) == -1) {\n                                global_failure_args[0] = (int64_t) i_211783;\n                                global_failure_args[1] = (int64_t) C_len_196743;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float y_211788;\n                    \n                    y_211788 = ((__global float *) mem_223557)[gtid_211764 *\n                                                               C_len_196743 +\n                                                               i_211783];\n                    \n                    float x_211789 = x_211782 - y_211788;\n                    float defunc_0_f_res_f_res_211790 = x_211789 /\n                          i64_res_196737;\n                    \n                    defunc_0_f_res_211774 = defunc_0_f_res_f_res_211790;\n                }\n                // write to-scan values to parameters\n                {\n                    x_211768 = defunc_0_f_res_211774;\n                }\n                // write mapped values results to global memory\n                { }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n                if (!(slt64(gtid_211764, m_196691) && slt64(gtid_211765,\n                                                            lifted_single_ma_l_arg_197247))) {\n                    x_211768 = 0.0F;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                float defunc_1_op_res_211769 = x_211767 + x_211768;\n      ",
                   "          \n                ((__local\n                  float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)] =\n                    defunc_1_op_res_211769;\n            }\n            \n          error_0:\n            barrier(CLK_LOCAL_MEM_FENCE);\n            if (local_failure)\n                return;\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            float x_227147;\n            float x_227148;\n            float x_227150;\n            float x_227151;\n            bool ltid_in_bounds_227153 = slt64(sext_i32_i64(local_tid_227138),\n                                               segscan_group_sizze_211760);\n            int32_t skip_threads_227154;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_227153) {\n                    x_227148 = ((volatile __local\n                                 float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)];\n                    if ((local_tid_227138 - squot32(local_tid_227138, 32) *\n                         32) == 0) {\n                        x_227147 = x_227148;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227154 = 1;\n                while (slt32(skip_threads_227154, 32)) {\n                    bool thread_active_227155 = sle32(skip_threads_227154,\n                                                      local_tid_227138 -\n                                                      squot32(local_tid_227138,\n                                                              32) * 32) &&\n                         ltid_in_bounds_227153;\n                    \n                    if (thread_active_227155) {\n                        // read operands\n                        {\n                            x_227147 = ((volatile __local\n                                         float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138) -\n                                    ",
                   "                                   sext_i32_i64(skip_threads_227154)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227156 =\n                             slt64(srem64(sext_i32_i64(local_tid_227138) +\n                                          chunk_offset_227145,\n                                          lifted_single_ma_l_arg_197247),\n                                   sext_i32_i64(local_tid_227138) +\n                                   chunk_offset_227145 -\n                                   (sext_i32_i64(local_tid_227138 -\n                                    skip_threads_227154) +\n                                    chunk_offset_227145));\n                        \n                        if (thread_active_227155 && inactive_227156) {\n                            x_227147 = x_227148;\n                        }\n                        if (thread_active_227155) {\n                            if (!inactive_227156) {\n                                float defunc_1_op_res_227149 = x_227147 +\n                                      x_227148;\n                                \n                                x_227147 = defunc_1_op_res_227149;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_227140, skip_threads_227154)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_227155) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)] =\n                                x_227147;\n                            x_227148 = x_227147;\n                        }\n                    }\n                    if (sle32(wave_sizze_227140, skip_threads_227154)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n   ",
                   "                 }\n                    skip_threads_227154 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_227138 - squot32(local_tid_227138, 32) * 32) ==\n                    31 && ltid_in_bounds_227153) {\n                    ((volatile __local\n                      float *) scan_arr_mem_227142)[sext_i32_i64(squot32(local_tid_227138,\n                                                                         32))] =\n                        x_227147;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_227157;\n                \n                // read input for in-block scan\n                {\n                    if (squot32(local_tid_227138, 32) == 0 &&\n                        ltid_in_bounds_227153) {\n                        x_227151 = ((volatile __local\n                                     float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)];\n                        if ((local_tid_227138 - squot32(local_tid_227138, 32) *\n                             32) == 0) {\n                            x_227150 = x_227151;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227157 = 1;\n                    while (slt32(skip_threads_227157, 32)) {\n                        bool thread_active_227158 = sle32(skip_threads_227157,\n                                                          local_tid_227138 -\n                                                          squot32(local_tid_227138,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_227138, 32) == 0 &&\n              ",
                   "                ltid_in_bounds_227153);\n                        \n                        if (thread_active_227158) {\n                            // read operands\n                            {\n                                x_227150 = ((volatile __local\n                                             float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138) -\n                                                                           sext_i32_i64(skip_threads_227157)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227159 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227138 *\n                                              32 + 32 - 1) +\n                                              chunk_offset_227145,\n                                              lifted_single_ma_l_arg_197247),\n                                       sext_i32_i64(local_tid_227138 * 32 + 32 -\n                                       1) + chunk_offset_227145 -\n                                       (sext_i32_i64((local_tid_227138 -\n                                                      skip_threads_227157) *\n                                        32 + 32 - 1) + chunk_offset_227145));\n                            \n                            if (thread_active_227158 && inactive_227159) {\n                                x_227150 = x_227151;\n                            }\n                            if (thread_active_227158) {\n                                if (!inactive_227159) {\n                                    float defunc_1_op_res_227152 = x_227150 +\n                                          x_227151;\n                                    \n                                    x_227150 = defunc_1_op_res_227152;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227140, skip_threa",
                   "ds_227157)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227158) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)] =\n                                    x_227150;\n                                x_227151 = x_227150;\n                            }\n                        }\n                        if (sle32(wave_sizze_227140, skip_threads_227157)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227157 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_227160 = squot32(local_tid_227138, 32) == 0 ||\n                 !ltid_in_bounds_227153;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_227160) {\n                        x_227148 = x_227147;\n                        x_227147 = ((__local\n                                     float *) scan_arr_mem_227142)[sext_i32_i64(squot32(local_tid_227138,\n                                                                                        32)) -\n                                                                   (int64_t) 1];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227161 =\n                         slt64(srem64(sext_i32_i64(local_tid_227138) +\n                                      chunk_offset_227145,\n                                      lifted_single_ma_l_arg_197247),\n                               sext_i32_i64(local_tid_227138) +\n                               chunk_offset_227145 -\n                          ",
                   "     (sext_i32_i64(squot32(local_tid_227138, 32) *\n                                32 - 1) + chunk_offset_227145));\n                    \n                    if (!no_carry_in_227160) {\n                        if (inactive_227161) {\n                            x_227147 = x_227148;\n                        }\n                    }\n                    if (!no_carry_in_227160) {\n                        if (!inactive_227161) {\n                            float defunc_1_op_res_227149 = x_227147 + x_227148;\n                            \n                            x_227147 = defunc_1_op_res_227149;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_227160) {\n                        ((__local\n                          float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)] =\n                            x_227147;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_227138, 32) == 0 &&\n                    ltid_in_bounds_227153) {\n                    ((__local\n                      float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)] =\n                        x_227148;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if (slt64(gtid_211764, m_196691) && slt64(gtid_211765,\n                                                          lifted_single_ma_l_arg_197247)) {\n                    float tmp_227162;\n                    \n                    tmp_227162 = ((__local\n                                   float *) scan_arr_mem_227142)[sext_i32_i64(local_tid_227138)];\n                    ((__global float *) mem_223574)[gtid_211764 *\n                                                    lifted_single_ma_l_arg_197247",
                   " +\n                                                    gtid_211765] = tmp_227162;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_227163 = slt64(srem64(chunk_offset_227145 +\n                                                           segscan_group_sizze_211760,\n                                                           lifted_single_ma_l_arg_197247),\n                                                    chunk_offset_227145 +\n                                                    segscan_group_sizze_211760 -\n                                                    (chunk_offset_227145 +\n                                                     segscan_group_sizze_211760 -\n                                                     (int64_t) 1));\n                bool should_load_carry_227164 = local_tid_227138 == 0 &&\n                     !crosses_segment_227163;\n                \n                if (should_load_carry_227164) {\n                    x_211767 = ((__local\n                                 float *) scan_arr_mem_227142)[segscan_group_sizze_211760 -\n                                                               (int64_t) 1];\n                }\n                if (!should_load_carry_227164) {\n                    x_211767 = 0.0F;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_211760\n}\n__kernel void mainziscan_stage1_211897(__global int *global_failure,\n                                       int failure_is_an_option, __global\n                                       int64_t *global_failure_args,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227285_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_p_196694,\n                         ",
                   "              float i64_res_196737,\n                                       int64_t lifted_single_ma_l_arg_197247,\n                                       int64_t dyn_lifted_single_ma_l_arg_197257,\n                                       int32_t num_threads_227279, __global\n                                       unsigned char *mem_223574, __global\n                                       unsigned char *ext_mem_223586, __global\n                                       unsigned char *mem_223591)\n{\n    #define segscan_group_sizze_211891 (mainzisegscan_group_sizze_211855)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227285_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227285_backing_aligned_0;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_227280;\n    int32_t local_tid_227281;\n    int64_t group_sizze_227284;\n    int32_t wave_sizze_227283;\n    int32_t group_tid_227282;\n    \n    global_tid_227280 = get_global_id(0);\n    local_tid_227281 = get_local_id(0);\n    group_sizze_227284 = get_local_size(0);\n    wave_sizze_227283 = LOCKSTEP_WIDTH;\n    group_tid_227282 = get_group_id(0);\n    \n    int32_t phys_tid_211897 = global_tid_227280;\n    __local unsigned char *scan_arr_mem_227285;\n    \n    scan_arr_mem_227285 = (__local\n                           unsigned char *) scan_arr_mem_227285_backing_0;\n    \n    float x_211898;\n    float x_211899;\n    \n    x_211898 = 0.0F;\n    for (int64_t j_227287 = 0; j_227287 < sdiv_up64(m_196691 *\n                                                    dyn_lifted_single_ma_l_arg_197257,\n                                                    sext_i32_i64(num_t",
                   "hreads_227279));\n         j_227287++) {\n        int64_t chunk_offset_227288 = segscan_group_sizze_211891 * j_227287 +\n                sext_i32_i64(group_tid_227282) * (segscan_group_sizze_211891 *\n                                                  sdiv_up64(m_196691 *\n                                                            dyn_lifted_single_ma_l_arg_197257,\n                                                            sext_i32_i64(num_threads_227279)));\n        int64_t flat_idx_227289 = chunk_offset_227288 +\n                sext_i32_i64(local_tid_227281);\n        int64_t gtid_211895 = squot64(flat_idx_227289,\n                                      dyn_lifted_single_ma_l_arg_197257);\n        int64_t gtid_211896 = flat_idx_227289 - squot64(flat_idx_227289,\n                                                        dyn_lifted_single_ma_l_arg_197257) *\n                dyn_lifted_single_ma_l_arg_197257;\n        \n        // threads in bounds read input\n        {\n            if (slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                      dyn_lifted_single_ma_l_arg_197257)) {\n                bool cond_211904 = gtid_211896 == (int64_t) 0;\n                float defunc_0_f_res_211905;\n                \n                if (cond_211904) {\n                    float x_211902;\n                    \n                    x_211902 = ((__global float *) ext_mem_223586)[gtid_211895];\n                    \n                    float defunc_0_f_res_t_res_211906 = x_211902 /\n                          i64_res_196737;\n                    \n                    defunc_0_f_res_211905 = defunc_0_f_res_t_res_211906;\n                } else {\n                    int64_t x_211907 = add64(n_p_196694, gtid_211896);\n                    int64_t i_211908 = sub64(x_211907, (int64_t) 1);\n                    bool x_211909 = sle64((int64_t) 0, i_211908);\n                    bool y_211910 = slt64(i_211908,\n                                          lifted_single_ma_l_arg_197",
                   "247);\n                    bool bounds_check_211911 = x_211909 && y_211910;\n                    bool index_certs_211912;\n                    \n                    if (!bounds_check_211911) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          45) == -1) {\n                                global_failure_args[0] = (int64_t) i_211908;\n                                global_failure_args[1] =\n                                    (int64_t) lifted_single_ma_l_arg_197247;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float x_211913;\n                    \n                    x_211913 = ((__global float *) mem_223574)[gtid_211895 *\n                                                               lifted_single_ma_l_arg_197247 +\n                                                               i_211908];\n                    \n                    int64_t i_211914 = sub64(gtid_211896, (int64_t) 1);\n                    bool x_211915 = sle64((int64_t) 0, i_211914);\n                    bool y_211916 = slt64(i_211914,\n                                          lifted_single_ma_l_arg_197247);\n                    bool bounds_check_211917 = x_211915 && y_211916;\n                    bool index_certs_211918;\n                    \n                    if (!bounds_check_211917) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          46) == -1) {\n                                global_failure_args[0] = (int64_t) i_211914;\n                                global_failure_args[1] =\n                                    (int64_t) lifted_single_ma_l_arg_197247;\n                                ;\n         ",
                   "                   }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float y_211919;\n                    \n                    y_211919 = ((__global float *) mem_223574)[gtid_211895 *\n                                                               lifted_single_ma_l_arg_197247 +\n                                                               i_211914];\n                    \n                    float x_211920 = x_211913 - y_211919;\n                    float defunc_0_f_res_f_res_211921 = x_211920 /\n                          i64_res_196737;\n                    \n                    defunc_0_f_res_211905 = defunc_0_f_res_f_res_211921;\n                }\n                // write to-scan values to parameters\n                {\n                    x_211899 = defunc_0_f_res_211905;\n                }\n                // write mapped values results to global memory\n                { }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n                if (!(slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                            dyn_lifted_single_ma_l_arg_197257))) {\n                    x_211899 = 0.0F;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                float defunc_1_op_res_211900 = x_211898 + x_211899;\n                \n                ((__local\n                  float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)] =\n                    defunc_1_op_res_211900;\n            }\n            \n          error_0:\n            barrier(CLK_LOCAL_MEM_FENCE);\n            if (local_failure)\n                return;\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            float x_227290;\n            float x_227291;\n        ",
                   "    float x_227293;\n            float x_227294;\n            bool ltid_in_bounds_227296 = slt64(sext_i32_i64(local_tid_227281),\n                                               segscan_group_sizze_211891);\n            int32_t skip_threads_227297;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_227296) {\n                    x_227291 = ((volatile __local\n                                 float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)];\n                    if ((local_tid_227281 - squot32(local_tid_227281, 32) *\n                         32) == 0) {\n                        x_227290 = x_227291;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227297 = 1;\n                while (slt32(skip_threads_227297, 32)) {\n                    bool thread_active_227298 = sle32(skip_threads_227297,\n                                                      local_tid_227281 -\n                                                      squot32(local_tid_227281,\n                                                              32) * 32) &&\n                         ltid_in_bounds_227296;\n                    \n                    if (thread_active_227298) {\n                        // read operands\n                        {\n                            x_227290 = ((volatile __local\n                                         float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281) -\n                                                                       sext_i32_i64(skip_threads_227297)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227299 =\n                             slt64(srem64(sext_i32_i64(local_tid_227281) +\n                                          chunk_offset_227288,\n                                          dyn_lifted_singl",
                   "e_ma_l_arg_197257),\n                                   sext_i32_i64(local_tid_227281) +\n                                   chunk_offset_227288 -\n                                   (sext_i32_i64(local_tid_227281 -\n                                    skip_threads_227297) +\n                                    chunk_offset_227288));\n                        \n                        if (thread_active_227298 && inactive_227299) {\n                            x_227290 = x_227291;\n                        }\n                        if (thread_active_227298) {\n                            if (!inactive_227299) {\n                                float defunc_1_op_res_227292 = x_227290 +\n                                      x_227291;\n                                \n                                x_227290 = defunc_1_op_res_227292;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_227283, skip_threads_227297)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_227298) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)] =\n                                x_227290;\n                            x_227291 = x_227290;\n                        }\n                    }\n                    if (sle32(wave_sizze_227283, skip_threads_227297)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_227297 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_227281 - squot32(local_tid_227281, 32) * 32) ==\n                    31 && ltid_in_bounds_227296) {\n                    ((volatile __local\n                      float",
                   " *) scan_arr_mem_227285)[sext_i32_i64(squot32(local_tid_227281,\n                                                                         32))] =\n                        x_227290;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_227300;\n                \n                // read input for in-block scan\n                {\n                    if (squot32(local_tid_227281, 32) == 0 &&\n                        ltid_in_bounds_227296) {\n                        x_227294 = ((volatile __local\n                                     float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)];\n                        if ((local_tid_227281 - squot32(local_tid_227281, 32) *\n                             32) == 0) {\n                            x_227293 = x_227294;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227300 = 1;\n                    while (slt32(skip_threads_227300, 32)) {\n                        bool thread_active_227301 = sle32(skip_threads_227300,\n                                                          local_tid_227281 -\n                                                          squot32(local_tid_227281,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_227281, 32) == 0 &&\n                              ltid_in_bounds_227296);\n                        \n                        if (thread_active_227301) {\n                            // read operands\n                            {\n                                x_227293 = ((volatile __local\n                                             float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281) -\n                                                           ",
                   "                sext_i32_i64(skip_threads_227300)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227302 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227281 *\n                                              32 + 32 - 1) +\n                                              chunk_offset_227288,\n                                              dyn_lifted_single_ma_l_arg_197257),\n                                       sext_i32_i64(local_tid_227281 * 32 + 32 -\n                                       1) + chunk_offset_227288 -\n                                       (sext_i32_i64((local_tid_227281 -\n                                                      skip_threads_227300) *\n                                        32 + 32 - 1) + chunk_offset_227288));\n                            \n                            if (thread_active_227301 && inactive_227302) {\n                                x_227293 = x_227294;\n                            }\n                            if (thread_active_227301) {\n                                if (!inactive_227302) {\n                                    float defunc_1_op_res_227295 = x_227293 +\n                                          x_227294;\n                                    \n                                    x_227293 = defunc_1_op_res_227295;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227283, skip_threads_227300)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227301) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)] =\n                                    x_227293",
                   ";\n                                x_227294 = x_227293;\n                            }\n                        }\n                        if (sle32(wave_sizze_227283, skip_threads_227300)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227300 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_227303 = squot32(local_tid_227281, 32) == 0 ||\n                 !ltid_in_bounds_227296;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_227303) {\n                        x_227291 = x_227290;\n                        x_227290 = ((__local\n                                     float *) scan_arr_mem_227285)[sext_i32_i64(squot32(local_tid_227281,\n                                                                                        32)) -\n                                                                   (int64_t) 1];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227304 =\n                         slt64(srem64(sext_i32_i64(local_tid_227281) +\n                                      chunk_offset_227288,\n                                      dyn_lifted_single_ma_l_arg_197257),\n                               sext_i32_i64(local_tid_227281) +\n                               chunk_offset_227288 -\n                               (sext_i32_i64(squot32(local_tid_227281, 32) *\n                                32 - 1) + chunk_offset_227288));\n                    \n                    if (!no_carry_in_227303) {\n                        if (inactive_227304) {\n                            x_227290 = x_227291;\n                        }\n                    }\n                    if (!no_carry_in_227303) {\n                        if (!inactive_",
                   "227304) {\n                            float defunc_1_op_res_227292 = x_227290 + x_227291;\n                            \n                            x_227290 = defunc_1_op_res_227292;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_227303) {\n                        ((__local\n                          float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)] =\n                            x_227290;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_227281, 32) == 0 &&\n                    ltid_in_bounds_227296) {\n                    ((__local\n                      float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)] =\n                        x_227291;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if (slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                          dyn_lifted_single_ma_l_arg_197257)) {\n                    float tmp_227305;\n                    \n                    tmp_227305 = ((__local\n                                   float *) scan_arr_mem_227285)[sext_i32_i64(local_tid_227281)];\n                    ((__global float *) mem_223591)[gtid_211895 *\n                                                    dyn_lifted_single_ma_l_arg_197257 +\n                                                    gtid_211896] = tmp_227305;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_227306 = slt64(srem64(chunk_offset_227288 +\n                                                           segscan_group_siz",
                   "ze_211891,\n                                                           dyn_lifted_single_ma_l_arg_197257),\n                                                    chunk_offset_227288 +\n                                                    segscan_group_sizze_211891 -\n                                                    (chunk_offset_227288 +\n                                                     segscan_group_sizze_211891 -\n                                                     (int64_t) 1));\n                bool should_load_carry_227307 = local_tid_227281 == 0 &&\n                     !crosses_segment_227306;\n                \n                if (should_load_carry_227307) {\n                    x_211898 = ((__local\n                                 float *) scan_arr_mem_227285)[segscan_group_sizze_211891 -\n                                                               (int64_t) 1];\n                }\n                if (!should_load_carry_227307) {\n                    x_211898 = 0.0F;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_211891\n}\n__kernel void mainziscan_stage1_212028(__global int *global_failure,\n                                       int failure_is_an_option, __global\n                                       int64_t *global_failure_args,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227428_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t dyn_lifted_single_ma_l_arg_197257,\n                                       int32_t num_threads_227422, __global\n                                       unsigned char *mem_223591, __global\n                                       unsigned char *ext_mem_223603, __global\n                                       unsigned char *mem_223608)\n{\n    #define segscan_group_sizze_212022 (mainzise",
                   "gscan_group_sizze_211986)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227428_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227428_backing_aligned_0;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_227423;\n    int32_t local_tid_227424;\n    int64_t group_sizze_227427;\n    int32_t wave_sizze_227426;\n    int32_t group_tid_227425;\n    \n    global_tid_227423 = get_global_id(0);\n    local_tid_227424 = get_local_id(0);\n    group_sizze_227427 = get_local_size(0);\n    wave_sizze_227426 = LOCKSTEP_WIDTH;\n    group_tid_227425 = get_group_id(0);\n    \n    int32_t phys_tid_212028 = global_tid_227423;\n    __local unsigned char *scan_arr_mem_227428;\n    \n    scan_arr_mem_227428 = (__local\n                           unsigned char *) scan_arr_mem_227428_backing_0;\n    \n    float x_212029;\n    float x_212030;\n    \n    x_212029 = 0.0F;\n    for (int64_t j_227430 = 0; j_227430 < sdiv_up64(m_196691 * n_196692,\n                                                    sext_i32_i64(num_threads_227422));\n         j_227430++) {\n        int64_t chunk_offset_227431 = segscan_group_sizze_212022 * j_227430 +\n                sext_i32_i64(group_tid_227425) * (segscan_group_sizze_212022 *\n                                                  sdiv_up64(m_196691 * n_196692,\n                                                            sext_i32_i64(num_threads_227422)));\n        int64_t flat_idx_227432 = chunk_offset_227431 +\n                sext_i32_i64(local_tid_227424);\n        int64_t gtid_212026 = squot64(flat_idx_227432, n_196692);\n        int64_t gtid_212027 = flat_idx_227432 - squot64(flat_idx_227432,\n  ",
                   "                                                      n_196692) * n_196692;\n        \n        // threads in bounds read input\n        {\n            if (slt64(gtid_212026, m_196691) && slt64(gtid_212027, n_196692)) {\n                bool cond_212035 = gtid_212027 == (int64_t) 0;\n                float defunc_0_f_res_212036;\n                \n                if (cond_212035) {\n                    float x_212033;\n                    \n                    x_212033 = ((__global float *) ext_mem_223603)[gtid_212026];\n                    \n                    float defunc_0_f_res_t_res_212037 = x_212033 / 3.0F;\n                    \n                    defunc_0_f_res_212036 = defunc_0_f_res_t_res_212037;\n                } else {\n                    int64_t x_212038 = add64((int64_t) 3, gtid_212027);\n                    int64_t i_212039 = sub64(x_212038, (int64_t) 1);\n                    bool x_212040 = sle64((int64_t) 0, i_212039);\n                    bool y_212041 = slt64(i_212039,\n                                          dyn_lifted_single_ma_l_arg_197257);\n                    bool bounds_check_212042 = x_212040 && y_212041;\n                    bool index_certs_212043;\n                    \n                    if (!bounds_check_212042) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          47) == -1) {\n                                global_failure_args[0] = (int64_t) i_212039;\n                                global_failure_args[1] =\n                                    (int64_t) dyn_lifted_single_ma_l_arg_197257;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float x_212044;\n                    \n                    x_212044 = ((__global float *) mem_223591)[gtid_212026 *\n     ",
                   "                                                          dyn_lifted_single_ma_l_arg_197257 +\n                                                               i_212039];\n                    \n                    int64_t i_212045 = sub64(gtid_212027, (int64_t) 1);\n                    bool x_212046 = sle64((int64_t) 0, i_212045);\n                    bool y_212047 = slt64(i_212045,\n                                          dyn_lifted_single_ma_l_arg_197257);\n                    bool bounds_check_212048 = x_212046 && y_212047;\n                    bool index_certs_212049;\n                    \n                    if (!bounds_check_212048) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          48) == -1) {\n                                global_failure_args[0] = (int64_t) i_212045;\n                                global_failure_args[1] =\n                                    (int64_t) dyn_lifted_single_ma_l_arg_197257;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float y_212050;\n                    \n                    y_212050 = ((__global float *) mem_223591)[gtid_212026 *\n                                                               dyn_lifted_single_ma_l_arg_197257 +\n                                                               i_212045];\n                    \n                    float x_212051 = x_212044 - y_212050;\n                    float defunc_0_f_res_f_res_212052 = x_212051 / 3.0F;\n                    \n                    defunc_0_f_res_212036 = defunc_0_f_res_f_res_212052;\n                }\n                // write to-scan values to parameters\n                {\n                    x_212030 = defunc_0_f_res_212036;\n                }\n                // write mappe",
                   "d values results to global memory\n                { }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n                if (!(slt64(gtid_212026, m_196691) && slt64(gtid_212027,\n                                                            n_196692))) {\n                    x_212030 = 0.0F;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                float defunc_1_op_res_212031 = x_212029 + x_212030;\n                \n                ((__local\n                  float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)] =\n                    defunc_1_op_res_212031;\n            }\n            \n          error_0:\n            barrier(CLK_LOCAL_MEM_FENCE);\n            if (local_failure)\n                return;\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            float x_227433;\n            float x_227434;\n            float x_227436;\n            float x_227437;\n            bool ltid_in_bounds_227439 = slt64(sext_i32_i64(local_tid_227424),\n                                               segscan_group_sizze_212022);\n            int32_t skip_threads_227440;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_227439) {\n                    x_227434 = ((volatile __local\n                                 float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)];\n                    if ((local_tid_227424 - squot32(local_tid_227424, 32) *\n                         32) == 0) {\n                        x_227433 = x_227434;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_227440 = 1;\n                while (slt32(skip_threads_227440, 32)) {\n                    bool thread_active_227441 = sle32(skip_threads_227440,\n                   ",
                   "                                   local_tid_227424 -\n                                                      squot32(local_tid_227424,\n                                                              32) * 32) &&\n                         ltid_in_bounds_227439;\n                    \n                    if (thread_active_227441) {\n                        // read operands\n                        {\n                            x_227433 = ((volatile __local\n                                         float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424) -\n                                                                       sext_i32_i64(skip_threads_227440)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227442 =\n                             slt64(srem64(sext_i32_i64(local_tid_227424) +\n                                          chunk_offset_227431, n_196692),\n                                   sext_i32_i64(local_tid_227424) +\n                                   chunk_offset_227431 -\n                                   (sext_i32_i64(local_tid_227424 -\n                                    skip_threads_227440) +\n                                    chunk_offset_227431));\n                        \n                        if (thread_active_227441 && inactive_227442) {\n                            x_227433 = x_227434;\n                        }\n                        if (thread_active_227441) {\n                            if (!inactive_227442) {\n                                float defunc_1_op_res_227435 = x_227433 +\n                                      x_227434;\n                                \n                                x_227433 = defunc_1_op_res_227435;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_227426, skip_threads_227440)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                  ",
                   "  }\n                    if (thread_active_227441) {\n                        // write result\n                        {\n                            ((volatile __local\n                              float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)] =\n                                x_227433;\n                            x_227434 = x_227433;\n                        }\n                    }\n                    if (sle32(wave_sizze_227426, skip_threads_227440)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_227440 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_227424 - squot32(local_tid_227424, 32) * 32) ==\n                    31 && ltid_in_bounds_227439) {\n                    ((volatile __local\n                      float *) scan_arr_mem_227428)[sext_i32_i64(squot32(local_tid_227424,\n                                                                         32))] =\n                        x_227433;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_227443;\n                \n                // read input for in-block scan\n                {\n                    if (squot32(local_tid_227424, 32) == 0 &&\n                        ltid_in_bounds_227439) {\n                        x_227437 = ((volatile __local\n                                     float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)];\n                        if ((local_tid_227424 - squot32(local_tid_227424, 32) *\n                             32) == 0) {\n                            x_227436 = x_227437;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers neede",
                   "d)\n                {\n                    skip_threads_227443 = 1;\n                    while (slt32(skip_threads_227443, 32)) {\n                        bool thread_active_227444 = sle32(skip_threads_227443,\n                                                          local_tid_227424 -\n                                                          squot32(local_tid_227424,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_227424, 32) == 0 &&\n                              ltid_in_bounds_227439);\n                        \n                        if (thread_active_227444) {\n                            // read operands\n                            {\n                                x_227436 = ((volatile __local\n                                             float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424) -\n                                                                           sext_i32_i64(skip_threads_227443)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227445 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227424 *\n                                              32 + 32 - 1) +\n                                              chunk_offset_227431, n_196692),\n                                       sext_i32_i64(local_tid_227424 * 32 + 32 -\n                                       1) + chunk_offset_227431 -\n                                       (sext_i32_i64((local_tid_227424 -\n                                                      skip_threads_227443) *\n                                        32 + 32 - 1) + chunk_offset_227431));\n                            \n                            if (thread_active_227444 && inactive_227445) {\n                                x_227436 = x_227437;\n                            }\n                            if (thread_act",
                   "ive_227444) {\n                                if (!inactive_227445) {\n                                    float defunc_1_op_res_227438 = x_227436 +\n                                          x_227437;\n                                    \n                                    x_227436 = defunc_1_op_res_227438;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227426, skip_threads_227443)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227444) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)] =\n                                    x_227436;\n                                x_227437 = x_227436;\n                            }\n                        }\n                        if (sle32(wave_sizze_227426, skip_threads_227443)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227443 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_227446 = squot32(local_tid_227424, 32) == 0 ||\n                 !ltid_in_bounds_227439;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_227446) {\n                        x_227434 = x_227433;\n                        x_227433 = ((__local\n                                     float *) scan_arr_mem_227428)[sext_i32_i64(squot32(local_tid_227424,\n                                                                                        32)) -\n                                                                   (int64_t) 1];\n                    ",
                   "}\n                }\n                // perform operation\n                {\n                    bool inactive_227447 =\n                         slt64(srem64(sext_i32_i64(local_tid_227424) +\n                                      chunk_offset_227431, n_196692),\n                               sext_i32_i64(local_tid_227424) +\n                               chunk_offset_227431 -\n                               (sext_i32_i64(squot32(local_tid_227424, 32) *\n                                32 - 1) + chunk_offset_227431));\n                    \n                    if (!no_carry_in_227446) {\n                        if (inactive_227447) {\n                            x_227433 = x_227434;\n                        }\n                    }\n                    if (!no_carry_in_227446) {\n                        if (!inactive_227447) {\n                            float defunc_1_op_res_227435 = x_227433 + x_227434;\n                            \n                            x_227433 = defunc_1_op_res_227435;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_227446) {\n                        ((__local\n                          float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)] =\n                            x_227433;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_227424, 32) == 0 &&\n                    ltid_in_bounds_227439) {\n                    ((__local\n                      float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)] =\n                        x_227434;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if (slt64(gtid_212026, m_196691) && slt64(gtid_212027,\n                                     ",
                   "                     n_196692)) {\n                    float tmp_227448;\n                    \n                    tmp_227448 = ((__local\n                                   float *) scan_arr_mem_227428)[sext_i32_i64(local_tid_227424)];\n                    ((__global float *) mem_223608)[gtid_212026 * n_196692 +\n                                                    gtid_212027] = tmp_227448;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_227449 = slt64(srem64(chunk_offset_227431 +\n                                                           segscan_group_sizze_212022,\n                                                           n_196692),\n                                                    chunk_offset_227431 +\n                                                    segscan_group_sizze_212022 -\n                                                    (chunk_offset_227431 +\n                                                     segscan_group_sizze_212022 -\n                                                     (int64_t) 1));\n                bool should_load_carry_227450 = local_tid_227424 == 0 &&\n                     !crosses_segment_227449;\n                \n                if (should_load_carry_227450) {\n                    x_212029 = ((__local\n                                 float *) scan_arr_mem_227428)[segscan_group_sizze_212022 -\n                                                               (int64_t) 1];\n                }\n                if (!should_load_carry_227450) {\n                    x_212029 = 0.0F;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_212022\n}\n__kernel void mainziscan_stage1_220969(__global int *global_failure,\n                                       __local volatile\n                                       int64_",
                   "t *scan_arr_mem_229423_backing_aligned_0,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229421_backing_aligned_1,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229419_backing_aligned_2,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229417_backing_aligned_3,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int32_t defunc_2_radix_sort_step_arg_220858,\n                                       int32_t defunc_0_get_bit_arg_220859,\n                                       unsigned char cond_f_res_220860_bits,\n                                       unsigned char cond_f_res_220861_bits,\n                                       int32_t num_threads_229411, __global\n                                       unsigned char *mem_param_224799, __global\n                                       unsigned char *mem_224835, __global\n                                       unsigned char *mem_224839, __global\n                                       unsigned char *mem_224843, __global\n                                       unsigned char *mem_224847, __global\n                                       unsigned char *mem_224851)\n{\n    bool cond_f_res_220860 = cond_f_res_220860_bits;\n    bool cond_f_res_220861 = cond_f_res_220861_bits;\n    \n    #define segscan_group_sizze_220959 (mainzisegscan_group_sizze_220690)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_229423_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229423_backing_aligned_0;\n    __local volatile unsigned char *restrict scan_arr_mem_229421_backing_2 =\n                                   (",
                   "__local volatile\n                                    unsigned char *) scan_arr_mem_229421_backing_aligned_1;\n    __local volatile unsigned char *restrict scan_arr_mem_229419_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229419_backing_aligned_2;\n    __local volatile unsigned char *restrict scan_arr_mem_229417_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229417_backing_aligned_3;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229412;\n    int32_t local_tid_229413;\n    int64_t group_sizze_229416;\n    int32_t wave_sizze_229415;\n    int32_t group_tid_229414;\n    \n    global_tid_229412 = get_global_id(0);\n    local_tid_229413 = get_local_id(0);\n    group_sizze_229416 = get_local_size(0);\n    wave_sizze_229415 = LOCKSTEP_WIDTH;\n    group_tid_229414 = get_group_id(0);\n    \n    int32_t phys_tid_220969 = global_tid_229412;\n    __local unsigned char *scan_arr_mem_229417;\n    __local unsigned char *scan_arr_mem_229419;\n    __local unsigned char *scan_arr_mem_229421;\n    __local unsigned char *scan_arr_mem_229423;\n    \n    scan_arr_mem_229417 = (__local\n                           unsigned char *) scan_arr_mem_229417_backing_0;\n    scan_arr_mem_229419 = (__local\n                           unsigned char *) scan_arr_mem_229419_backing_1;\n    scan_arr_mem_229421 = (__local\n                           unsigned char *) scan_arr_mem_229421_backing_2;\n    scan_arr_mem_229423 = (__local\n                           unsigned char *) scan_arr_mem_229423_backing_3;\n    \n    int64_t x_220970;\n    int64_t x_220971;\n    int64_t x_220972;\n    int64_t x_220973;\n    int64_t x_220974;\n    int64_t x_220975;\n    int64_t x_220976;\n    int64_t x_220977;\n    \n    x_220970 = (int64_t) 0;\n    x_220971 = (int64_t) 0;\n    x_220972 = (int64_t) 0;\n    x_220973 = (int64_t) 0;\n    for (int64_t j_229425 = 0; j_2294",
                   "25 < sdiv_up64(m_196691 * n_196692,\n                                                    sext_i32_i64(num_threads_229411));\n         j_229425++) {\n        int64_t chunk_offset_229426 = segscan_group_sizze_220959 * j_229425 +\n                sext_i32_i64(group_tid_229414) * (segscan_group_sizze_220959 *\n                                                  sdiv_up64(m_196691 * n_196692,\n                                                            sext_i32_i64(num_threads_229411)));\n        int64_t flat_idx_229427 = chunk_offset_229426 +\n                sext_i32_i64(local_tid_229413);\n        int64_t gtid_220967 = squot64(flat_idx_229427, n_196692);\n        int64_t gtid_220968 = flat_idx_229427 - squot64(flat_idx_229427,\n                                                        n_196692) * n_196692;\n        \n        // threads in bounds read input\n        {\n            if (slt64(gtid_220967, m_196691) && slt64(gtid_220968, n_196692)) {\n                float x_220983;\n                \n                x_220983 = ((__global float *) mem_param_224799)[gtid_220967 *\n                                                                 n_196692 +\n                                                                 gtid_220968];\n                \n                int32_t i32_arg_220984;\n                \n                i32_arg_220984 = futrts_to_bits32(x_220983);\n                \n                int32_t unsign_arg_220985 = ashr32(i32_arg_220984,\n                                                   defunc_0_get_bit_arg_220859);\n                int32_t unsign_arg_220986 = 1 & unsign_arg_220985;\n                int32_t unsign_arg_220987 = ashr32(i32_arg_220984, 31);\n                int32_t unsign_arg_220988 = 1 & unsign_arg_220987;\n                bool cond_220989 = unsign_arg_220988 == 1;\n                bool x_220990 = !cond_220989;\n                bool y_220991 = cond_f_res_220860 && x_220990;\n                bool cond_220992 = cond_220989 || y_220991;\n                int32_t defunc_1_get_bit_re",
                   "s_220993;\n                \n                if (cond_220992) {\n                    int32_t defunc_1_get_bit_res_t_res_220994 = 1 ^\n                            unsign_arg_220986;\n                    \n                    defunc_1_get_bit_res_220993 =\n                        defunc_1_get_bit_res_t_res_220994;\n                } else {\n                    defunc_1_get_bit_res_220993 = unsign_arg_220986;\n                }\n                \n                int32_t x_220995 = mul32(2, defunc_1_get_bit_res_220993);\n                int32_t unsign_arg_220996 = ashr32(i32_arg_220984,\n                                                   defunc_2_radix_sort_step_arg_220858);\n                int32_t unsign_arg_220997 = 1 & unsign_arg_220996;\n                bool y_220998 = cond_f_res_220861 && x_220990;\n                bool cond_220999 = cond_220989 || y_220998;\n                int32_t defunc_1_get_bit_res_221000;\n                \n                if (cond_220999) {\n                    int32_t defunc_1_get_bit_res_t_res_221001 = 1 ^\n                            unsign_arg_220997;\n                    \n                    defunc_1_get_bit_res_221000 =\n                        defunc_1_get_bit_res_t_res_221001;\n                } else {\n                    defunc_1_get_bit_res_221000 = unsign_arg_220997;\n                }\n                \n                int32_t defunc_0_f_res_221002 = add32(x_220995,\n                                                      defunc_1_get_bit_res_221000);\n                bool cond_221003 = defunc_0_f_res_221002 == 0;\n                int64_t defunc_0_f_res_221004 = btoi_bool_i64(cond_221003);\n                int64_t defunc_0_f_res_221005;\n                int64_t defunc_0_f_res_221006;\n                int64_t defunc_0_f_res_221007;\n                \n                if (cond_221003) {\n                    defunc_0_f_res_221005 = (int64_t) 0;\n                    defunc_0_f_res_221006 = (int64_t) 0;\n                    defunc_0_f_res_221007 = (int64_t) 0;\n              ",
                   "  } else {\n                    bool cond_221008 = defunc_0_f_res_221002 == 1;\n                    int64_t defunc_0_f_res_f_res_221009 =\n                            btoi_bool_i64(cond_221008);\n                    int64_t defunc_0_f_res_f_res_221010;\n                    int64_t defunc_0_f_res_f_res_221011;\n                    \n                    if (cond_221008) {\n                        defunc_0_f_res_f_res_221010 = (int64_t) 0;\n                        defunc_0_f_res_f_res_221011 = (int64_t) 0;\n                    } else {\n                        bool cond_221012 = defunc_0_f_res_221002 == 2;\n                        int64_t defunc_0_f_res_f_res_f_res_221013 =\n                                btoi_bool_i64(cond_221012);\n                        bool cond_neg_221014 = !cond_221012;\n                        int64_t defunc_0_f_res_f_res_f_res_221015 =\n                                btoi_bool_i64(cond_neg_221014);\n                        \n                        defunc_0_f_res_f_res_221010 =\n                            defunc_0_f_res_f_res_f_res_221013;\n                        defunc_0_f_res_f_res_221011 =\n                            defunc_0_f_res_f_res_f_res_221015;\n                    }\n                    defunc_0_f_res_221005 = defunc_0_f_res_f_res_221009;\n                    defunc_0_f_res_221006 = defunc_0_f_res_f_res_221010;\n                    defunc_0_f_res_221007 = defunc_0_f_res_f_res_221011;\n                }\n                // write to-scan values to parameters\n                {\n                    x_220974 = defunc_0_f_res_221004;\n                    x_220975 = defunc_0_f_res_221005;\n                    x_220976 = defunc_0_f_res_221006;\n                    x_220977 = defunc_0_f_res_221007;\n                }\n                // write mapped values results to global memory\n                {\n                    ((__global int32_t *) mem_224851)[gtid_220967 * n_196692 +\n                                                      gtid_220968] =\n                        d",
                   "efunc_0_f_res_221002;\n                }\n            }\n        }\n        // do one intra-group scan operation\n        {\n            // maybe restore some to-scan values to parameters, or read neutral\n            {\n                if (!(slt64(gtid_220967, m_196691) && slt64(gtid_220968,\n                                                            n_196692))) {\n                    x_220974 = (int64_t) 0;\n                    x_220975 = (int64_t) 0;\n                    x_220976 = (int64_t) 0;\n                    x_220977 = (int64_t) 0;\n                }\n            }\n            // combine with carry and write to local memory\n            {\n                int64_t defunc_1_op_res_220978 = add64(x_220970, x_220974);\n                int64_t defunc_1_op_res_220979 = add64(x_220971, x_220975);\n                int64_t defunc_1_op_res_220980 = add64(x_220972, x_220976);\n                int64_t defunc_1_op_res_220981 = add64(x_220973, x_220977);\n                \n                ((__local\n                  int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)] =\n                    defunc_1_op_res_220978;\n                ((__local\n                  int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)] =\n                    defunc_1_op_res_220979;\n                ((__local\n                  int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)] =\n                    defunc_1_op_res_220980;\n                ((__local\n                  int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)] =\n                    defunc_1_op_res_220981;\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            int64_t x_229428;\n            int64_t x_229429;\n            int64_t x_229430;\n            int64_t x_229431;\n            int64_t x_229432;\n            int64_t x_229433;\n            int64_t x_229434;\n            int64_t x_229435;\n            int64_t x_229440;\n            int64_t x_229441;\n            int64_t x_229442;\n            int64_t x_",
                   "229443;\n            int64_t x_229444;\n            int64_t x_229445;\n            int64_t x_229446;\n            int64_t x_229447;\n            bool ltid_in_bounds_229452 = slt64(sext_i32_i64(local_tid_229413),\n                                               segscan_group_sizze_220959);\n            int32_t skip_threads_229453;\n            \n            // read input for in-block scan\n            {\n                if (ltid_in_bounds_229452) {\n                    x_229432 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)];\n                    x_229433 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)];\n                    x_229434 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)];\n                    x_229435 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)];\n                    if ((local_tid_229413 - squot32(local_tid_229413, 32) *\n                         32) == 0) {\n                        x_229428 = x_229432;\n                        x_229429 = x_229433;\n                        x_229430 = x_229434;\n                        x_229431 = x_229435;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_229453 = 1;\n                while (slt32(skip_threads_229453, 32)) {\n                    bool thread_active_229454 = sle32(skip_threads_229453,\n                                                      local_tid_229413 -\n                                                      squot32(local_tid_229413,\n                                                              32) * 32) &&\n                         ltid_in_bounds_229452;\n                    \n                    if (thread_active_229454) {\n                        // re",
                   "ad operands\n                        {\n                            x_229428 = ((volatile __local\n                                         int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413) -\n                                                                         sext_i32_i64(skip_threads_229453)];\n                            x_229429 = ((volatile __local\n                                         int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413) -\n                                                                         sext_i32_i64(skip_threads_229453)];\n                            x_229430 = ((volatile __local\n                                         int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413) -\n                                                                         sext_i32_i64(skip_threads_229453)];\n                            x_229431 = ((volatile __local\n                                         int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413) -\n                                                                         sext_i32_i64(skip_threads_229453)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229455 =\n                             slt64(srem64(sext_i32_i64(local_tid_229413) +\n                                          chunk_offset_229426, n_196692),\n                                   sext_i32_i64(local_tid_229413) +\n                                   chunk_offset_229426 -\n                                   (sext_i32_i64(local_tid_229413 -\n                                    skip_threads_229453) +\n                                    chunk_offset_229426));\n                        \n                        if (thread_active_229454 && inactive_229455) {\n                            x_229428 = x_229432;\n                            x_229429 = x_229433;\n                            x_229430 = x_229434;\n         ",
                   "                   x_229431 = x_229435;\n                        }\n                        if (thread_active_229454) {\n                            if (!inactive_229455) {\n                                int64_t defunc_1_op_res_229436 = add64(x_229428,\n                                                                       x_229432);\n                                int64_t defunc_1_op_res_229437 = add64(x_229429,\n                                                                       x_229433);\n                                int64_t defunc_1_op_res_229438 = add64(x_229430,\n                                                                       x_229434);\n                                int64_t defunc_1_op_res_229439 = add64(x_229431,\n                                                                       x_229435);\n                                \n                                x_229428 = defunc_1_op_res_229436;\n                                x_229429 = defunc_1_op_res_229437;\n                                x_229430 = defunc_1_op_res_229438;\n                                x_229431 = defunc_1_op_res_229439;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_229415, skip_threads_229453)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    if (thread_active_229454) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)] =\n                                x_229428;\n                            x_229432 = x_229428;\n                            ((volatile __local\n                              int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)] =\n                                x_229429;\n                            x_229433 = x_229429;\n                            ((volatile __local\n                     ",
                   "         int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)] =\n                                x_229430;\n                            x_229434 = x_229430;\n                            ((volatile __local\n                              int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)] =\n                                x_229431;\n                            x_229435 = x_229431;\n                        }\n                    }\n                    if (sle32(wave_sizze_229415, skip_threads_229453)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_229453 *= 2;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // last thread of block 'i' writes its result to offset 'i'\n            {\n                if ((local_tid_229413 - squot32(local_tid_229413, 32) * 32) ==\n                    31 && ltid_in_bounds_229452) {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229417)[sext_i32_i64(squot32(local_tid_229413,\n                                                                           32))] =\n                        x_229428;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229419)[sext_i32_i64(squot32(local_tid_229413,\n                                                                           32))] =\n                        x_229429;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229421)[sext_i32_i64(squot32(local_tid_229413,\n                                                                           32))] =\n                        x_229430;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229423)[sext_i32_i64(squot32(local_tid_229413,\n                                                                           32))] =\n                        x_229431;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE",
                   ");\n            // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n            {\n                int32_t skip_threads_229456;\n                \n                // read input for in-block scan\n                {\n                    if (squot32(local_tid_229413, 32) == 0 &&\n                        ltid_in_bounds_229452) {\n                        x_229444 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)];\n                        x_229445 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)];\n                        x_229446 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)];\n                        x_229447 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)];\n                        if ((local_tid_229413 - squot32(local_tid_229413, 32) *\n                             32) == 0) {\n                            x_229440 = x_229444;\n                            x_229441 = x_229445;\n                            x_229442 = x_229446;\n                            x_229443 = x_229447;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_229456 = 1;\n                    while (slt32(skip_threads_229456, 32)) {\n                        bool thread_active_229457 = sle32(skip_threads_229456,\n                                                          local_tid_229413 -\n                                                          squot32(local_tid_229413,\n                                                                  32) * 32) &&\n                             (squot32(local_tid_229413, 32) == 0 &&\n                              ltid_in_bounds_229452);\n              ",
                   "          \n                        if (thread_active_229457) {\n                            // read operands\n                            {\n                                x_229440 = ((volatile __local\n                                             int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413) -\n                                                                             sext_i32_i64(skip_threads_229456)];\n                                x_229441 = ((volatile __local\n                                             int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413) -\n                                                                             sext_i32_i64(skip_threads_229456)];\n                                x_229442 = ((volatile __local\n                                             int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413) -\n                                                                             sext_i32_i64(skip_threads_229456)];\n                                x_229443 = ((volatile __local\n                                             int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413) -\n                                                                             sext_i32_i64(skip_threads_229456)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229458 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229413 *\n                                              32 + 32 - 1) +\n                                              chunk_offset_229426, n_196692),\n                                       sext_i32_i64(local_tid_229413 * 32 + 32 -\n                                       1) + chunk_offset_229426 -\n                                       (sext_i32_i64((local_tid_229413 -\n                                                      skip_threads_229456) *\n                              ",
                   "          32 + 32 - 1) + chunk_offset_229426));\n                            \n                            if (thread_active_229457 && inactive_229458) {\n                                x_229440 = x_229444;\n                                x_229441 = x_229445;\n                                x_229442 = x_229446;\n                                x_229443 = x_229447;\n                            }\n                            if (thread_active_229457) {\n                                if (!inactive_229458) {\n                                    int64_t defunc_1_op_res_229448 =\n                                            add64(x_229440, x_229444);\n                                    int64_t defunc_1_op_res_229449 =\n                                            add64(x_229441, x_229445);\n                                    int64_t defunc_1_op_res_229450 =\n                                            add64(x_229442, x_229446);\n                                    int64_t defunc_1_op_res_229451 =\n                                            add64(x_229443, x_229447);\n                                    \n                                    x_229440 = defunc_1_op_res_229448;\n                                    x_229441 = defunc_1_op_res_229449;\n                                    x_229442 = defunc_1_op_res_229450;\n                                    x_229443 = defunc_1_op_res_229451;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_229415, skip_threads_229456)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_229457) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)] =\n                                    x_229440;\n                                x_22944",
                   "4 = x_229440;\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)] =\n                                    x_229441;\n                                x_229445 = x_229441;\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)] =\n                                    x_229442;\n                                x_229446 = x_229442;\n                                ((volatile __local\n                                  int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)] =\n                                    x_229443;\n                                x_229447 = x_229443;\n                            }\n                        }\n                        if (sle32(wave_sizze_229415, skip_threads_229456)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229456 *= 2;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            \n            bool no_carry_in_229459 = squot32(local_tid_229413, 32) == 0 ||\n                 !ltid_in_bounds_229452;\n            \n            // carry-in for every block except the first\n            {\n                // read operands\n                {\n                    if (!no_carry_in_229459) {\n                        x_229432 = x_229428;\n                        x_229433 = x_229429;\n                        x_229434 = x_229430;\n                        x_229435 = x_229431;\n                        x_229428 = ((__local\n                                     int64_t *) scan_arr_mem_229417)[sext_i32_i64(squot32(local_tid_229413,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                        x_229429 = ((__local\n   ",
                   "                                  int64_t *) scan_arr_mem_229419)[sext_i32_i64(squot32(local_tid_229413,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                        x_229430 = ((__local\n                                     int64_t *) scan_arr_mem_229421)[sext_i32_i64(squot32(local_tid_229413,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                        x_229431 = ((__local\n                                     int64_t *) scan_arr_mem_229423)[sext_i32_i64(squot32(local_tid_229413,\n                                                                                          32)) -\n                                                                     (int64_t) 1];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229460 =\n                         slt64(srem64(sext_i32_i64(local_tid_229413) +\n                                      chunk_offset_229426, n_196692),\n                               sext_i32_i64(local_tid_229413) +\n                               chunk_offset_229426 -\n                               (sext_i32_i64(squot32(local_tid_229413, 32) *\n                                32 - 1) + chunk_offset_229426));\n                    \n                    if (!no_carry_in_229459) {\n                        if (inactive_229460) {\n                            x_229428 = x_229432;\n                            x_229429 = x_229433;\n                            x_229430 = x_229434;\n                            x_229431 = x_229435;\n                        }\n                    }\n                    if (!no_carry_in_229459) {\n                        if (!inactive_229460) {\n                            int64_t defunc_1_op_res_22943",
                   "6 = add64(x_229428,\n                                                                   x_229432);\n                            int64_t defunc_1_op_res_229437 = add64(x_229429,\n                                                                   x_229433);\n                            int64_t defunc_1_op_res_229438 = add64(x_229430,\n                                                                   x_229434);\n                            int64_t defunc_1_op_res_229439 = add64(x_229431,\n                                                                   x_229435);\n                            \n                            x_229428 = defunc_1_op_res_229436;\n                            x_229429 = defunc_1_op_res_229437;\n                            x_229430 = defunc_1_op_res_229438;\n                            x_229431 = defunc_1_op_res_229439;\n                        }\n                    }\n                }\n                // write final result\n                {\n                    if (!no_carry_in_229459) {\n                        ((__local\n                          int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)] =\n                            x_229428;\n                        ((__local\n                          int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)] =\n                            x_229429;\n                        ((__local\n                          int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)] =\n                            x_229430;\n                        ((__local\n                          int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)] =\n                            x_229431;\n                    }\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // restore correct values for first block\n            {\n                if (squot32(local_tid_229413, 32) == 0 &&\n                    ltid_in_bounds_229452) {\n                    ((__local\n                      int64_t *) s",
                   "can_arr_mem_229417)[sext_i32_i64(local_tid_229413)] =\n                        x_229432;\n                    ((__local\n                      int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)] =\n                        x_229433;\n                    ((__local\n                      int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)] =\n                        x_229434;\n                    ((__local\n                      int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)] =\n                        x_229435;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // threads in bounds write partial scan result\n            {\n                if (slt64(gtid_220967, m_196691) && slt64(gtid_220968,\n                                                          n_196692)) {\n                    int64_t tmp_229461;\n                    \n                    tmp_229461 = ((__local\n                                   int64_t *) scan_arr_mem_229417)[sext_i32_i64(local_tid_229413)];\n                    ((__global int64_t *) mem_224835)[gtid_220967 * n_196692 +\n                                                      gtid_220968] = tmp_229461;\n                    \n                    int64_t tmp_229462;\n                    \n                    tmp_229462 = ((__local\n                                   int64_t *) scan_arr_mem_229419)[sext_i32_i64(local_tid_229413)];\n                    ((__global int64_t *) mem_224839)[gtid_220967 * n_196692 +\n                                                      gtid_220968] = tmp_229462;\n                    \n                    int64_t tmp_229463;\n                    \n                    tmp_229463 = ((__local\n                                   int64_t *) scan_arr_mem_229421)[sext_i32_i64(local_tid_229413)];\n                    ((__global int64_t *) mem_224843)[gtid_220967 * n_196692 +\n                                                      gtid_220968] = tmp_229463;\n                    \n            ",
                   "        int64_t tmp_229464;\n                    \n                    tmp_229464 = ((__local\n                                   int64_t *) scan_arr_mem_229423)[sext_i32_i64(local_tid_229413)];\n                    ((__global int64_t *) mem_224847)[gtid_220967 * n_196692 +\n                                                      gtid_220968] = tmp_229464;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n            // first thread reads last element as carry-in for next iteration\n            {\n                bool crosses_segment_229465 = slt64(srem64(chunk_offset_229426 +\n                                                           segscan_group_sizze_220959,\n                                                           n_196692),\n                                                    chunk_offset_229426 +\n                                                    segscan_group_sizze_220959 -\n                                                    (chunk_offset_229426 +\n                                                     segscan_group_sizze_220959 -\n                                                     (int64_t) 1));\n                bool should_load_carry_229466 = local_tid_229413 == 0 &&\n                     !crosses_segment_229465;\n                \n                if (should_load_carry_229466) {\n                    x_220970 = ((__local\n                                 int64_t *) scan_arr_mem_229417)[segscan_group_sizze_220959 -\n                                                                 (int64_t) 1];\n                    x_220971 = ((__local\n                                 int64_t *) scan_arr_mem_229419)[segscan_group_sizze_220959 -\n                                                                 (int64_t) 1];\n                    x_220972 = ((__local\n                                 int64_t *) scan_arr_mem_229421)[segscan_group_sizze_220959 -\n                                                                 (int64_t) 1];\n                    x_220973 = ((__loc",
                   "al\n                                 int64_t *) scan_arr_mem_229423)[segscan_group_sizze_220959 -\n                                                                 (int64_t) 1];\n                }\n                if (!should_load_carry_229466) {\n                    x_220970 = (int64_t) 0;\n                    x_220971 = (int64_t) 0;\n                    x_220972 = (int64_t) 0;\n                    x_220973 = (int64_t) 0;\n                }\n            }\n            barrier(CLK_LOCAL_MEM_FENCE);\n        }\n    }\n    \n  error_1:\n    return;\n    #undef segscan_group_sizze_220959\n}\n__kernel void mainziscan_stage2_200090(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_225355_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t stage1_num_groups_225320,\n                                       int32_t num_threads_225321, __global\n                                       unsigned char *mem_222246)\n{\n    #define segscan_group_sizze_200084 (mainzisegscan_group_sizze_200064)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_225355_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_225355_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225350;\n    int32_t local_tid_225351;\n    int64_t group_sizze_225354;\n    int32_t wave_sizze_225353;\n    int32_t group_tid_225352;\n    \n    global_tid_225350 = get_global_id(0);\n    local_tid_225351 = get_local_id(0);\n    group_sizze_225354 = get_local_size(0);\n    wave_sizze_225353 = LOCKSTEP_WIDTH;\n    group_tid_225352 = get_group_id(0);\n    \n    int32_t phys_tid_200090 = global_tid_225350;\n    __local unsigned char *scan_arr_mem_225355;\n    \n",
                   "    scan_arr_mem_225355 = (__local\n                           unsigned char *) scan_arr_mem_225355_backing_0;\n    \n    int64_t flat_idx_225357 = (sext_i32_i64(local_tid_225351) + (int64_t) 1) *\n            (segscan_group_sizze_200084 * sdiv_up64(m_196691 * n_196692,\n                                                    sext_i32_i64(num_threads_225321))) -\n            (int64_t) 1;\n    int64_t gtid_200088 = squot64(flat_idx_225357, n_196692);\n    int64_t gtid_200089 = flat_idx_225357 - squot64(flat_idx_225357, n_196692) *\n            n_196692;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if (slt64(gtid_200088, m_196691) && slt64(gtid_200089, n_196692)) {\n            int64_t tmp_225358;\n            \n            tmp_225358 = ((__global int64_t *) mem_222246)[gtid_200088 *\n                                                           n_196692 +\n                                                           gtid_200089];\n            ((__local\n              int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                tmp_225358;\n        } else {\n            ((__local\n              int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                (int64_t) 0;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t x_200091;\n    int64_t x_200092;\n    int64_t x_225359;\n    int64_t x_225360;\n    bool ltid_in_bounds_225362 = slt64(sext_i32_i64(local_tid_225351),\n                                       stage1_num_groups_225320);\n    int32_t skip_threads_225363;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225362) {\n            x_200092 = ((volatile __local\n                         int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)];\n            if ((local_tid_225351 - squot32(local_tid_225351, 32) * 32) == 0) {\n                x_200091 = x_200092;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225363 =",
                   " 1;\n        while (slt32(skip_threads_225363, 32)) {\n            bool thread_active_225364 = sle32(skip_threads_225363,\n                                              local_tid_225351 -\n                                              squot32(local_tid_225351, 32) *\n                                              32) && ltid_in_bounds_225362;\n            \n            if (thread_active_225364) {\n                // read operands\n                {\n                    x_200091 = ((volatile __local\n                                 int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351) -\n                                                                 sext_i32_i64(skip_threads_225363)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225365 =\n                     slt64(srem64((sext_i32_i64(local_tid_225351) +\n                                   (int64_t) 1) * (segscan_group_sizze_200084 *\n                                                   sdiv_up64(m_196691 *\n                                                             n_196692,\n                                                             sext_i32_i64(num_threads_225321))) -\n                                  (int64_t) 1, n_196692),\n                           (sext_i32_i64(local_tid_225351) + (int64_t) 1) *\n                           (segscan_group_sizze_200084 * sdiv_up64(m_196691 *\n                                                                   n_196692,\n                                                                   sext_i32_i64(num_threads_225321))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_225351 -\n                                           skip_threads_225363) + (int64_t) 1) *\n                                          (segscan_group_sizze_200084 *\n                                           sdiv_up64(m_196691 * n_196692,\n                                                     sext_i32_i64(num_threads_225321))) -\n                ",
                   "                          (int64_t) 1));\n                \n                if (thread_active_225364 && inactive_225365) {\n                    x_200091 = x_200092;\n                }\n                if (thread_active_225364) {\n                    if (!inactive_225365) {\n                        int64_t defunc_1_op_res_200093 = add64(x_200091,\n                                                               x_200092);\n                        \n                        x_200091 = defunc_1_op_res_200093;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225353, skip_threads_225363)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225364) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                        x_200091;\n                    x_200092 = x_200091;\n                }\n            }\n            if (sle32(wave_sizze_225353, skip_threads_225363)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225363 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225351 - squot32(local_tid_225351, 32) * 32) == 31 &&\n            ltid_in_bounds_225362) {\n            ((volatile __local\n              int64_t *) scan_arr_mem_225355)[sext_i32_i64(squot32(local_tid_225351,\n                                                                   32))] =\n                x_200091;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225366;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225351, 32) == 0 && ltid_in_bounds_225362) {\n                x_225360 = ((volatile __local\n                     ",
                   "        int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)];\n                if ((local_tid_225351 - squot32(local_tid_225351, 32) * 32) ==\n                    0) {\n                    x_225359 = x_225360;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225366 = 1;\n            while (slt32(skip_threads_225366, 32)) {\n                bool thread_active_225367 = sle32(skip_threads_225366,\n                                                  local_tid_225351 -\n                                                  squot32(local_tid_225351,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225351, 32) == 0 &&\n                      ltid_in_bounds_225362);\n                \n                if (thread_active_225367) {\n                    // read operands\n                    {\n                        x_225359 = ((volatile __local\n                                     int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351) -\n                                                                     sext_i32_i64(skip_threads_225366)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225368 =\n                         slt64(srem64((sext_i32_i64(local_tid_225351 * 32 + 32 -\n                                       1) + (int64_t) 1) *\n                                      (segscan_group_sizze_200084 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_225321))) -\n                                      (int64_t) 1, n_196692),\n                               (sext_i32_i64(local_tid_225351 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_200084 *\n                                                sdiv_up64(m_196691 * n_196692,\n           ",
                   "                                               sext_i32_i64(num_threads_225321))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_225351 -\n                                                             skip_threads_225366) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_group_sizze_200084 *\n                                               sdiv_up64(m_196691 * n_196692,\n                                                         sext_i32_i64(num_threads_225321))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_225367 && inactive_225368) {\n                        x_225359 = x_225360;\n                    }\n                    if (thread_active_225367) {\n                        if (!inactive_225368) {\n                            int64_t defunc_1_op_res_225361 = add64(x_225359,\n                                                                   x_225360);\n                            \n                            x_225359 = defunc_1_op_res_225361;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225353, skip_threads_225366)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225367) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                            x_225359;\n                        x_225360 = x_225359;\n                    }\n                }\n                if (sle32(wave_sizze_225353, skip_threads_225366)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225366 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225369 = squot32(local_tid_225351, 3",
                   "2) == 0 ||\n         !ltid_in_bounds_225362;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225369) {\n                x_200092 = x_200091;\n                x_200091 = ((__local\n                             int64_t *) scan_arr_mem_225355)[sext_i32_i64(squot32(local_tid_225351,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225370 =\n                 slt64(srem64((sext_i32_i64(local_tid_225351) + (int64_t) 1) *\n                              (segscan_group_sizze_200084 * sdiv_up64(m_196691 *\n                                                                      n_196692,\n                                                                      sext_i32_i64(num_threads_225321))) -\n                              (int64_t) 1, n_196692),\n                       (sext_i32_i64(local_tid_225351) + (int64_t) 1) *\n                       (segscan_group_sizze_200084 * sdiv_up64(m_196691 *\n                                                               n_196692,\n                                                               sext_i32_i64(num_threads_225321))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_225351,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_200084 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_225321))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_225369) {\n                if (inactive_225370) {\n                    x_200091 = x_200092;\n                }\n            }\n            if (!",
                   "no_carry_in_225369) {\n                if (!inactive_225370) {\n                    int64_t defunc_1_op_res_200093 = add64(x_200091, x_200092);\n                    \n                    x_200091 = defunc_1_op_res_200093;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225369) {\n                ((__local\n                  int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                    x_200091;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225351, 32) == 0 && ltid_in_bounds_225362) {\n            ((__local\n              int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)] =\n                x_200092;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if (slt64(gtid_200088, m_196691) && slt64(gtid_200089, n_196692)) {\n            int64_t tmp_225371;\n            \n            tmp_225371 = ((__local\n                           int64_t *) scan_arr_mem_225355)[sext_i32_i64(local_tid_225351)];\n            ((__global int64_t *) mem_222246)[gtid_200088 * n_196692 +\n                                              gtid_200089] = tmp_225371;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200084\n}\n__kernel void mainziscan_stage2_200642(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_225524_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_p_196694,\n                                       int64_t defunc_0_f_res_196740,\n                                       int64_t stage1_num_groups_225489,\n                                       int32_t num_threads_225490, __global\n                                       unsigned char *mem_222307)\n{\n    #define segscan_group_sizze_200635 (mainzis",
                   "egscan_group_sizze_200502)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_225524_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_225524_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225519;\n    int32_t local_tid_225520;\n    int64_t group_sizze_225523;\n    int32_t wave_sizze_225522;\n    int32_t group_tid_225521;\n    \n    global_tid_225519 = get_global_id(0);\n    local_tid_225520 = get_local_id(0);\n    group_sizze_225523 = get_local_size(0);\n    wave_sizze_225522 = LOCKSTEP_WIDTH;\n    group_tid_225521 = get_group_id(0);\n    \n    int32_t phys_tid_200642 = global_tid_225519;\n    __local unsigned char *scan_arr_mem_225524;\n    \n    scan_arr_mem_225524 = (__local\n                           unsigned char *) scan_arr_mem_225524_backing_0;\n    \n    int64_t flat_idx_225526 = (sext_i32_i64(local_tid_225520) + (int64_t) 1) *\n            (segscan_group_sizze_200635 * sdiv_up64(m_196691 * n_p_196694 *\n                                                    defunc_0_f_res_196740,\n                                                    sext_i32_i64(num_threads_225490))) -\n            (int64_t) 1;\n    int64_t gtid_200639 = squot64(flat_idx_225526, n_p_196694 *\n                                  defunc_0_f_res_196740);\n    int64_t gtid_200640 = squot64(flat_idx_225526 - squot64(flat_idx_225526,\n                                                            n_p_196694 *\n                                                            defunc_0_f_res_196740) *\n                                  (n_p_196694 * defunc_0_f_res_196740),\n                                  defunc_0_f_res_196740);\n    int64_t gtid_200641 = flat_idx_225526 - squot64(flat_idx_225526,\n                                                    n_p_196694 *\n                                                ",
                   "    defunc_0_f_res_196740) *\n            (n_p_196694 * defunc_0_f_res_196740) - squot64(flat_idx_225526 -\n                                                           squot64(flat_idx_225526,\n                                                                   n_p_196694 *\n                                                                   defunc_0_f_res_196740) *\n                                                           (n_p_196694 *\n                                                            defunc_0_f_res_196740),\n                                                           defunc_0_f_res_196740) *\n            defunc_0_f_res_196740;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if ((slt64(gtid_200639, m_196691) && slt64(gtid_200640, n_p_196694)) &&\n            slt64(gtid_200641, defunc_0_f_res_196740)) {\n            int64_t tmp_225527;\n            \n            tmp_225527 = ((__global int64_t *) mem_222307)[gtid_200639 *\n                                                           (defunc_0_f_res_196740 *\n                                                            n_p_196694) +\n                                                           gtid_200640 *\n                                                           defunc_0_f_res_196740 +\n                                                           gtid_200641];\n            ((__local\n              int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)] =\n                tmp_225527;\n        } else {\n            ((__local\n              int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)] =\n                (int64_t) 0;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t x_200643;\n    int64_t x_200644;\n    int64_t x_225528;\n    int64_t x_225529;\n    bool ltid_in_bounds_225531 = slt64(sext_i32_i64(local_tid_225520),\n                                       stage1_num_groups_225489);\n    int32_t skip_threads_225532;\n    \n    // read input for in-block scan\n    {\n      ",
                   "  if (ltid_in_bounds_225531) {\n            x_200644 = ((volatile __local\n                         int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)];\n            if ((local_tid_225520 - squot32(local_tid_225520, 32) * 32) == 0) {\n                x_200643 = x_200644;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225532 = 1;\n        while (slt32(skip_threads_225532, 32)) {\n            bool thread_active_225533 = sle32(skip_threads_225532,\n                                              local_tid_225520 -\n                                              squot32(local_tid_225520, 32) *\n                                              32) && ltid_in_bounds_225531;\n            \n            if (thread_active_225533) {\n                // read operands\n                {\n                    x_200643 = ((volatile __local\n                                 int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520) -\n                                                                 sext_i32_i64(skip_threads_225532)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225534 =\n                     slt64(srem64((sext_i32_i64(local_tid_225520) +\n                                   (int64_t) 1) * (segscan_group_sizze_200635 *\n                                                   sdiv_up64(m_196691 *\n                                                             n_p_196694 *\n                                                             defunc_0_f_res_196740,\n                                                             sext_i32_i64(num_threads_225490))) -\n                                  (int64_t) 1, defunc_0_f_res_196740),\n                           (sext_i32_i64(local_tid_225520) + (int64_t) 1) *\n                           (segscan_group_sizze_200635 * sdiv_up64(m_196691 *\n                                                                   n_p_196694 *\n            ",
                   "                                                       defunc_0_f_res_196740,\n                                                                   sext_i32_i64(num_threads_225490))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_225520 -\n                                           skip_threads_225532) + (int64_t) 1) *\n                                          (segscan_group_sizze_200635 *\n                                           sdiv_up64(m_196691 * n_p_196694 *\n                                                     defunc_0_f_res_196740,\n                                                     sext_i32_i64(num_threads_225490))) -\n                                          (int64_t) 1));\n                \n                if (thread_active_225533 && inactive_225534) {\n                    x_200643 = x_200644;\n                }\n                if (thread_active_225533) {\n                    if (!inactive_225534) {\n                        int64_t defunc_1_op_res_200645 = add64(x_200643,\n                                                               x_200644);\n                        \n                        x_200643 = defunc_1_op_res_200645;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225522, skip_threads_225532)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225533) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)] =\n                        x_200643;\n                    x_200644 = x_200643;\n                }\n            }\n            if (sle32(wave_sizze_225522, skip_threads_225532)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225532 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225520 - squot32(local_",
                   "tid_225520, 32) * 32) == 31 &&\n            ltid_in_bounds_225531) {\n            ((volatile __local\n              int64_t *) scan_arr_mem_225524)[sext_i32_i64(squot32(local_tid_225520,\n                                                                   32))] =\n                x_200643;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225535;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225520, 32) == 0 && ltid_in_bounds_225531) {\n                x_225529 = ((volatile __local\n                             int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)];\n                if ((local_tid_225520 - squot32(local_tid_225520, 32) * 32) ==\n                    0) {\n                    x_225528 = x_225529;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225535 = 1;\n            while (slt32(skip_threads_225535, 32)) {\n                bool thread_active_225536 = sle32(skip_threads_225535,\n                                                  local_tid_225520 -\n                                                  squot32(local_tid_225520,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225520, 32) == 0 &&\n                      ltid_in_bounds_225531);\n                \n                if (thread_active_225536) {\n                    // read operands\n                    {\n                        x_225528 = ((volatile __local\n                                     int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520) -\n                                                                     sext_i32_i64(skip_threads_225535)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225537 =\n   ",
                   "                      slt64(srem64((sext_i32_i64(local_tid_225520 * 32 + 32 -\n                                       1) + (int64_t) 1) *\n                                      (segscan_group_sizze_200635 *\n                                       sdiv_up64(m_196691 * n_p_196694 *\n                                                 defunc_0_f_res_196740,\n                                                 sext_i32_i64(num_threads_225490))) -\n                                      (int64_t) 1, defunc_0_f_res_196740),\n                               (sext_i32_i64(local_tid_225520 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_200635 *\n                                                sdiv_up64(m_196691 *\n                                                          n_p_196694 *\n                                                          defunc_0_f_res_196740,\n                                                          sext_i32_i64(num_threads_225490))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_225520 -\n                                                             skip_threads_225535) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_group_sizze_200635 *\n                                               sdiv_up64(m_196691 * n_p_196694 *\n                                                         defunc_0_f_res_196740,\n                                                         sext_i32_i64(num_threads_225490))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_225536 && inactive_225537) {\n                        x_225528 = x_225529;\n                    }\n                    if (thread_active_225536) {\n                        if (!inactive_225537) {\n                            int64_t defunc_1_op_res_225530 = add64(x_225528,\n                                                        ",
                   "           x_225529);\n                            \n                            x_225528 = defunc_1_op_res_225530;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225522, skip_threads_225535)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225536) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)] =\n                            x_225528;\n                        x_225529 = x_225528;\n                    }\n                }\n                if (sle32(wave_sizze_225522, skip_threads_225535)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225535 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225538 = squot32(local_tid_225520, 32) == 0 ||\n         !ltid_in_bounds_225531;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225538) {\n                x_200644 = x_200643;\n                x_200643 = ((__local\n                             int64_t *) scan_arr_mem_225524)[sext_i32_i64(squot32(local_tid_225520,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225539 =\n                 slt64(srem64((sext_i32_i64(local_tid_225520) + (int64_t) 1) *\n                              (segscan_group_sizze_200635 * sdiv_up64(m_196691 *\n                                                                      n_p_196694 *\n                                                                      defunc_0_f_res_196740,\n                                                                    ",
                   "  sext_i32_i64(num_threads_225490))) -\n                              (int64_t) 1, defunc_0_f_res_196740),\n                       (sext_i32_i64(local_tid_225520) + (int64_t) 1) *\n                       (segscan_group_sizze_200635 * sdiv_up64(m_196691 *\n                                                               n_p_196694 *\n                                                               defunc_0_f_res_196740,\n                                                               sext_i32_i64(num_threads_225490))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_225520,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_200635 *\n                                       sdiv_up64(m_196691 * n_p_196694 *\n                                                 defunc_0_f_res_196740,\n                                                 sext_i32_i64(num_threads_225490))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_225538) {\n                if (inactive_225539) {\n                    x_200643 = x_200644;\n                }\n            }\n            if (!no_carry_in_225538) {\n                if (!inactive_225539) {\n                    int64_t defunc_1_op_res_200645 = add64(x_200643, x_200644);\n                    \n                    x_200643 = defunc_1_op_res_200645;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225538) {\n                ((__local\n                  int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)] =\n                    x_200643;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225520, 32) == 0 && ltid_in_bounds_225531) {\n            ((__local\n              int64_t *) scan_arr_mem_225524)[sext_i3",
                   "2_i64(local_tid_225520)] =\n                x_200644;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if ((slt64(gtid_200639, m_196691) && slt64(gtid_200640, n_p_196694)) &&\n            slt64(gtid_200641, defunc_0_f_res_196740)) {\n            int64_t tmp_225540;\n            \n            tmp_225540 = ((__local\n                           int64_t *) scan_arr_mem_225524)[sext_i32_i64(local_tid_225520)];\n            ((__global int64_t *) mem_222307)[gtid_200639 *\n                                              (defunc_0_f_res_196740 *\n                                               n_p_196694) + gtid_200640 *\n                                              defunc_0_f_res_196740 +\n                                              gtid_200641] = tmp_225540;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200635\n}\n__kernel void mainziscan_stage2_211766(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227170_backing_aligned_0,\n                                       int64_t m_196691,\n                                       int64_t lifted_single_ma_l_arg_197247,\n                                       int64_t stage1_num_groups_227135,\n                                       int32_t num_threads_227136, __global\n                                       unsigned char *mem_223574)\n{\n    #define segscan_group_sizze_211760 (mainzisegscan_group_sizze_211724)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227170_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227170_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227165;\n    int32_t local_tid_227166;\n    int64_t group_sizze_227169",
                   ";\n    int32_t wave_sizze_227168;\n    int32_t group_tid_227167;\n    \n    global_tid_227165 = get_global_id(0);\n    local_tid_227166 = get_local_id(0);\n    group_sizze_227169 = get_local_size(0);\n    wave_sizze_227168 = LOCKSTEP_WIDTH;\n    group_tid_227167 = get_group_id(0);\n    \n    int32_t phys_tid_211766 = global_tid_227165;\n    __local unsigned char *scan_arr_mem_227170;\n    \n    scan_arr_mem_227170 = (__local\n                           unsigned char *) scan_arr_mem_227170_backing_0;\n    \n    int64_t flat_idx_227172 = (sext_i32_i64(local_tid_227166) + (int64_t) 1) *\n            (segscan_group_sizze_211760 * sdiv_up64(m_196691 *\n                                                    lifted_single_ma_l_arg_197247,\n                                                    sext_i32_i64(num_threads_227136))) -\n            (int64_t) 1;\n    int64_t gtid_211764 = squot64(flat_idx_227172,\n                                  lifted_single_ma_l_arg_197247);\n    int64_t gtid_211765 = flat_idx_227172 - squot64(flat_idx_227172,\n                                                    lifted_single_ma_l_arg_197247) *\n            lifted_single_ma_l_arg_197247;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if (slt64(gtid_211764, m_196691) && slt64(gtid_211765,\n                                                  lifted_single_ma_l_arg_197247)) {\n            float tmp_227173;\n            \n            tmp_227173 = ((__global float *) mem_223574)[gtid_211764 *\n                                                         lifted_single_ma_l_arg_197247 +\n                                                         gtid_211765];\n            ((__local\n              float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                tmp_227173;\n        } else {\n            ((__local\n              float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                0.0F;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float x_211767;\n    float x_",
                   "211768;\n    float x_227174;\n    float x_227175;\n    bool ltid_in_bounds_227177 = slt64(sext_i32_i64(local_tid_227166),\n                                       stage1_num_groups_227135);\n    int32_t skip_threads_227178;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_227177) {\n            x_211768 = ((volatile __local\n                         float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)];\n            if ((local_tid_227166 - squot32(local_tid_227166, 32) * 32) == 0) {\n                x_211767 = x_211768;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_227178 = 1;\n        while (slt32(skip_threads_227178, 32)) {\n            bool thread_active_227179 = sle32(skip_threads_227178,\n                                              local_tid_227166 -\n                                              squot32(local_tid_227166, 32) *\n                                              32) && ltid_in_bounds_227177;\n            \n            if (thread_active_227179) {\n                // read operands\n                {\n                    x_211767 = ((volatile __local\n                                 float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166) -\n                                                               sext_i32_i64(skip_threads_227178)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227180 =\n                     slt64(srem64((sext_i32_i64(local_tid_227166) +\n                                   (int64_t) 1) * (segscan_group_sizze_211760 *\n                                                   sdiv_up64(m_196691 *\n                                                             lifted_single_ma_l_arg_197247,\n                                                             sext_i32_i64(num_threads_227136))) -\n                                  (int64_t) 1, lifted_single_ma_l_arg_197247),\n                           (sext_i32_i6",
                   "4(local_tid_227166) + (int64_t) 1) *\n                           (segscan_group_sizze_211760 * sdiv_up64(m_196691 *\n                                                                   lifted_single_ma_l_arg_197247,\n                                                                   sext_i32_i64(num_threads_227136))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_227166 -\n                                           skip_threads_227178) + (int64_t) 1) *\n                                          (segscan_group_sizze_211760 *\n                                           sdiv_up64(m_196691 *\n                                                     lifted_single_ma_l_arg_197247,\n                                                     sext_i32_i64(num_threads_227136))) -\n                                          (int64_t) 1));\n                \n                if (thread_active_227179 && inactive_227180) {\n                    x_211767 = x_211768;\n                }\n                if (thread_active_227179) {\n                    if (!inactive_227180) {\n                        float defunc_1_op_res_211769 = x_211767 + x_211768;\n                        \n                        x_211767 = defunc_1_op_res_211769;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_227168, skip_threads_227178)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_227179) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                        x_211767;\n                    x_211768 = x_211767;\n                }\n            }\n            if (sle32(wave_sizze_227168, skip_threads_227178)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_227178 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset",
                   " 'i'\n    {\n        if ((local_tid_227166 - squot32(local_tid_227166, 32) * 32) == 31 &&\n            ltid_in_bounds_227177) {\n            ((volatile __local\n              float *) scan_arr_mem_227170)[sext_i32_i64(squot32(local_tid_227166,\n                                                                 32))] =\n                x_211767;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_227181;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_227166, 32) == 0 && ltid_in_bounds_227177) {\n                x_227175 = ((volatile __local\n                             float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)];\n                if ((local_tid_227166 - squot32(local_tid_227166, 32) * 32) ==\n                    0) {\n                    x_227174 = x_227175;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_227181 = 1;\n            while (slt32(skip_threads_227181, 32)) {\n                bool thread_active_227182 = sle32(skip_threads_227181,\n                                                  local_tid_227166 -\n                                                  squot32(local_tid_227166,\n                                                          32) * 32) &&\n                     (squot32(local_tid_227166, 32) == 0 &&\n                      ltid_in_bounds_227177);\n                \n                if (thread_active_227182) {\n                    // read operands\n                    {\n                        x_227174 = ((volatile __local\n                                     float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166) -\n                                                                   sext_i32_i64(skip_threads_227181)];\n                    }\n                }\n                // perform operation\n                {",
                   "\n                    bool inactive_227183 =\n                         slt64(srem64((sext_i32_i64(local_tid_227166 * 32 + 32 -\n                                       1) + (int64_t) 1) *\n                                      (segscan_group_sizze_211760 *\n                                       sdiv_up64(m_196691 *\n                                                 lifted_single_ma_l_arg_197247,\n                                                 sext_i32_i64(num_threads_227136))) -\n                                      (int64_t) 1,\n                                      lifted_single_ma_l_arg_197247),\n                               (sext_i32_i64(local_tid_227166 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_211760 *\n                                                sdiv_up64(m_196691 *\n                                                          lifted_single_ma_l_arg_197247,\n                                                          sext_i32_i64(num_threads_227136))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_227166 -\n                                                             skip_threads_227181) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_group_sizze_211760 *\n                                               sdiv_up64(m_196691 *\n                                                         lifted_single_ma_l_arg_197247,\n                                                         sext_i32_i64(num_threads_227136))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_227182 && inactive_227183) {\n                        x_227174 = x_227175;\n                    }\n                    if (thread_active_227182) {\n                        if (!inactive_227183) {\n                            float defunc_1_op_res_227176 = x_227174 + x_227175;\n                            \n    ",
                   "                        x_227174 = defunc_1_op_res_227176;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227168, skip_threads_227181)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_227182) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                            x_227174;\n                        x_227175 = x_227174;\n                    }\n                }\n                if (sle32(wave_sizze_227168, skip_threads_227181)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_227181 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_227184 = squot32(local_tid_227166, 32) == 0 ||\n         !ltid_in_bounds_227177;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_227184) {\n                x_211768 = x_211767;\n                x_211767 = ((__local\n                             float *) scan_arr_mem_227170)[sext_i32_i64(squot32(local_tid_227166,\n                                                                                32)) -\n                                                           (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_227185 =\n                 slt64(srem64((sext_i32_i64(local_tid_227166) + (int64_t) 1) *\n                              (segscan_group_sizze_211760 * sdiv_up64(m_196691 *\n                                                                      lifted_single_ma_l_arg_197247,\n                                                                      sext_i32_i64(num_threads_227136))) -\n                              (int64_t) 1, lifted_single_ma_l_arg_197247),\n                       (",
                   "sext_i32_i64(local_tid_227166) + (int64_t) 1) *\n                       (segscan_group_sizze_211760 * sdiv_up64(m_196691 *\n                                                               lifted_single_ma_l_arg_197247,\n                                                               sext_i32_i64(num_threads_227136))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_227166,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_211760 *\n                                       sdiv_up64(m_196691 *\n                                                 lifted_single_ma_l_arg_197247,\n                                                 sext_i32_i64(num_threads_227136))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_227184) {\n                if (inactive_227185) {\n                    x_211767 = x_211768;\n                }\n            }\n            if (!no_carry_in_227184) {\n                if (!inactive_227185) {\n                    float defunc_1_op_res_211769 = x_211767 + x_211768;\n                    \n                    x_211767 = defunc_1_op_res_211769;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_227184) {\n                ((__local\n                  float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                    x_211767;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_227166, 32) == 0 && ltid_in_bounds_227177) {\n            ((__local\n              float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)] =\n                x_211768;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if (slt64(gtid_211764, m_196691) && slt64(gtid_2117",
                   "65,\n                                                  lifted_single_ma_l_arg_197247)) {\n            float tmp_227186;\n            \n            tmp_227186 = ((__local\n                           float *) scan_arr_mem_227170)[sext_i32_i64(local_tid_227166)];\n            ((__global float *) mem_223574)[gtid_211764 *\n                                            lifted_single_ma_l_arg_197247 +\n                                            gtid_211765] = tmp_227186;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211760\n}\n__kernel void mainziscan_stage2_211897(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227313_backing_aligned_0,\n                                       int64_t m_196691,\n                                       int64_t dyn_lifted_single_ma_l_arg_197257,\n                                       int64_t stage1_num_groups_227278,\n                                       int32_t num_threads_227279, __global\n                                       unsigned char *mem_223591)\n{\n    #define segscan_group_sizze_211891 (mainzisegscan_group_sizze_211855)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227313_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227313_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227308;\n    int32_t local_tid_227309;\n    int64_t group_sizze_227312;\n    int32_t wave_sizze_227311;\n    int32_t group_tid_227310;\n    \n    global_tid_227308 = get_global_id(0);\n    local_tid_227309 = get_local_id(0);\n    group_sizze_227312 = get_local_size(0);\n    wave_sizze_227311 = LOCKSTEP_WIDTH;\n    group_tid_227310 = get_group_id(0);\n    \n    int32_t phys_tid_211897 = global_tid_227308;\n    __local unsigned ",
                   "char *scan_arr_mem_227313;\n    \n    scan_arr_mem_227313 = (__local\n                           unsigned char *) scan_arr_mem_227313_backing_0;\n    \n    int64_t flat_idx_227315 = (sext_i32_i64(local_tid_227309) + (int64_t) 1) *\n            (segscan_group_sizze_211891 * sdiv_up64(m_196691 *\n                                                    dyn_lifted_single_ma_l_arg_197257,\n                                                    sext_i32_i64(num_threads_227279))) -\n            (int64_t) 1;\n    int64_t gtid_211895 = squot64(flat_idx_227315,\n                                  dyn_lifted_single_ma_l_arg_197257);\n    int64_t gtid_211896 = flat_idx_227315 - squot64(flat_idx_227315,\n                                                    dyn_lifted_single_ma_l_arg_197257) *\n            dyn_lifted_single_ma_l_arg_197257;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if (slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                  dyn_lifted_single_ma_l_arg_197257)) {\n            float tmp_227316;\n            \n            tmp_227316 = ((__global float *) mem_223591)[gtid_211895 *\n                                                         dyn_lifted_single_ma_l_arg_197257 +\n                                                         gtid_211896];\n            ((__local\n              float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                tmp_227316;\n        } else {\n            ((__local\n              float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                0.0F;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float x_211898;\n    float x_211899;\n    float x_227317;\n    float x_227318;\n    bool ltid_in_bounds_227320 = slt64(sext_i32_i64(local_tid_227309),\n                                       stage1_num_groups_227278);\n    int32_t skip_threads_227321;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_227320) {\n            x_211899 = ",
                   "((volatile __local\n                         float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)];\n            if ((local_tid_227309 - squot32(local_tid_227309, 32) * 32) == 0) {\n                x_211898 = x_211899;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_227321 = 1;\n        while (slt32(skip_threads_227321, 32)) {\n            bool thread_active_227322 = sle32(skip_threads_227321,\n                                              local_tid_227309 -\n                                              squot32(local_tid_227309, 32) *\n                                              32) && ltid_in_bounds_227320;\n            \n            if (thread_active_227322) {\n                // read operands\n                {\n                    x_211898 = ((volatile __local\n                                 float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309) -\n                                                               sext_i32_i64(skip_threads_227321)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227323 =\n                     slt64(srem64((sext_i32_i64(local_tid_227309) +\n                                   (int64_t) 1) * (segscan_group_sizze_211891 *\n                                                   sdiv_up64(m_196691 *\n                                                             dyn_lifted_single_ma_l_arg_197257,\n                                                             sext_i32_i64(num_threads_227279))) -\n                                  (int64_t) 1,\n                                  dyn_lifted_single_ma_l_arg_197257),\n                           (sext_i32_i64(local_tid_227309) + (int64_t) 1) *\n                           (segscan_group_sizze_211891 * sdiv_up64(m_196691 *\n                                                                   dyn_lifted_single_ma_l_arg_197257,\n                                                                  ",
                   " sext_i32_i64(num_threads_227279))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_227309 -\n                                           skip_threads_227321) + (int64_t) 1) *\n                                          (segscan_group_sizze_211891 *\n                                           sdiv_up64(m_196691 *\n                                                     dyn_lifted_single_ma_l_arg_197257,\n                                                     sext_i32_i64(num_threads_227279))) -\n                                          (int64_t) 1));\n                \n                if (thread_active_227322 && inactive_227323) {\n                    x_211898 = x_211899;\n                }\n                if (thread_active_227322) {\n                    if (!inactive_227323) {\n                        float defunc_1_op_res_211900 = x_211898 + x_211899;\n                        \n                        x_211898 = defunc_1_op_res_211900;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_227311, skip_threads_227321)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_227322) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                        x_211898;\n                    x_211899 = x_211898;\n                }\n            }\n            if (sle32(wave_sizze_227311, skip_threads_227321)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_227321 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_227309 - squot32(local_tid_227309, 32) * 32) == 31 &&\n            ltid_in_bounds_227320) {\n            ((volatile __local\n              float *) scan_arr_mem_227313)[sext_i32_i64(squot32(local_tid_227309,\n                                    ",
                   "                             32))] =\n                x_211898;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_227324;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_227309, 32) == 0 && ltid_in_bounds_227320) {\n                x_227318 = ((volatile __local\n                             float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)];\n                if ((local_tid_227309 - squot32(local_tid_227309, 32) * 32) ==\n                    0) {\n                    x_227317 = x_227318;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_227324 = 1;\n            while (slt32(skip_threads_227324, 32)) {\n                bool thread_active_227325 = sle32(skip_threads_227324,\n                                                  local_tid_227309 -\n                                                  squot32(local_tid_227309,\n                                                          32) * 32) &&\n                     (squot32(local_tid_227309, 32) == 0 &&\n                      ltid_in_bounds_227320);\n                \n                if (thread_active_227325) {\n                    // read operands\n                    {\n                        x_227317 = ((volatile __local\n                                     float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309) -\n                                                                   sext_i32_i64(skip_threads_227324)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227326 =\n                         slt64(srem64((sext_i32_i64(local_tid_227309 * 32 + 32 -\n                                       1) + (int64_t) 1) *\n                                      (segscan_group_sizze_211891 *\n                       ",
                   "                sdiv_up64(m_196691 *\n                                                 dyn_lifted_single_ma_l_arg_197257,\n                                                 sext_i32_i64(num_threads_227279))) -\n                                      (int64_t) 1,\n                                      dyn_lifted_single_ma_l_arg_197257),\n                               (sext_i32_i64(local_tid_227309 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_211891 *\n                                                sdiv_up64(m_196691 *\n                                                          dyn_lifted_single_ma_l_arg_197257,\n                                                          sext_i32_i64(num_threads_227279))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_227309 -\n                                                             skip_threads_227324) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_group_sizze_211891 *\n                                               sdiv_up64(m_196691 *\n                                                         dyn_lifted_single_ma_l_arg_197257,\n                                                         sext_i32_i64(num_threads_227279))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_227325 && inactive_227326) {\n                        x_227317 = x_227318;\n                    }\n                    if (thread_active_227325) {\n                        if (!inactive_227326) {\n                            float defunc_1_op_res_227319 = x_227317 + x_227318;\n                            \n                            x_227317 = defunc_1_op_res_227319;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227311, skip_threads_227324)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n               ",
                   " }\n                if (thread_active_227325) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                            x_227317;\n                        x_227318 = x_227317;\n                    }\n                }\n                if (sle32(wave_sizze_227311, skip_threads_227324)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_227324 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_227327 = squot32(local_tid_227309, 32) == 0 ||\n         !ltid_in_bounds_227320;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_227327) {\n                x_211899 = x_211898;\n                x_211898 = ((__local\n                             float *) scan_arr_mem_227313)[sext_i32_i64(squot32(local_tid_227309,\n                                                                                32)) -\n                                                           (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_227328 =\n                 slt64(srem64((sext_i32_i64(local_tid_227309) + (int64_t) 1) *\n                              (segscan_group_sizze_211891 * sdiv_up64(m_196691 *\n                                                                      dyn_lifted_single_ma_l_arg_197257,\n                                                                      sext_i32_i64(num_threads_227279))) -\n                              (int64_t) 1, dyn_lifted_single_ma_l_arg_197257),\n                       (sext_i32_i64(local_tid_227309) + (int64_t) 1) *\n                       (segscan_group_sizze_211891 * sdiv_up64(m_196691 *\n                                                               dyn_lifted_single_ma_l_arg_197257,\n                               ",
                   "                                sext_i32_i64(num_threads_227279))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_227309,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_211891 *\n                                       sdiv_up64(m_196691 *\n                                                 dyn_lifted_single_ma_l_arg_197257,\n                                                 sext_i32_i64(num_threads_227279))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_227327) {\n                if (inactive_227328) {\n                    x_211898 = x_211899;\n                }\n            }\n            if (!no_carry_in_227327) {\n                if (!inactive_227328) {\n                    float defunc_1_op_res_211900 = x_211898 + x_211899;\n                    \n                    x_211898 = defunc_1_op_res_211900;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_227327) {\n                ((__local\n                  float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                    x_211898;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_227309, 32) == 0 && ltid_in_bounds_227320) {\n            ((__local\n              float *) scan_arr_mem_227313)[sext_i32_i64(local_tid_227309)] =\n                x_211899;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if (slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                  dyn_lifted_single_ma_l_arg_197257)) {\n            float tmp_227329;\n            \n            tmp_227329 = ((__local\n                           float *) scan_arr_mem_227313)[sext_i32_i64(loc",
                   "al_tid_227309)];\n            ((__global float *) mem_223591)[gtid_211895 *\n                                            dyn_lifted_single_ma_l_arg_197257 +\n                                            gtid_211896] = tmp_227329;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211891\n}\n__kernel void mainziscan_stage2_212028(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_227456_backing_aligned_0,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t stage1_num_groups_227421,\n                                       int32_t num_threads_227422, __global\n                                       unsigned char *mem_223608)\n{\n    #define segscan_group_sizze_212022 (mainzisegscan_group_sizze_211986)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_227456_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_227456_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227451;\n    int32_t local_tid_227452;\n    int64_t group_sizze_227455;\n    int32_t wave_sizze_227454;\n    int32_t group_tid_227453;\n    \n    global_tid_227451 = get_global_id(0);\n    local_tid_227452 = get_local_id(0);\n    group_sizze_227455 = get_local_size(0);\n    wave_sizze_227454 = LOCKSTEP_WIDTH;\n    group_tid_227453 = get_group_id(0);\n    \n    int32_t phys_tid_212028 = global_tid_227451;\n    __local unsigned char *scan_arr_mem_227456;\n    \n    scan_arr_mem_227456 = (__local\n                           unsigned char *) scan_arr_mem_227456_backing_0;\n    \n    int64_t flat_idx_227458 = (sext_i32_i64(local_tid_227452) + (int64_t) 1) *\n            (segscan_group_sizze_212022 * sdiv_up64(m_196691 * n_196692,\n",
                   "                                                    sext_i32_i64(num_threads_227422))) -\n            (int64_t) 1;\n    int64_t gtid_212026 = squot64(flat_idx_227458, n_196692);\n    int64_t gtid_212027 = flat_idx_227458 - squot64(flat_idx_227458, n_196692) *\n            n_196692;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if (slt64(gtid_212026, m_196691) && slt64(gtid_212027, n_196692)) {\n            float tmp_227459;\n            \n            tmp_227459 = ((__global float *) mem_223608)[gtid_212026 *\n                                                         n_196692 +\n                                                         gtid_212027];\n            ((__local\n              float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                tmp_227459;\n        } else {\n            ((__local\n              float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                0.0F;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float x_212029;\n    float x_212030;\n    float x_227460;\n    float x_227461;\n    bool ltid_in_bounds_227463 = slt64(sext_i32_i64(local_tid_227452),\n                                       stage1_num_groups_227421);\n    int32_t skip_threads_227464;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_227463) {\n            x_212030 = ((volatile __local\n                         float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)];\n            if ((local_tid_227452 - squot32(local_tid_227452, 32) * 32) == 0) {\n                x_212029 = x_212030;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_227464 = 1;\n        while (slt32(skip_threads_227464, 32)) {\n            bool thread_active_227465 = sle32(skip_threads_227464,\n                                              local_tid_227452 -\n                                              squot32(local_tid_227452, 32) *\n                                 ",
                   "             32) && ltid_in_bounds_227463;\n            \n            if (thread_active_227465) {\n                // read operands\n                {\n                    x_212029 = ((volatile __local\n                                 float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452) -\n                                                               sext_i32_i64(skip_threads_227464)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_227466 =\n                     slt64(srem64((sext_i32_i64(local_tid_227452) +\n                                   (int64_t) 1) * (segscan_group_sizze_212022 *\n                                                   sdiv_up64(m_196691 *\n                                                             n_196692,\n                                                             sext_i32_i64(num_threads_227422))) -\n                                  (int64_t) 1, n_196692),\n                           (sext_i32_i64(local_tid_227452) + (int64_t) 1) *\n                           (segscan_group_sizze_212022 * sdiv_up64(m_196691 *\n                                                                   n_196692,\n                                                                   sext_i32_i64(num_threads_227422))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_227452 -\n                                           skip_threads_227464) + (int64_t) 1) *\n                                          (segscan_group_sizze_212022 *\n                                           sdiv_up64(m_196691 * n_196692,\n                                                     sext_i32_i64(num_threads_227422))) -\n                                          (int64_t) 1));\n                \n                if (thread_active_227465 && inactive_227466) {\n                    x_212029 = x_212030;\n                }\n                if (thread_active_227465) {\n                    if (!inactive_227466) {\n                        float de",
                   "func_1_op_res_212031 = x_212029 + x_212030;\n                        \n                        x_212029 = defunc_1_op_res_212031;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_227454, skip_threads_227464)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_227465) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                        x_212029;\n                    x_212030 = x_212029;\n                }\n            }\n            if (sle32(wave_sizze_227454, skip_threads_227464)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_227464 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_227452 - squot32(local_tid_227452, 32) * 32) == 31 &&\n            ltid_in_bounds_227463) {\n            ((volatile __local\n              float *) scan_arr_mem_227456)[sext_i32_i64(squot32(local_tid_227452,\n                                                                 32))] =\n                x_212029;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_227467;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_227452, 32) == 0 && ltid_in_bounds_227463) {\n                x_227461 = ((volatile __local\n                             float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)];\n                if ((local_tid_227452 - squot32(local_tid_227452, 32) * 32) ==\n                    0) {\n                    x_227460 = x_227461;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_227467 = 1;\n            whil",
                   "e (slt32(skip_threads_227467, 32)) {\n                bool thread_active_227468 = sle32(skip_threads_227467,\n                                                  local_tid_227452 -\n                                                  squot32(local_tid_227452,\n                                                          32) * 32) &&\n                     (squot32(local_tid_227452, 32) == 0 &&\n                      ltid_in_bounds_227463);\n                \n                if (thread_active_227468) {\n                    // read operands\n                    {\n                        x_227460 = ((volatile __local\n                                     float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452) -\n                                                                   sext_i32_i64(skip_threads_227467)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_227469 =\n                         slt64(srem64((sext_i32_i64(local_tid_227452 * 32 + 32 -\n                                       1) + (int64_t) 1) *\n                                      (segscan_group_sizze_212022 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_227422))) -\n                                      (int64_t) 1, n_196692),\n                               (sext_i32_i64(local_tid_227452 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_212022 *\n                                                sdiv_up64(m_196691 * n_196692,\n                                                          sext_i32_i64(num_threads_227422))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_227452 -\n                                                             skip_threads_227467) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_gro",
                   "up_sizze_212022 *\n                                               sdiv_up64(m_196691 * n_196692,\n                                                         sext_i32_i64(num_threads_227422))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_227468 && inactive_227469) {\n                        x_227460 = x_227461;\n                    }\n                    if (thread_active_227468) {\n                        if (!inactive_227469) {\n                            float defunc_1_op_res_227462 = x_227460 + x_227461;\n                            \n                            x_227460 = defunc_1_op_res_227462;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_227454, skip_threads_227467)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_227468) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                            x_227460;\n                        x_227461 = x_227460;\n                    }\n                }\n                if (sle32(wave_sizze_227454, skip_threads_227467)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_227467 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_227470 = squot32(local_tid_227452, 32) == 0 ||\n         !ltid_in_bounds_227463;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_227470) {\n                x_212030 = x_212029;\n                x_212029 = ((__local\n                             float *) scan_arr_mem_227456)[sext_i32_i64(squot32(local_tid_227452,\n                                                                                32)) -\n                       ",
                   "                                    (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_227471 =\n                 slt64(srem64((sext_i32_i64(local_tid_227452) + (int64_t) 1) *\n                              (segscan_group_sizze_212022 * sdiv_up64(m_196691 *\n                                                                      n_196692,\n                                                                      sext_i32_i64(num_threads_227422))) -\n                              (int64_t) 1, n_196692),\n                       (sext_i32_i64(local_tid_227452) + (int64_t) 1) *\n                       (segscan_group_sizze_212022 * sdiv_up64(m_196691 *\n                                                               n_196692,\n                                                               sext_i32_i64(num_threads_227422))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_227452,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_212022 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_227422))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_227470) {\n                if (inactive_227471) {\n                    x_212029 = x_212030;\n                }\n            }\n            if (!no_carry_in_227470) {\n                if (!inactive_227471) {\n                    float defunc_1_op_res_212031 = x_212029 + x_212030;\n                    \n                    x_212029 = defunc_1_op_res_212031;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_227470) {\n                ((__local\n                  float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                    x_21202",
                   "9;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_227452, 32) == 0 && ltid_in_bounds_227463) {\n            ((__local\n              float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)] =\n                x_212030;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if (slt64(gtid_212026, m_196691) && slt64(gtid_212027, n_196692)) {\n            float tmp_227472;\n            \n            tmp_227472 = ((__local\n                           float *) scan_arr_mem_227456)[sext_i32_i64(local_tid_227452)];\n            ((__global float *) mem_223608)[gtid_212026 * n_196692 +\n                                            gtid_212027] = tmp_227472;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_212022\n}\n__kernel void mainziscan_stage2_220969(__global int *global_failure,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229478_backing_aligned_0,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229476_backing_aligned_1,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229474_backing_aligned_2,\n                                       __local volatile\n                                       int64_t *scan_arr_mem_229472_backing_aligned_3,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t stage1_num_groups_229410,\n                                       int32_t num_threads_229411, __global\n                                       unsigned char *mem_224835, __global\n                                       unsigned char *mem_224839, __global\n                                       unsigned char *mem_224843, __global\n                   ",
                   "                    unsigned char *mem_224847)\n{\n    #define segscan_group_sizze_220959 (mainzisegscan_group_sizze_220690)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict scan_arr_mem_229478_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229478_backing_aligned_0;\n    __local volatile unsigned char *restrict scan_arr_mem_229476_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229476_backing_aligned_1;\n    __local volatile unsigned char *restrict scan_arr_mem_229474_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229474_backing_aligned_2;\n    __local volatile unsigned char *restrict scan_arr_mem_229472_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) scan_arr_mem_229472_backing_aligned_3;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229467;\n    int32_t local_tid_229468;\n    int64_t group_sizze_229471;\n    int32_t wave_sizze_229470;\n    int32_t group_tid_229469;\n    \n    global_tid_229467 = get_global_id(0);\n    local_tid_229468 = get_local_id(0);\n    group_sizze_229471 = get_local_size(0);\n    wave_sizze_229470 = LOCKSTEP_WIDTH;\n    group_tid_229469 = get_group_id(0);\n    \n    int32_t phys_tid_220969 = global_tid_229467;\n    __local unsigned char *scan_arr_mem_229472;\n    __local unsigned char *scan_arr_mem_229474;\n    __local unsigned char *scan_arr_mem_229476;\n    __local unsigned char *scan_arr_mem_229478;\n    \n    scan_arr_mem_229472 = (__local\n                           unsigned char *) scan_arr_mem_229472_backing_0;\n    scan_arr_mem_229474 = (__local\n                           unsigned char *) scan_arr_mem_229474_backing_1;\n  ",
                   "  scan_arr_mem_229476 = (__local\n                           unsigned char *) scan_arr_mem_229476_backing_2;\n    scan_arr_mem_229478 = (__local\n                           unsigned char *) scan_arr_mem_229478_backing_3;\n    \n    int64_t flat_idx_229480 = (sext_i32_i64(local_tid_229468) + (int64_t) 1) *\n            (segscan_group_sizze_220959 * sdiv_up64(m_196691 * n_196692,\n                                                    sext_i32_i64(num_threads_229411))) -\n            (int64_t) 1;\n    int64_t gtid_220967 = squot64(flat_idx_229480, n_196692);\n    int64_t gtid_220968 = flat_idx_229480 - squot64(flat_idx_229480, n_196692) *\n            n_196692;\n    \n    // threads in bound read carries; others get neutral element\n    {\n        if (slt64(gtid_220967, m_196691) && slt64(gtid_220968, n_196692)) {\n            int64_t tmp_229481;\n            \n            tmp_229481 = ((__global int64_t *) mem_224835)[gtid_220967 *\n                                                           n_196692 +\n                                                           gtid_220968];\n            ((__local\n              int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n                tmp_229481;\n            \n            int64_t tmp_229482;\n            \n            tmp_229482 = ((__global int64_t *) mem_224839)[gtid_220967 *\n                                                           n_196692 +\n                                                           gtid_220968];\n            ((__local\n              int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                tmp_229482;\n            \n            int64_t tmp_229483;\n            \n            tmp_229483 = ((__global int64_t *) mem_224843)[gtid_220967 *\n                                                           n_196692 +\n                                                           gtid_220968];\n            ((__local\n              int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                tmp_229",
                   "483;\n            \n            int64_t tmp_229484;\n            \n            tmp_229484 = ((__global int64_t *) mem_224847)[gtid_220967 *\n                                                           n_196692 +\n                                                           gtid_220968];\n            ((__local\n              int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                tmp_229484;\n        } else {\n            ((__local\n              int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n                (int64_t) 0;\n            ((__local\n              int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                (int64_t) 0;\n            ((__local\n              int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                (int64_t) 0;\n            ((__local\n              int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                (int64_t) 0;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t x_220970;\n    int64_t x_220971;\n    int64_t x_220972;\n    int64_t x_220973;\n    int64_t x_220974;\n    int64_t x_220975;\n    int64_t x_220976;\n    int64_t x_220977;\n    int64_t x_229485;\n    int64_t x_229486;\n    int64_t x_229487;\n    int64_t x_229488;\n    int64_t x_229489;\n    int64_t x_229490;\n    int64_t x_229491;\n    int64_t x_229492;\n    bool ltid_in_bounds_229497 = slt64(sext_i32_i64(local_tid_229468),\n                                       stage1_num_groups_229410);\n    int32_t skip_threads_229498;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_229497) {\n            x_220974 = ((volatile __local\n                         int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)];\n            x_220975 = ((volatile __local\n                         int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)];\n            x_220976 = ((volatile __local\n                         int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229",
                   "468)];\n            x_220977 = ((volatile __local\n                         int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)];\n            if ((local_tid_229468 - squot32(local_tid_229468, 32) * 32) == 0) {\n                x_220970 = x_220974;\n                x_220971 = x_220975;\n                x_220972 = x_220976;\n                x_220973 = x_220977;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_229498 = 1;\n        while (slt32(skip_threads_229498, 32)) {\n            bool thread_active_229499 = sle32(skip_threads_229498,\n                                              local_tid_229468 -\n                                              squot32(local_tid_229468, 32) *\n                                              32) && ltid_in_bounds_229497;\n            \n            if (thread_active_229499) {\n                // read operands\n                {\n                    x_220970 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468) -\n                                                                 sext_i32_i64(skip_threads_229498)];\n                    x_220971 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468) -\n                                                                 sext_i32_i64(skip_threads_229498)];\n                    x_220972 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468) -\n                                                                 sext_i32_i64(skip_threads_229498)];\n                    x_220973 = ((volatile __local\n                                 int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468) -\n                                                                 sext_i32_i64(skip_threads_229498)];\n                }\n            }\n            // perform operation\n            ",
                   "{\n                bool inactive_229500 =\n                     slt64(srem64((sext_i32_i64(local_tid_229468) +\n                                   (int64_t) 1) * (segscan_group_sizze_220959 *\n                                                   sdiv_up64(m_196691 *\n                                                             n_196692,\n                                                             sext_i32_i64(num_threads_229411))) -\n                                  (int64_t) 1, n_196692),\n                           (sext_i32_i64(local_tid_229468) + (int64_t) 1) *\n                           (segscan_group_sizze_220959 * sdiv_up64(m_196691 *\n                                                                   n_196692,\n                                                                   sext_i32_i64(num_threads_229411))) -\n                           (int64_t) 1 - ((sext_i32_i64(local_tid_229468 -\n                                           skip_threads_229498) + (int64_t) 1) *\n                                          (segscan_group_sizze_220959 *\n                                           sdiv_up64(m_196691 * n_196692,\n                                                     sext_i32_i64(num_threads_229411))) -\n                                          (int64_t) 1));\n                \n                if (thread_active_229499 && inactive_229500) {\n                    x_220970 = x_220974;\n                    x_220971 = x_220975;\n                    x_220972 = x_220976;\n                    x_220973 = x_220977;\n                }\n                if (thread_active_229499) {\n                    if (!inactive_229500) {\n                        int64_t defunc_1_op_res_220978 = add64(x_220970,\n                                                               x_220974);\n                        int64_t defunc_1_op_res_220979 = add64(x_220971,\n                                                               x_220975);\n                        int64_t defunc_1_op_res_220980 = add64(x_220972,\n           ",
                   "                                                    x_220976);\n                        int64_t defunc_1_op_res_220981 = add64(x_220973,\n                                                               x_220977);\n                        \n                        x_220970 = defunc_1_op_res_220978;\n                        x_220971 = defunc_1_op_res_220979;\n                        x_220972 = defunc_1_op_res_220980;\n                        x_220973 = defunc_1_op_res_220981;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_229470, skip_threads_229498)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_229499) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n                        x_220970;\n                    x_220974 = x_220970;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                        x_220971;\n                    x_220975 = x_220971;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                        x_220972;\n                    x_220976 = x_220972;\n                    ((volatile __local\n                      int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                        x_220973;\n                    x_220977 = x_220973;\n                }\n            }\n            if (sle32(wave_sizze_229470, skip_threads_229498)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_229498 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_229468 - squot32(local_tid_229468, 32) * 32) == 31 &&\n            ltid_in_bounds_229497) {\n            ((volatile ",
                   "__local\n              int64_t *) scan_arr_mem_229472)[sext_i32_i64(squot32(local_tid_229468,\n                                                                   32))] =\n                x_220970;\n            ((volatile __local\n              int64_t *) scan_arr_mem_229474)[sext_i32_i64(squot32(local_tid_229468,\n                                                                   32))] =\n                x_220971;\n            ((volatile __local\n              int64_t *) scan_arr_mem_229476)[sext_i32_i64(squot32(local_tid_229468,\n                                                                   32))] =\n                x_220972;\n            ((volatile __local\n              int64_t *) scan_arr_mem_229478)[sext_i32_i64(squot32(local_tid_229468,\n                                                                   32))] =\n                x_220973;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_229501;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_229468, 32) == 0 && ltid_in_bounds_229497) {\n                x_229489 = ((volatile __local\n                             int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)];\n                x_229490 = ((volatile __local\n                             int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)];\n                x_229491 = ((volatile __local\n                             int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)];\n                x_229492 = ((volatile __local\n                             int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)];\n                if ((local_tid_229468 - squot32(local_tid_229468, 32) * 32) ==\n                    0) {\n                    x_229485 = x_229489;\n                    x_229486 = x_229490;\n                    x_229487 = x_229491;\n                    x_229488 = x_229492;\n          ",
                   "      }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_229501 = 1;\n            while (slt32(skip_threads_229501, 32)) {\n                bool thread_active_229502 = sle32(skip_threads_229501,\n                                                  local_tid_229468 -\n                                                  squot32(local_tid_229468,\n                                                          32) * 32) &&\n                     (squot32(local_tid_229468, 32) == 0 &&\n                      ltid_in_bounds_229497);\n                \n                if (thread_active_229502) {\n                    // read operands\n                    {\n                        x_229485 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468) -\n                                                                     sext_i32_i64(skip_threads_229501)];\n                        x_229486 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468) -\n                                                                     sext_i32_i64(skip_threads_229501)];\n                        x_229487 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468) -\n                                                                     sext_i32_i64(skip_threads_229501)];\n                        x_229488 = ((volatile __local\n                                     int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468) -\n                                                                     sext_i32_i64(skip_threads_229501)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229503 =\n                         slt64(srem64((sext_i32_i64(local_tid_229468 * 32 + 32 -\n                                    ",
                   "   1) + (int64_t) 1) *\n                                      (segscan_group_sizze_220959 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_229411))) -\n                                      (int64_t) 1, n_196692),\n                               (sext_i32_i64(local_tid_229468 * 32 + 32 - 1) +\n                                (int64_t) 1) * (segscan_group_sizze_220959 *\n                                                sdiv_up64(m_196691 * n_196692,\n                                                          sext_i32_i64(num_threads_229411))) -\n                               (int64_t) 1 - ((sext_i32_i64((local_tid_229468 -\n                                                             skip_threads_229501) *\n                                               32 + 32 - 1) + (int64_t) 1) *\n                                              (segscan_group_sizze_220959 *\n                                               sdiv_up64(m_196691 * n_196692,\n                                                         sext_i32_i64(num_threads_229411))) -\n                                              (int64_t) 1));\n                    \n                    if (thread_active_229502 && inactive_229503) {\n                        x_229485 = x_229489;\n                        x_229486 = x_229490;\n                        x_229487 = x_229491;\n                        x_229488 = x_229492;\n                    }\n                    if (thread_active_229502) {\n                        if (!inactive_229503) {\n                            int64_t defunc_1_op_res_229493 = add64(x_229485,\n                                                                   x_229489);\n                            int64_t defunc_1_op_res_229494 = add64(x_229486,\n                                                                   x_229490);\n                            int64_t defunc_1_op_res_229495 = add64(x_229487,\n                                      ",
                   "                             x_229491);\n                            int64_t defunc_1_op_res_229496 = add64(x_229488,\n                                                                   x_229492);\n                            \n                            x_229485 = defunc_1_op_res_229493;\n                            x_229486 = defunc_1_op_res_229494;\n                            x_229487 = defunc_1_op_res_229495;\n                            x_229488 = defunc_1_op_res_229496;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_229470, skip_threads_229501)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229502) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n                            x_229485;\n                        x_229489 = x_229485;\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                            x_229486;\n                        x_229490 = x_229486;\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                            x_229487;\n                        x_229491 = x_229487;\n                        ((volatile __local\n                          int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                            x_229488;\n                        x_229492 = x_229488;\n                    }\n                }\n                if (sle32(wave_sizze_229470, skip_threads_229501)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_229501 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_229504 = squot32(local_tid_229468, 32)",
                   " == 0 ||\n         !ltid_in_bounds_229497;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_229504) {\n                x_220974 = x_220970;\n                x_220975 = x_220971;\n                x_220976 = x_220972;\n                x_220977 = x_220973;\n                x_220970 = ((__local\n                             int64_t *) scan_arr_mem_229472)[sext_i32_i64(squot32(local_tid_229468,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n                x_220971 = ((__local\n                             int64_t *) scan_arr_mem_229474)[sext_i32_i64(squot32(local_tid_229468,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n                x_220972 = ((__local\n                             int64_t *) scan_arr_mem_229476)[sext_i32_i64(squot32(local_tid_229468,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n                x_220973 = ((__local\n                             int64_t *) scan_arr_mem_229478)[sext_i32_i64(squot32(local_tid_229468,\n                                                                                  32)) -\n                                                             (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_229505 =\n                 slt64(srem64((sext_i32_i64(local_tid_229468) + (int64_t) 1) *\n                              (segscan_group_sizze_220959 * sdiv_up64(m_196691 *\n                                                                      n_196692,\n                                                                      sext_i32_i64(num_threads_229411))) -\n                           ",
                   "   (int64_t) 1, n_196692),\n                       (sext_i32_i64(local_tid_229468) + (int64_t) 1) *\n                       (segscan_group_sizze_220959 * sdiv_up64(m_196691 *\n                                                               n_196692,\n                                                               sext_i32_i64(num_threads_229411))) -\n                       (int64_t) 1 - ((sext_i32_i64(squot32(local_tid_229468,\n                                                            32) * 32 - 1) +\n                                       (int64_t) 1) *\n                                      (segscan_group_sizze_220959 *\n                                       sdiv_up64(m_196691 * n_196692,\n                                                 sext_i32_i64(num_threads_229411))) -\n                                      (int64_t) 1));\n            \n            if (!no_carry_in_229504) {\n                if (inactive_229505) {\n                    x_220970 = x_220974;\n                    x_220971 = x_220975;\n                    x_220972 = x_220976;\n                    x_220973 = x_220977;\n                }\n            }\n            if (!no_carry_in_229504) {\n                if (!inactive_229505) {\n                    int64_t defunc_1_op_res_220978 = add64(x_220970, x_220974);\n                    int64_t defunc_1_op_res_220979 = add64(x_220971, x_220975);\n                    int64_t defunc_1_op_res_220980 = add64(x_220972, x_220976);\n                    int64_t defunc_1_op_res_220981 = add64(x_220973, x_220977);\n                    \n                    x_220970 = defunc_1_op_res_220978;\n                    x_220971 = defunc_1_op_res_220979;\n                    x_220972 = defunc_1_op_res_220980;\n                    x_220973 = defunc_1_op_res_220981;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_229504) {\n                ((__local\n                  int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n           ",
                   "         x_220970;\n                ((__local\n                  int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                    x_220971;\n                ((__local\n                  int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                    x_220972;\n                ((__local\n                  int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                    x_220973;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_229468, 32) == 0 && ltid_in_bounds_229497) {\n            ((__local\n              int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)] =\n                x_220974;\n            ((__local\n              int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)] =\n                x_220975;\n            ((__local\n              int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)] =\n                x_220976;\n            ((__local\n              int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)] =\n                x_220977;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // threads in bounds write scanned carries\n    {\n        if (slt64(gtid_220967, m_196691) && slt64(gtid_220968, n_196692)) {\n            int64_t tmp_229506;\n            \n            tmp_229506 = ((__local\n                           int64_t *) scan_arr_mem_229472)[sext_i32_i64(local_tid_229468)];\n            ((__global int64_t *) mem_224835)[gtid_220967 * n_196692 +\n                                              gtid_220968] = tmp_229506;\n            \n            int64_t tmp_229507;\n            \n            tmp_229507 = ((__local\n                           int64_t *) scan_arr_mem_229474)[sext_i32_i64(local_tid_229468)];\n            ((__global int64_t *) mem_224839)[gtid_220967 * n_196692 +\n                                              gtid_220968] = tmp_229507;\n            \n            int64_t t",
                   "mp_229508;\n            \n            tmp_229508 = ((__local\n                           int64_t *) scan_arr_mem_229476)[sext_i32_i64(local_tid_229468)];\n            ((__global int64_t *) mem_224843)[gtid_220967 * n_196692 +\n                                              gtid_220968] = tmp_229508;\n            \n            int64_t tmp_229509;\n            \n            tmp_229509 = ((__local\n                           int64_t *) scan_arr_mem_229478)[sext_i32_i64(local_tid_229468)];\n            ((__global int64_t *) mem_224847)[gtid_220967 * n_196692 +\n                                              gtid_220968] = tmp_229509;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_220959\n}\n__kernel void mainziscan_stage3_200090(__global int *global_failure,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t num_groups_200085,\n                                       int32_t num_threads_225321,\n                                       int32_t required_groups_225372, __global\n                                       unsigned char *mem_222246)\n{\n    #define segscan_group_sizze_200084 (mainzisegscan_group_sizze_200064)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225373;\n    int32_t local_tid_225374;\n    int64_t group_sizze_225377;\n    int32_t wave_sizze_225376;\n    int32_t group_tid_225375;\n    \n    global_tid_225373 = get_global_id(0);\n    local_tid_225374 = get_local_id(0);\n    group_sizze_225377 = get_local_size(0);\n    wave_sizze_225376 = LOCKSTEP_WIDTH;\n    group_tid_225375 = get_group_id(0);\n    \n    int32_t phys_tid_200090 = global_tid_225373;\n    int32_t phys_group_id_225378;\n    \n    phys_group_id_225378 = get_group_id(0);\n    for (int32_t i_225379 = 0; i_225379 < sdiv_up32(required_groups_225372 -\n                                                    phys_group_",
                   "id_225378,\n                                                    sext_i64_i32(num_groups_200085));\n         i_225379++) {\n        int32_t virt_group_id_225380 = phys_group_id_225378 + i_225379 *\n                sext_i64_i32(num_groups_200085);\n        int64_t flat_idx_225381 = sext_i32_i64(virt_group_id_225380) *\n                segscan_group_sizze_200084 + sext_i32_i64(local_tid_225374);\n        int64_t gtid_200088 = squot64(flat_idx_225381, n_196692);\n        int64_t gtid_200089 = flat_idx_225381 - squot64(flat_idx_225381,\n                                                        n_196692) * n_196692;\n        int64_t orig_group_225382 = squot64(flat_idx_225381,\n                                            segscan_group_sizze_200084 *\n                                            sdiv_up64(m_196691 * n_196692,\n                                                      sext_i32_i64(num_threads_225321)));\n        int64_t carry_in_flat_idx_225383 = orig_group_225382 *\n                (segscan_group_sizze_200084 * sdiv_up64(m_196691 * n_196692,\n                                                        sext_i32_i64(num_threads_225321))) -\n                (int64_t) 1;\n        \n        if (slt64(gtid_200088, m_196691) && slt64(gtid_200089, n_196692)) {\n            if (!(orig_group_225382 == (int64_t) 0 || (flat_idx_225381 ==\n                                                       (orig_group_225382 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_200084 *\n                                                        sdiv_up64(m_196691 *\n                                                                  n_196692,\n                                                                  sext_i32_i64(num_threads_225321))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_225381,\n                              ",
                   "                                      n_196692),\n                                                             flat_idx_225381 -\n                                                             carry_in_flat_idx_225383)))) {\n                int64_t x_200091;\n                int64_t x_200092;\n                \n                x_200091 = ((__global\n                             int64_t *) mem_222246)[squot64(carry_in_flat_idx_225383,\n                                                            n_196692) *\n                                                    n_196692 +\n                                                    (carry_in_flat_idx_225383 -\n                                                     squot64(carry_in_flat_idx_225383,\n                                                             n_196692) *\n                                                     n_196692)];\n                x_200092 = ((__global int64_t *) mem_222246)[gtid_200088 *\n                                                             n_196692 +\n                                                             gtid_200089];\n                \n                int64_t defunc_1_op_res_200093 = add64(x_200091, x_200092);\n                \n                x_200091 = defunc_1_op_res_200093;\n                ((__global int64_t *) mem_222246)[gtid_200088 * n_196692 +\n                                                  gtid_200089] = x_200091;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200084\n}\n__kernel void mainziscan_stage3_200642(__global int *global_failure,\n                                       int64_t m_196691, int64_t n_p_196694,\n                                       int64_t defunc_0_f_res_196740,\n                                       int64_t num_groups_200636,\n                                       int32_t num_threads_225490,\n                                       int32_t required_groups_225541, __global\n          ",
                   "                             unsigned char *mem_222307)\n{\n    #define segscan_group_sizze_200635 (mainzisegscan_group_sizze_200502)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225542;\n    int32_t local_tid_225543;\n    int64_t group_sizze_225546;\n    int32_t wave_sizze_225545;\n    int32_t group_tid_225544;\n    \n    global_tid_225542 = get_global_id(0);\n    local_tid_225543 = get_local_id(0);\n    group_sizze_225546 = get_local_size(0);\n    wave_sizze_225545 = LOCKSTEP_WIDTH;\n    group_tid_225544 = get_group_id(0);\n    \n    int32_t phys_tid_200642 = global_tid_225542;\n    int32_t phys_group_id_225547;\n    \n    phys_group_id_225547 = get_group_id(0);\n    for (int32_t i_225548 = 0; i_225548 < sdiv_up32(required_groups_225541 -\n                                                    phys_group_id_225547,\n                                                    sext_i64_i32(num_groups_200636));\n         i_225548++) {\n        int32_t virt_group_id_225549 = phys_group_id_225547 + i_225548 *\n                sext_i64_i32(num_groups_200636);\n        int64_t flat_idx_225550 = sext_i32_i64(virt_group_id_225549) *\n                segscan_group_sizze_200635 + sext_i32_i64(local_tid_225543);\n        int64_t gtid_200639 = squot64(flat_idx_225550, n_p_196694 *\n                                      defunc_0_f_res_196740);\n        int64_t gtid_200640 = squot64(flat_idx_225550 - squot64(flat_idx_225550,\n                                                                n_p_196694 *\n                                                                defunc_0_f_res_196740) *\n                                      (n_p_196694 * defunc_0_f_res_196740),\n                                      defunc_0_f_res_196740);\n        int64_t gtid_200641 = flat_idx_225550 - squot64(flat_idx_225550,\n                                                        n_p_196694 *\n                            ",
                   "                            defunc_0_f_res_196740) *\n                (n_p_196694 * defunc_0_f_res_196740) - squot64(flat_idx_225550 -\n                                                               squot64(flat_idx_225550,\n                                                                       n_p_196694 *\n                                                                       defunc_0_f_res_196740) *\n                                                               (n_p_196694 *\n                                                                defunc_0_f_res_196740),\n                                                               defunc_0_f_res_196740) *\n                defunc_0_f_res_196740;\n        int64_t orig_group_225551 = squot64(flat_idx_225550,\n                                            segscan_group_sizze_200635 *\n                                            sdiv_up64(m_196691 * n_p_196694 *\n                                                      defunc_0_f_res_196740,\n                                                      sext_i32_i64(num_threads_225490)));\n        int64_t carry_in_flat_idx_225552 = orig_group_225551 *\n                (segscan_group_sizze_200635 * sdiv_up64(m_196691 * n_p_196694 *\n                                                        defunc_0_f_res_196740,\n                                                        sext_i32_i64(num_threads_225490))) -\n                (int64_t) 1;\n        \n        if ((slt64(gtid_200639, m_196691) && slt64(gtid_200640, n_p_196694)) &&\n            slt64(gtid_200641, defunc_0_f_res_196740)) {\n            if (!(orig_group_225551 == (int64_t) 0 || (flat_idx_225550 ==\n                                                       (orig_group_225551 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_200635 *\n                                                        sdiv_up64(m_196691 *\n                                                      ",
                   "            n_p_196694 *\n                                                                  defunc_0_f_res_196740,\n                                                                  sext_i32_i64(num_threads_225490))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_225550,\n                                                                    defunc_0_f_res_196740),\n                                                             flat_idx_225550 -\n                                                             carry_in_flat_idx_225552)))) {\n                int64_t x_200643;\n                int64_t x_200644;\n                \n                x_200643 = ((__global\n                             int64_t *) mem_222307)[squot64(carry_in_flat_idx_225552,\n                                                            n_p_196694 *\n                                                            defunc_0_f_res_196740) *\n                                                    (defunc_0_f_res_196740 *\n                                                     n_p_196694) +\n                                                    squot64(carry_in_flat_idx_225552 -\n                                                            squot64(carry_in_flat_idx_225552,\n                                                                    n_p_196694 *\n                                                                    defunc_0_f_res_196740) *\n                                                            (n_p_196694 *\n                                                             defunc_0_f_res_196740),\n                                                            defunc_0_f_res_196740) *\n                                                    defunc_0_f_res_196740 +\n                                                    (carry_in_flat_idx_225552 -\n                                                     squot64(carry_in_flat_idx_225552,\n            ",
                   "                                                 n_p_196694 *\n                                                             defunc_0_f_res_196740) *\n                                                     (n_p_196694 *\n                                                      defunc_0_f_res_196740) -\n                                                     squot64(carry_in_flat_idx_225552 -\n                                                             squot64(carry_in_flat_idx_225552,\n                                                                     n_p_196694 *\n                                                                     defunc_0_f_res_196740) *\n                                                             (n_p_196694 *\n                                                              defunc_0_f_res_196740),\n                                                             defunc_0_f_res_196740) *\n                                                     defunc_0_f_res_196740)];\n                x_200644 = ((__global int64_t *) mem_222307)[gtid_200639 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_200640 *\n                                                             defunc_0_f_res_196740 +\n                                                             gtid_200641];\n                \n                int64_t defunc_1_op_res_200645 = add64(x_200643, x_200644);\n                \n                x_200643 = defunc_1_op_res_200645;\n                ((__global int64_t *) mem_222307)[gtid_200639 *\n                                                  (defunc_0_f_res_196740 *\n                                                   n_p_196694) + gtid_200640 *\n                                                  defunc_0_f_res_196740 +\n                                                  gtid_200641] = x_200643;\n            }\n        ",
                   "}\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_200635\n}\n__kernel void mainziscan_stage3_211766(__global int *global_failure,\n                                       int64_t m_196691,\n                                       int64_t lifted_single_ma_l_arg_197247,\n                                       int64_t num_groups_211761,\n                                       int32_t num_threads_227136,\n                                       int32_t required_groups_227187, __global\n                                       unsigned char *mem_223574)\n{\n    #define segscan_group_sizze_211760 (mainzisegscan_group_sizze_211724)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227188;\n    int32_t local_tid_227189;\n    int64_t group_sizze_227192;\n    int32_t wave_sizze_227191;\n    int32_t group_tid_227190;\n    \n    global_tid_227188 = get_global_id(0);\n    local_tid_227189 = get_local_id(0);\n    group_sizze_227192 = get_local_size(0);\n    wave_sizze_227191 = LOCKSTEP_WIDTH;\n    group_tid_227190 = get_group_id(0);\n    \n    int32_t phys_tid_211766 = global_tid_227188;\n    int32_t phys_group_id_227193;\n    \n    phys_group_id_227193 = get_group_id(0);\n    for (int32_t i_227194 = 0; i_227194 < sdiv_up32(required_groups_227187 -\n                                                    phys_group_id_227193,\n                                                    sext_i64_i32(num_groups_211761));\n         i_227194++) {\n        int32_t virt_group_id_227195 = phys_group_id_227193 + i_227194 *\n                sext_i64_i32(num_groups_211761);\n        int64_t flat_idx_227196 = sext_i32_i64(virt_group_id_227195) *\n                segscan_group_sizze_211760 + sext_i32_i64(local_tid_227189);\n        int64_t gtid_211764 = squot64(flat_idx_227196,\n                                      lifted_single_ma_l_arg_19724",
                   "7);\n        int64_t gtid_211765 = flat_idx_227196 - squot64(flat_idx_227196,\n                                                        lifted_single_ma_l_arg_197247) *\n                lifted_single_ma_l_arg_197247;\n        int64_t orig_group_227197 = squot64(flat_idx_227196,\n                                            segscan_group_sizze_211760 *\n                                            sdiv_up64(m_196691 *\n                                                      lifted_single_ma_l_arg_197247,\n                                                      sext_i32_i64(num_threads_227136)));\n        int64_t carry_in_flat_idx_227198 = orig_group_227197 *\n                (segscan_group_sizze_211760 * sdiv_up64(m_196691 *\n                                                        lifted_single_ma_l_arg_197247,\n                                                        sext_i32_i64(num_threads_227136))) -\n                (int64_t) 1;\n        \n        if (slt64(gtid_211764, m_196691) && slt64(gtid_211765,\n                                                  lifted_single_ma_l_arg_197247)) {\n            if (!(orig_group_227197 == (int64_t) 0 || (flat_idx_227196 ==\n                                                       (orig_group_227197 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_211760 *\n                                                        sdiv_up64(m_196691 *\n                                                                  lifted_single_ma_l_arg_197247,\n                                                                  sext_i32_i64(num_threads_227136))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_227196,\n                                                                    lifted_single_ma_l_arg_197247),\n                                                             flat_idx_227196 -\n ",
                   "                                                            carry_in_flat_idx_227198)))) {\n                float x_211767;\n                float x_211768;\n                \n                x_211767 = ((__global\n                             float *) mem_223574)[squot64(carry_in_flat_idx_227198,\n                                                          lifted_single_ma_l_arg_197247) *\n                                                  lifted_single_ma_l_arg_197247 +\n                                                  (carry_in_flat_idx_227198 -\n                                                   squot64(carry_in_flat_idx_227198,\n                                                           lifted_single_ma_l_arg_197247) *\n                                                   lifted_single_ma_l_arg_197247)];\n                x_211768 = ((__global float *) mem_223574)[gtid_211764 *\n                                                           lifted_single_ma_l_arg_197247 +\n                                                           gtid_211765];\n                \n                float defunc_1_op_res_211769 = x_211767 + x_211768;\n                \n                x_211767 = defunc_1_op_res_211769;\n                ((__global float *) mem_223574)[gtid_211764 *\n                                                lifted_single_ma_l_arg_197247 +\n                                                gtid_211765] = x_211767;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211760\n}\n__kernel void mainziscan_stage3_211897(__global int *global_failure,\n                                       int64_t m_196691,\n                                       int64_t dyn_lifted_single_ma_l_arg_197257,\n                                       int64_t num_groups_211892,\n                                       int32_t num_threads_227279,\n                                       int32_t required_groups_227330, __global\n         ",
                   "                              unsigned char *mem_223591)\n{\n    #define segscan_group_sizze_211891 (mainzisegscan_group_sizze_211855)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227331;\n    int32_t local_tid_227332;\n    int64_t group_sizze_227335;\n    int32_t wave_sizze_227334;\n    int32_t group_tid_227333;\n    \n    global_tid_227331 = get_global_id(0);\n    local_tid_227332 = get_local_id(0);\n    group_sizze_227335 = get_local_size(0);\n    wave_sizze_227334 = LOCKSTEP_WIDTH;\n    group_tid_227333 = get_group_id(0);\n    \n    int32_t phys_tid_211897 = global_tid_227331;\n    int32_t phys_group_id_227336;\n    \n    phys_group_id_227336 = get_group_id(0);\n    for (int32_t i_227337 = 0; i_227337 < sdiv_up32(required_groups_227330 -\n                                                    phys_group_id_227336,\n                                                    sext_i64_i32(num_groups_211892));\n         i_227337++) {\n        int32_t virt_group_id_227338 = phys_group_id_227336 + i_227337 *\n                sext_i64_i32(num_groups_211892);\n        int64_t flat_idx_227339 = sext_i32_i64(virt_group_id_227338) *\n                segscan_group_sizze_211891 + sext_i32_i64(local_tid_227332);\n        int64_t gtid_211895 = squot64(flat_idx_227339,\n                                      dyn_lifted_single_ma_l_arg_197257);\n        int64_t gtid_211896 = flat_idx_227339 - squot64(flat_idx_227339,\n                                                        dyn_lifted_single_ma_l_arg_197257) *\n                dyn_lifted_single_ma_l_arg_197257;\n        int64_t orig_group_227340 = squot64(flat_idx_227339,\n                                            segscan_group_sizze_211891 *\n                                            sdiv_up64(m_196691 *\n                                                      dyn_lifted_single_ma_l_arg_197257,\n                                                  ",
                   "    sext_i32_i64(num_threads_227279)));\n        int64_t carry_in_flat_idx_227341 = orig_group_227340 *\n                (segscan_group_sizze_211891 * sdiv_up64(m_196691 *\n                                                        dyn_lifted_single_ma_l_arg_197257,\n                                                        sext_i32_i64(num_threads_227279))) -\n                (int64_t) 1;\n        \n        if (slt64(gtid_211895, m_196691) && slt64(gtid_211896,\n                                                  dyn_lifted_single_ma_l_arg_197257)) {\n            if (!(orig_group_227340 == (int64_t) 0 || (flat_idx_227339 ==\n                                                       (orig_group_227340 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_211891 *\n                                                        sdiv_up64(m_196691 *\n                                                                  dyn_lifted_single_ma_l_arg_197257,\n                                                                  sext_i32_i64(num_threads_227279))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_227339,\n                                                                    dyn_lifted_single_ma_l_arg_197257),\n                                                             flat_idx_227339 -\n                                                             carry_in_flat_idx_227341)))) {\n                float x_211898;\n                float x_211899;\n                \n                x_211898 = ((__global\n                             float *) mem_223591)[squot64(carry_in_flat_idx_227341,\n                                                          dyn_lifted_single_ma_l_arg_197257) *\n                                                  dyn_lifted_single_ma_l_arg_197257 +\n                                                  (carry",
                   "_in_flat_idx_227341 -\n                                                   squot64(carry_in_flat_idx_227341,\n                                                           dyn_lifted_single_ma_l_arg_197257) *\n                                                   dyn_lifted_single_ma_l_arg_197257)];\n                x_211899 = ((__global float *) mem_223591)[gtid_211895 *\n                                                           dyn_lifted_single_ma_l_arg_197257 +\n                                                           gtid_211896];\n                \n                float defunc_1_op_res_211900 = x_211898 + x_211899;\n                \n                x_211898 = defunc_1_op_res_211900;\n                ((__global float *) mem_223591)[gtid_211895 *\n                                                dyn_lifted_single_ma_l_arg_197257 +\n                                                gtid_211896] = x_211898;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_211891\n}\n__kernel void mainziscan_stage3_212028(__global int *global_failure,\n                                       int64_t m_196691, int64_t n_196692,\n                                       int64_t num_groups_212023,\n                                       int32_t num_threads_227422,\n                                       int32_t required_groups_227473, __global\n                                       unsigned char *mem_223608)\n{\n    #define segscan_group_sizze_212022 (mainzisegscan_group_sizze_211986)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227474;\n    int32_t local_tid_227475;\n    int64_t group_sizze_227478;\n    int32_t wave_sizze_227477;\n    int32_t group_tid_227476;\n    \n    global_tid_227474 = get_global_id(0);\n    local_tid_227475 = get_local_id(0);\n    group_sizze_227478 = get_local_size(0);\n  ",
                   "  wave_sizze_227477 = LOCKSTEP_WIDTH;\n    group_tid_227476 = get_group_id(0);\n    \n    int32_t phys_tid_212028 = global_tid_227474;\n    int32_t phys_group_id_227479;\n    \n    phys_group_id_227479 = get_group_id(0);\n    for (int32_t i_227480 = 0; i_227480 < sdiv_up32(required_groups_227473 -\n                                                    phys_group_id_227479,\n                                                    sext_i64_i32(num_groups_212023));\n         i_227480++) {\n        int32_t virt_group_id_227481 = phys_group_id_227479 + i_227480 *\n                sext_i64_i32(num_groups_212023);\n        int64_t flat_idx_227482 = sext_i32_i64(virt_group_id_227481) *\n                segscan_group_sizze_212022 + sext_i32_i64(local_tid_227475);\n        int64_t gtid_212026 = squot64(flat_idx_227482, n_196692);\n        int64_t gtid_212027 = flat_idx_227482 - squot64(flat_idx_227482,\n                                                        n_196692) * n_196692;\n        int64_t orig_group_227483 = squot64(flat_idx_227482,\n                                            segscan_group_sizze_212022 *\n                                            sdiv_up64(m_196691 * n_196692,\n                                                      sext_i32_i64(num_threads_227422)));\n        int64_t carry_in_flat_idx_227484 = orig_group_227483 *\n                (segscan_group_sizze_212022 * sdiv_up64(m_196691 * n_196692,\n                                                        sext_i32_i64(num_threads_227422))) -\n                (int64_t) 1;\n        \n        if (slt64(gtid_212026, m_196691) && slt64(gtid_212027, n_196692)) {\n            if (!(orig_group_227483 == (int64_t) 0 || (flat_idx_227482 ==\n                                                       (orig_group_227483 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_212022 *\n                                                        sdiv_up64(m_196691 *\n         ",
                   "                                                         n_196692,\n                                                                  sext_i32_i64(num_threads_227422))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_227482,\n                                                                    n_196692),\n                                                             flat_idx_227482 -\n                                                             carry_in_flat_idx_227484)))) {\n                float x_212029;\n                float x_212030;\n                \n                x_212029 = ((__global\n                             float *) mem_223608)[squot64(carry_in_flat_idx_227484,\n                                                          n_196692) * n_196692 +\n                                                  (carry_in_flat_idx_227484 -\n                                                   squot64(carry_in_flat_idx_227484,\n                                                           n_196692) *\n                                                   n_196692)];\n                x_212030 = ((__global float *) mem_223608)[gtid_212026 *\n                                                           n_196692 +\n                                                           gtid_212027];\n                \n                float defunc_1_op_res_212031 = x_212029 + x_212030;\n                \n                x_212029 = defunc_1_op_res_212031;\n                ((__global float *) mem_223608)[gtid_212026 * n_196692 +\n                                                gtid_212027] = x_212029;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_212022\n}\n__kernel void mainziscan_stage3_220969(__global int *global_failure,\n                                       int64_t m_196691, int64_t n_196692,\n                          ",
                   "             int64_t num_groups_220960,\n                                       int32_t num_threads_229411,\n                                       int32_t required_groups_229510, __global\n                                       unsigned char *mem_224835, __global\n                                       unsigned char *mem_224839, __global\n                                       unsigned char *mem_224843, __global\n                                       unsigned char *mem_224847)\n{\n    #define segscan_group_sizze_220959 (mainzisegscan_group_sizze_220690)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229511;\n    int32_t local_tid_229512;\n    int64_t group_sizze_229515;\n    int32_t wave_sizze_229514;\n    int32_t group_tid_229513;\n    \n    global_tid_229511 = get_global_id(0);\n    local_tid_229512 = get_local_id(0);\n    group_sizze_229515 = get_local_size(0);\n    wave_sizze_229514 = LOCKSTEP_WIDTH;\n    group_tid_229513 = get_group_id(0);\n    \n    int32_t phys_tid_220969 = global_tid_229511;\n    int32_t phys_group_id_229516;\n    \n    phys_group_id_229516 = get_group_id(0);\n    for (int32_t i_229517 = 0; i_229517 < sdiv_up32(required_groups_229510 -\n                                                    phys_group_id_229516,\n                                                    sext_i64_i32(num_groups_220960));\n         i_229517++) {\n        int32_t virt_group_id_229518 = phys_group_id_229516 + i_229517 *\n                sext_i64_i32(num_groups_220960);\n        int64_t flat_idx_229519 = sext_i32_i64(virt_group_id_229518) *\n                segscan_group_sizze_220959 + sext_i32_i64(local_tid_229512);\n        int64_t gtid_220967 = squot64(flat_idx_229519, n_196692);\n        int64_t gtid_220968 = flat_idx_229519 - squot64(flat_idx_229519,\n                                                        n_196692) * n_196692;\n        int64_t orig_group_229520 = squot64(fl",
                   "at_idx_229519,\n                                            segscan_group_sizze_220959 *\n                                            sdiv_up64(m_196691 * n_196692,\n                                                      sext_i32_i64(num_threads_229411)));\n        int64_t carry_in_flat_idx_229521 = orig_group_229520 *\n                (segscan_group_sizze_220959 * sdiv_up64(m_196691 * n_196692,\n                                                        sext_i32_i64(num_threads_229411))) -\n                (int64_t) 1;\n        \n        if (slt64(gtid_220967, m_196691) && slt64(gtid_220968, n_196692)) {\n            if (!(orig_group_229520 == (int64_t) 0 || (flat_idx_229519 ==\n                                                       (orig_group_229520 +\n                                                        (int64_t) 1) *\n                                                       (segscan_group_sizze_220959 *\n                                                        sdiv_up64(m_196691 *\n                                                                  n_196692,\n                                                                  sext_i32_i64(num_threads_229411))) -\n                                                       (int64_t) 1 ||\n                                                       slt64(srem64(flat_idx_229519,\n                                                                    n_196692),\n                                                             flat_idx_229519 -\n                                                             carry_in_flat_idx_229521)))) {\n                int64_t x_220970;\n                int64_t x_220971;\n                int64_t x_220972;\n                int64_t x_220973;\n                int64_t x_220974;\n                int64_t x_220975;\n                int64_t x_220976;\n                int64_t x_220977;\n                \n                x_220970 = ((__global\n                             int64_t *) mem_224835)[squot64(carry_in_flat_idx_229521,\n                    ",
                   "                                        n_196692) *\n                                                    n_196692 +\n                                                    (carry_in_flat_idx_229521 -\n                                                     squot64(carry_in_flat_idx_229521,\n                                                             n_196692) *\n                                                     n_196692)];\n                x_220971 = ((__global\n                             int64_t *) mem_224839)[squot64(carry_in_flat_idx_229521,\n                                                            n_196692) *\n                                                    n_196692 +\n                                                    (carry_in_flat_idx_229521 -\n                                                     squot64(carry_in_flat_idx_229521,\n                                                             n_196692) *\n                                                     n_196692)];\n                x_220972 = ((__global\n                             int64_t *) mem_224843)[squot64(carry_in_flat_idx_229521,\n                                                            n_196692) *\n                                                    n_196692 +\n                                                    (carry_in_flat_idx_229521 -\n                                                     squot64(carry_in_flat_idx_229521,\n                                                             n_196692) *\n                                                     n_196692)];\n                x_220973 = ((__global\n                             int64_t *) mem_224847)[squot64(carry_in_flat_idx_229521,\n                                                            n_196692) *\n                                                    n_196692 +\n                                                    (carry_in_flat_idx_229521 -\n                                                     squot64(carry_in_flat_idx_229521,\n                          ",
                   "                                   n_196692) *\n                                                     n_196692)];\n                x_220974 = ((__global int64_t *) mem_224835)[gtid_220967 *\n                                                             n_196692 +\n                                                             gtid_220968];\n                x_220975 = ((__global int64_t *) mem_224839)[gtid_220967 *\n                                                             n_196692 +\n                                                             gtid_220968];\n                x_220976 = ((__global int64_t *) mem_224843)[gtid_220967 *\n                                                             n_196692 +\n                                                             gtid_220968];\n                x_220977 = ((__global int64_t *) mem_224847)[gtid_220967 *\n                                                             n_196692 +\n                                                             gtid_220968];\n                \n                int64_t defunc_1_op_res_220978 = add64(x_220970, x_220974);\n                int64_t defunc_1_op_res_220979 = add64(x_220971, x_220975);\n                int64_t defunc_1_op_res_220980 = add64(x_220972, x_220976);\n                int64_t defunc_1_op_res_220981 = add64(x_220973, x_220977);\n                \n                x_220970 = defunc_1_op_res_220978;\n                x_220971 = defunc_1_op_res_220979;\n                x_220972 = defunc_1_op_res_220980;\n                x_220973 = defunc_1_op_res_220981;\n                ((__global int64_t *) mem_224835)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = x_220970;\n                ((__global int64_t *) mem_224839)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = x_220971;\n                ((__global int64_t *) mem_224843)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = x_220972;\n        ",
                   "        ((__global int64_t *) mem_224847)[gtid_220967 * n_196692 +\n                                                  gtid_220968] = x_220973;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segscan_group_sizze_220959\n}\n__kernel void mainzisegmap_200128(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_222246, __global\n                                  unsigned char *mem_222250)\n{\n    #define segmap_group_sizze_200123 (mainzisegmap_group_sizze_200008)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225396;\n    int32_t local_tid_225397;\n    int64_t group_sizze_225400;\n    int32_t wave_sizze_225399;\n    int32_t group_tid_225398;\n    \n    global_tid_225396 = get_global_id(0);\n    local_tid_225397 = get_local_id(0);\n    group_sizze_225400 = get_local_size(0);\n    wave_sizze_225399 = LOCKSTEP_WIDTH;\n    group_tid_225398 = get_group_id(0);\n    \n    int32_t phys_tid_200128 = global_tid_225396;\n    int64_t global_tid_225401 = sext_i32_i64(group_tid_225398) *\n            segmap_group_sizze_200123 + sext_i32_i64(local_tid_225397);\n    int64_t slice_225402 = n_196692;\n    int64_t slice_225403 = m_196691 * slice_225402;\n    int64_t gtid_200126 = squot64(global_tid_225401, slice_225402);\n    int64_t remnant_225404 = global_tid_225401 - gtid_200126 * slice_225402;\n    int64_t gtid_200127 = remnant_225404;\n    int64_t remnant_225405 = remnant_225404 - gtid_200127;\n    \n    if (slt64(gtid_200126, m_196691) && slt64(gtid_200127, n_196692)) {\n        float x_200129;\n        \n        x_200129 = ((__global float *) Y_mem_222225)[gtid_200126 * n_196692 +\n                                                 ",
                   "    gtid_200127];\n        \n        bool isnan_res_200132;\n        \n        isnan_res_200132 = futrts_isnan32(x_200129);\n        \n        bool defunc_0_p_res_200133 = !isnan_res_200132;\n        int64_t defunc_1_f_res_200134;\n        \n        if (defunc_0_p_res_200133) {\n            int64_t x_200130;\n            \n            x_200130 = ((__global int64_t *) mem_222246)[gtid_200126 *\n                                                         n_196692 +\n                                                         gtid_200127];\n            \n            int64_t defunc_1_f_res_t_res_200135 = sub64(x_200130, (int64_t) 1);\n            \n            defunc_1_f_res_200134 = defunc_1_f_res_t_res_200135;\n        } else {\n            defunc_1_f_res_200134 = (int64_t) -1;\n        }\n        if ((sle64((int64_t) 0, gtid_200126) && slt64(gtid_200126, m_196691)) &&\n            (sle64((int64_t) 0, defunc_1_f_res_200134) &&\n             slt64(defunc_1_f_res_200134, n_196692))) {\n            ((__global int64_t *) mem_222250)[gtid_200126 * n_196692 +\n                                              defunc_1_f_res_200134] =\n                gtid_200127;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_200123\n}\n__kernel void mainzisegmap_200253(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t n_p_196694,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t i_196779, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_222263)\n{\n    #define segmap_group_sizze_200247 (mainzisegmap_group_sizze_200165)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >=",
                   " 0)\n        return;\n    \n    int32_t global_tid_225416;\n    int32_t local_tid_225417;\n    int64_t group_sizze_225420;\n    int32_t wave_sizze_225419;\n    int32_t group_tid_225418;\n    \n    global_tid_225416 = get_global_id(0);\n    local_tid_225417 = get_local_id(0);\n    group_sizze_225420 = get_local_size(0);\n    wave_sizze_225419 = LOCKSTEP_WIDTH;\n    group_tid_225418 = get_group_id(0);\n    \n    int32_t phys_tid_200253 = global_tid_225416;\n    int64_t global_tid_225421 = sext_i32_i64(group_tid_225418) *\n            segmap_group_sizze_200247 + sext_i32_i64(local_tid_225417);\n    int64_t slice_225422 = defunc_0_f_res_196740;\n    int64_t slice_225423 = n_p_196694 * slice_225422;\n    int64_t slice_225424 = m_196691 * slice_225423;\n    int64_t gtid_200250 = squot64(global_tid_225421, slice_225423);\n    int64_t remnant_225425 = global_tid_225421 - gtid_200250 * slice_225423;\n    int64_t gtid_200251 = squot64(remnant_225425, slice_225422);\n    int64_t remnant_225426 = remnant_225425 - gtid_200251 * slice_225422;\n    int64_t gtid_200252 = remnant_225426;\n    int64_t remnant_225427 = remnant_225426 - gtid_200252;\n    \n    if ((slt64(gtid_200250, m_196691) && slt64(gtid_200251, n_p_196694)) &&\n        slt64(gtid_200252, defunc_0_f_res_196740)) {\n        int64_t y_200257 = mul64(n_p_196694, gtid_200252);\n        int64_t new_i_200258 = add64(gtid_200251, y_200257);\n        bool cond_200259 = slt64(i_196779, new_i_200258);\n        float defunc_0_f_res_200260;\n        \n        if (cond_200259) {\n            defunc_0_f_res_200260 = NAN;\n        } else {\n            bool x_200261 = sle64((int64_t) 0, new_i_200258);\n            bool y_200262 = slt64(new_i_200258, n_196692);\n            bool bounds_check_200263 = x_200261 && y_200262;\n            bool index_certs_200264;\n            \n            if (!bounds_check_200263) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 0) ==\n                        -1) {\n                        global_failure_",
                   "args[0] = (int64_t) new_i_200258;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_f_res_200265;\n            \n            defunc_0_f_res_f_res_200265 = ((__global\n                                            float *) Y_mem_222225)[gtid_200250 *\n                                                                   n_196692 +\n                                                                   new_i_200258];\n            defunc_0_f_res_200260 = defunc_0_f_res_f_res_200265;\n        }\n        ((__global float *) mem_222263)[gtid_200250 * (defunc_0_f_res_196740 *\n                                                       n_p_196694) +\n                                        gtid_200251 * defunc_0_f_res_196740 +\n                                        gtid_200252] = defunc_0_f_res_200260;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_200247\n}\n__kernel void mainzisegmap_200688(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t defunc_0_f_res_196740, __global\n                                  unsigned char *mem_222263, __global\n                                  unsigned char *mem_222307, __global\n                                  unsigned char *mem_222312)\n{\n    #define segmap_group_sizze_200682 (mainzisegmap_group_sizze_200433)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225553;\n    int32_t local_tid_225554;\n    int64_t group_sizze_225557;\n    int32_t wave_sizze_225556;\n    int32_t group_tid_225555;\n    \n    global_tid_225553 = get_global_id(0);\n    local_tid_225554 = get_local_id(0);\n    group_sizze_225557 = get_local_size(0);\n    wave_sizze_225556 = LOCKSTEP_WIDTH;\n    group",
                   "_tid_225555 = get_group_id(0);\n    \n    int32_t phys_tid_200688 = global_tid_225553;\n    int64_t global_tid_225558 = sext_i32_i64(group_tid_225555) *\n            segmap_group_sizze_200682 + sext_i32_i64(local_tid_225554);\n    int64_t slice_225559 = defunc_0_f_res_196740;\n    int64_t slice_225560 = n_p_196694 * slice_225559;\n    int64_t slice_225561 = m_196691 * slice_225560;\n    int64_t gtid_200685 = squot64(global_tid_225558, slice_225560);\n    int64_t remnant_225562 = global_tid_225558 - gtid_200685 * slice_225560;\n    int64_t gtid_200686 = squot64(remnant_225562, slice_225559);\n    int64_t remnant_225563 = remnant_225562 - gtid_200686 * slice_225559;\n    int64_t gtid_200687 = remnant_225563;\n    int64_t remnant_225564 = remnant_225563 - gtid_200687;\n    \n    if ((slt64(gtid_200685, m_196691) && slt64(gtid_200686, n_p_196694)) &&\n        slt64(gtid_200687, defunc_0_f_res_196740)) {\n        float x_200689;\n        \n        x_200689 = ((__global float *) mem_222263)[gtid_200685 *\n                                                   (defunc_0_f_res_196740 *\n                                                    n_p_196694) + gtid_200686 *\n                                                   defunc_0_f_res_196740 +\n                                                   gtid_200687];\n        \n        bool isnan_res_200692;\n        \n        isnan_res_200692 = futrts_isnan32(x_200689);\n        \n        bool defunc_0_p_res_200693 = !isnan_res_200692;\n        int64_t defunc_1_f_res_200694;\n        \n        if (defunc_0_p_res_200693) {\n            int64_t x_200690;\n            \n            x_200690 = ((__global int64_t *) mem_222307)[gtid_200685 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_200686 *\n                                                         defunc_0_f_res_196740 +\n                                     ",
                   "                    gtid_200687];\n            \n            int64_t defunc_1_f_res_t_res_200695 = sub64(x_200690, (int64_t) 1);\n            \n            defunc_1_f_res_200694 = defunc_1_f_res_t_res_200695;\n        } else {\n            defunc_1_f_res_200694 = (int64_t) -1;\n        }\n        if (((sle64((int64_t) 0, gtid_200685) && slt64(gtid_200685,\n                                                       m_196691)) &&\n             (sle64((int64_t) 0, gtid_200686) && slt64(gtid_200686,\n                                                       n_p_196694))) &&\n            (sle64((int64_t) 0, defunc_1_f_res_200694) &&\n             slt64(defunc_1_f_res_200694, defunc_0_f_res_196740))) {\n            ((__global int64_t *) mem_222312)[gtid_200685 *\n                                              (defunc_0_f_res_196740 *\n                                               n_p_196694) + gtid_200686 *\n                                              defunc_0_f_res_196740 +\n                                              defunc_1_f_res_200694] =\n                gtid_200687;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_200682\n}\n__kernel void mainzisegmap_201901(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t defunc_0_f_res_196740, __global\n                                  unsigned char *ext_mem_222322, __global\n                                  unsigned char *mem_222388)\n{\n    #define segmap_group_sizze_201895 (mainzisegmap_group_sizze_201558)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225638;\n    int32_t local_tid_225639;\n    int64_t group_sizze_225642;\n    int32_t wave_sizze_225641;\n    int32_t group_tid_225640;\n    \n    global_tid_225638 = get_global_id(0);\n    local_tid_225639 = get_local_id(0);\n    group_sizze_225642 = get_local_size(0);\n",
                   "    wave_sizze_225641 = LOCKSTEP_WIDTH;\n    group_tid_225640 = get_group_id(0);\n    \n    int32_t phys_tid_201901 = global_tid_225638;\n    int64_t global_tid_225643 = sext_i32_i64(group_tid_225640) *\n            segmap_group_sizze_201895 + sext_i32_i64(local_tid_225639);\n    int64_t slice_225644 = defunc_0_f_res_196740;\n    int64_t slice_225645 = n_p_196694 * slice_225644;\n    int64_t slice_225646 = m_196691 * slice_225645;\n    int64_t gtid_201898 = squot64(global_tid_225643, slice_225645);\n    int64_t remnant_225647 = global_tid_225643 - gtid_201898 * slice_225645;\n    int64_t gtid_201899 = squot64(remnant_225647, slice_225644);\n    int64_t remnant_225648 = remnant_225647 - gtid_201899 * slice_225644;\n    int64_t gtid_201900 = remnant_225648;\n    int64_t remnant_225649 = remnant_225648 - gtid_201900;\n    \n    if ((slt64(gtid_201898, m_196691) && slt64(gtid_201899, n_p_196694)) &&\n        slt64(gtid_201900, defunc_0_f_res_196740)) {\n        int64_t x_201902;\n        \n        x_201902 = ((__global int64_t *) ext_mem_222322)[gtid_201898 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_201899 *\n                                                         defunc_0_f_res_196740 +\n                                                         gtid_201900];\n        \n        int64_t defunc_0_f_res_201903 = add64((int64_t) 1, x_201902);\n        \n        ((__global int64_t *) mem_222388)[gtid_201898 * (defunc_0_f_res_196740 *\n                                                         n_p_196694) +\n                                          gtid_201899 * defunc_0_f_res_196740 +\n                                          gtid_201900] = defunc_0_f_res_201903;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_201895\n}\n__kernel void mainzisegmap_201915(__global int *global_failure,\n                                  ",
                   "int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t min_res_196862,\n                                  float i64_res_196868, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *mem_222393, __global\n                                  unsigned char *mem_222397, __global\n                                  unsigned char *mem_222401, __global\n                                  unsigned char *mem_222405)\n{\n    #define segmap_group_sizze_201907 (mainzisegmap_group_sizze_201527)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225650;\n    int32_t local_tid_225651;\n    int64_t group_sizze_225654;\n    int32_t wave_sizze_225653;\n    int32_t group_tid_225652;\n    \n    global_tid_225650 = get_global_id(0);\n    local_tid_225651 = get_local_id(0);\n    group_sizze_225654 = get_local_size(0);\n    wave_sizze_225653 = LOCKSTEP_WIDTH;\n    group_tid_225652 = get_group_id(0);\n    \n    int32_t phys_tid_201915 = global_tid_225650;\n    int64_t global_tid_225655 = sext_i32_i64(group_tid_225652) *\n            segmap_group_sizze_201907 + sext_i32_i64(local_tid_225651);\n    int64_t slice_225656 = n_p_196694;\n    int64_t slice_225657 = m_196691 * slice_225656;\n    int64_t gtid_201913 = squot64(global_tid_225655, slice_225656);\n    int64_t remnant_225658 = global_tid_225655 - gtid_201913 * slice_225656;\n    int64_t gtid_201914 = remnant_225658;\n    int64_t remnant_225659 = remnant_225658 - gtid_201914;\n    \n    if (slt64(gtid_201913, m_196691) && slt64(gtid_201914, n_p_196694)) {\n        int64_t x_201916;\n        \n        x_201916 = ((__global int64_t *) ext_mem_222321)[gtid_201913 *\n                                                         n_p_196694 +\n                                                         gtid_201914];\n        \n        int64_t min_a",
                   "rg_201917 = sub64(x_201916, (int64_t) 1);\n        int64_t min_arg_201918 = sub64(x_201916, min_res_196862);\n        int64_t min_res_201919 = smin64(q_s_196695, x_201916);\n        float i64_res_201920 = sitofp_i64_f32(x_201916);\n        float x_201921 = i64_res_196868 - i64_res_201920;\n        float max_arg_201922 = x_201921 / 2.0F;\n        float max_res_201923 = fmax32(0.0F, max_arg_201922);\n        \n        ((__global int64_t *) mem_222393)[gtid_201913 * n_p_196694 +\n                                          gtid_201914] = min_arg_201917;\n        ((__global int64_t *) mem_222397)[gtid_201913 * n_p_196694 +\n                                          gtid_201914] = min_arg_201918;\n        ((__global int64_t *) mem_222401)[gtid_201913 * n_p_196694 +\n                                          gtid_201914] = min_res_201919;\n        ((__global float *) mem_222405)[gtid_201913 * n_p_196694 +\n                                        gtid_201914] = max_res_201923;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_201907\n}\n__kernel void mainzisegmap_201939(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, int64_t i_196831,\n                                  unsigned char x_196832_bits,\n                                  int64_t min_res_196862,\n                                  unsigned char loop_cond_196867_bits, __global\n                                  unsigned char *mem_222388, __global\n                                  unsigned char *mem_222393, __global\n                                  unsigned char *mem_222397, __global\n                     ",
                   "             unsigned char *mem_222401, __global\n                                  unsigned char *mem_222405, __global\n                                  unsigned char *mem_222411, __global\n                                  unsigned char *mem_222416)\n{\n    bool x_196832 = x_196832_bits;\n    bool loop_cond_196867 = loop_cond_196867_bits;\n    \n    #define segmap_group_sizze_201932 (mainzisegmap_group_sizze_201288)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225660;\n    int32_t local_tid_225661;\n    int64_t group_sizze_225664;\n    int32_t wave_sizze_225663;\n    int32_t group_tid_225662;\n    \n    global_tid_225660 = get_global_id(0);\n    local_tid_225661 = get_local_id(0);\n    group_sizze_225664 = get_local_size(0);\n    wave_sizze_225663 = LOCKSTEP_WIDTH;\n    group_tid_225662 = get_group_id(0);\n    \n    int32_t phys_tid_201939 = global_tid_225660;\n    int64_t global_tid_225665 = sext_i32_i64(group_tid_225662) *\n            segmap_group_sizze_201932 + sext_i32_i64(local_tid_225661);\n    int64_t slice_225666 = s_n_m_196745;\n    int64_t slice_225667 = n_p_196694 * slice_225666;\n    int64_t slice_225668 = m_196691 * slice_225667;\n    int64_t gtid_201936 = squot64(global_tid_225665, slice_225667);\n    int64_t remnant_225669 = global_tid_225665 - gtid_201936 * slice_225667;\n    int64_t gtid_201937 = squot64(remnant_225669, slice_225666);\n    int64_t remnant_225670 = remnant_225669 - gtid_201937 * slice_225666;\n    int64_t gtid_201938 = remnant_225670;\n    int64_t remnant_225671 = remnant_225670 - gtid_201938;\n    \n    if ((slt64(gtid_201936, m_196691) && slt64(gtid_201937, n_p_196694)) &&\n        slt64(gtid_201938, s_n_m_196745)) {\n        int64_t min_arg_201941;\n        \n        min_arg_201941 = ((__global int64_t *) mem_222393)[gtid_201936 *\n                                                           n_p_196694 +\n                                   ",
                   "                        gtid_201937];\n        \n        int64_t min_arg_201942;\n        \n        min_arg_201942 = ((__global int64_t *) mem_222397)[gtid_201936 *\n                                                           n_p_196694 +\n                                                           gtid_201937];\n        \n        int64_t min_res_201943;\n        \n        min_res_201943 = ((__global int64_t *) mem_222401)[gtid_201936 *\n                                                           n_p_196694 +\n                                                           gtid_201937];\n        \n        float max_res_201944;\n        \n        max_res_201944 = ((__global float *) mem_222405)[gtid_201936 *\n                                                         n_p_196694 +\n                                                         gtid_201937];\n        \n        bool cond_201946 = gtid_201938 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_201947;\n        \n        if (cond_201946) {\n            defunc_0_m_fun_res_201947 = (int64_t) 0;\n        } else {\n            int64_t y_201948 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_201949 = gtid_201938 == y_201948;\n            int64_t defunc_0_m_fun_res_f_res_201950;\n            \n            if (cond_201949) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_201951 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_201950 =\n                    defunc_0_m_fun_res_f_res_t_res_201951;\n            } else {\n                int64_t x_201952 = sub64(gtid_201938, (int64_t) 1);\n                int64_t x_201953 = mul64(jump_s_196701, x_201952);\n                int64_t min_arg_201954 = add64((int64_t) 1, x_201953);\n                int64_t min_res_201955 = smin64(defunc_0_f_res_196740,\n                                                min_arg_201954);\n                \n                defunc_0_m_fun_res_f_res_201950 = min_res_201955;\n            }\n            defunc_0_",
                   "m_fun_res_201947 = defunc_0_m_fun_res_f_res_201950;\n        }\n        \n        bool init_idx_201956;\n        int64_t init_idx_201957;\n        int64_t init_idx_201958;\n        bool loop_while_201959;\n        int64_t low_201960;\n        int64_t high_201961;\n        \n        loop_while_201959 = x_196832;\n        low_201960 = (int64_t) 0;\n        high_201961 = i_196831;\n        while (loop_while_201959) {\n            int64_t x_201962 = add64(low_201960, high_201961);\n            int64_t mid_201963 = sdiv64(x_201962, (int64_t) 2);\n            bool x_201964 = sle64((int64_t) 0, mid_201963);\n            bool y_201965 = slt64(mid_201963, defunc_0_f_res_196740);\n            bool bounds_check_201966 = x_201964 && y_201965;\n            bool index_certs_201967;\n            \n            if (!bounds_check_201966) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 11) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_201963;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t mid_id_201968;\n            \n            mid_id_201968 = ((__global int64_t *) mem_222388)[gtid_201936 *\n                                                              (defunc_0_f_res_196740 *\n                                                               n_p_196694) +\n                                                              gtid_201937 *\n                                                              defunc_0_f_res_196740 +\n                                                              mid_201963];\n            \n            bool cond_201969 = slt64(mid_id_201968, (int64_t) 0);\n            int64_t mid_idx_201970;\n            \n            if (cond_201969) {\n                mid_idx_201970 = (int64_t) 9223372036854775807;\n            ",
                   "} else {\n                mid_idx_201970 = mid_id_201968;\n            }\n            \n            bool cond_201971 = sle64(defunc_0_m_fun_res_201947, mid_idx_201970);\n            int64_t loopres_201972;\n            int64_t loopres_201973;\n            \n            if (cond_201971) {\n                int64_t loopres_t_res_201974 = sub64(mid_201963, (int64_t) 1);\n                \n                loopres_201972 = low_201960;\n                loopres_201973 = loopres_t_res_201974;\n            } else {\n                int64_t loopres_f_res_201975 = add64((int64_t) 1, mid_201963);\n                \n                loopres_201972 = loopres_f_res_201975;\n                loopres_201973 = high_201961;\n            }\n            \n            bool loop_cond_201976 = sle64(loopres_201972, loopres_201973);\n            bool loop_while_tmp_225672 = loop_cond_201976;\n            int64_t low_tmp_225673 = loopres_201972;\n            int64_t high_tmp_225674 = loopres_201973;\n            \n            loop_while_201959 = loop_while_tmp_225672;\n            low_201960 = low_tmp_225673;\n            high_201961 = high_tmp_225674;\n        }\n        init_idx_201956 = loop_while_201959;\n        init_idx_201957 = low_201960;\n        init_idx_201958 = high_201961;\n        \n        bool idx_201977;\n        int64_t idx_201978;\n        int64_t idx_201979;\n        int64_t idx_201980;\n        bool loop_while_201981;\n        int64_t l_idx_201982;\n        int64_t r_idx_201983;\n        int64_t span_201984;\n        \n        loop_while_201981 = loop_cond_196867;\n        l_idx_201982 = init_idx_201957;\n        r_idx_201983 = init_idx_201957;\n        span_201984 = (int64_t) 1;\n        while (loop_while_201981) {\n            int64_t max_arg_201985 = sub64(l_idx_201982, (int64_t) 1);\n            int64_t max_res_201986 = smax64((int64_t) 0, max_arg_201985);\n            int64_t min_arg_201987 = add64((int64_t) 1, r_idx_201983);\n            int64_t min_res_201988 = smin64(min_arg_201941, min_arg_201987);\n            boo",
                   "l x_201989 = sle64((int64_t) 0, max_res_201986);\n            bool y_201990 = slt64(max_res_201986, defunc_0_f_res_196740);\n            bool bounds_check_201991 = x_201989 && y_201990;\n            bool index_certs_201992;\n            \n            if (!bounds_check_201991) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 12) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_201986;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t x_201993;\n            \n            x_201993 = ((__global int64_t *) mem_222388)[gtid_201936 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_201937 *\n                                                         defunc_0_f_res_196740 +\n                                                         max_res_201986];\n            \n            int64_t abs_arg_201994 = sub64(x_201993, defunc_0_m_fun_res_201947);\n            int64_t abs_res_201995 = abs64(abs_arg_201994);\n            bool x_201996 = sle64((int64_t) 0, min_res_201988);\n            bool y_201997 = slt64(min_res_201988, defunc_0_f_res_196740);\n            bool bounds_check_201998 = x_201996 && y_201997;\n            bool index_certs_201999;\n            \n            if (!bounds_check_201998) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 13) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_201988;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n",
                   "                    return;\n                }\n            }\n            \n            int64_t x_202000;\n            \n            x_202000 = ((__global int64_t *) mem_222388)[gtid_201936 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_201937 *\n                                                         defunc_0_f_res_196740 +\n                                                         min_res_201988];\n            \n            int64_t abs_arg_202001 = sub64(x_202000, defunc_0_m_fun_res_201947);\n            int64_t abs_res_202002 = abs64(abs_arg_202001);\n            bool cond_202003 = max_res_201986 == l_idx_201982;\n            int64_t loopres_202004;\n            int64_t loopres_202005;\n            int64_t loopres_202006;\n            \n            if (cond_202003) {\n                loopres_202004 = l_idx_201982;\n                loopres_202005 = r_idx_201983;\n                loopres_202006 = min_res_196862;\n            } else {\n                bool cond_202007 = slt64(abs_res_201995, abs_res_202002);\n                bool cond_f_res_202008 = min_res_201988 == r_idx_201983;\n                bool x_202009 = !cond_202007;\n                bool y_202010 = cond_f_res_202008 && x_202009;\n                bool cond_202011 = cond_202007 || y_202010;\n                int64_t loopres_f_res_202012;\n                \n                if (cond_202011) {\n                    loopres_f_res_202012 = max_res_201986;\n                } else {\n                    loopres_f_res_202012 = l_idx_201982;\n                }\n                \n                int64_t loopres_f_res_202013;\n                \n                if (cond_202011) {\n                    loopres_f_res_202013 = r_idx_201983;\n                } else {\n                    loopres_f_res_202013 = min_res_201988;\n                }\n                \n                int64_t loopres_f_re",
                   "s_202014;\n                \n                if (cond_202011) {\n                    int64_t loopres_f_res_t_res_202015 = add64((int64_t) 1,\n                                                               span_201984);\n                    \n                    loopres_f_res_202014 = loopres_f_res_t_res_202015;\n                } else {\n                    int64_t loopres_f_res_f_res_202016 = add64((int64_t) 1,\n                                                               span_201984);\n                    \n                    loopres_f_res_202014 = loopres_f_res_f_res_202016;\n                }\n                loopres_202004 = loopres_f_res_202012;\n                loopres_202005 = loopres_f_res_202013;\n                loopres_202006 = loopres_f_res_202014;\n            }\n            \n            bool loop_cond_202017 = slt64(loopres_202006, min_res_196862);\n            bool loop_while_tmp_225675 = loop_cond_202017;\n            int64_t l_idx_tmp_225676 = loopres_202004;\n            int64_t r_idx_tmp_225677 = loopres_202005;\n            int64_t span_tmp_225678 = loopres_202006;\n            \n            loop_while_201981 = loop_while_tmp_225675;\n            l_idx_201982 = l_idx_tmp_225676;\n            r_idx_201983 = r_idx_tmp_225677;\n            span_201984 = span_tmp_225678;\n        }\n        idx_201977 = loop_while_201981;\n        idx_201978 = l_idx_201982;\n        idx_201979 = r_idx_201983;\n        idx_201980 = span_201984;\n        \n        int64_t min_res_202018 = smin64(min_arg_201942, idx_201978);\n        int64_t max_res_202019 = smax64((int64_t) 0, min_res_202018);\n        int64_t defunc_0_m_fun_res_202020;\n        \n        if (cond_201946) {\n            defunc_0_m_fun_res_202020 = (int64_t) 0;\n        } else {\n            int64_t y_202021 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_202022 = gtid_201938 == y_202021;\n            int64_t defunc_0_m_fun_res_f_res_202023;\n            \n            if (cond_202022) {\n                int64_t defunc_0_m_fun_res_f_",
                   "res_t_res_202024 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_202023 =\n                    defunc_0_m_fun_res_f_res_t_res_202024;\n            } else {\n                int64_t x_202025 = sub64(gtid_201938, (int64_t) 1);\n                int64_t x_202026 = mul64(jump_s_196701, x_202025);\n                int64_t min_arg_202027 = add64((int64_t) 1, x_202026);\n                int64_t min_res_202028 = smin64(defunc_0_f_res_196740,\n                                                min_arg_202027);\n                \n                defunc_0_m_fun_res_f_res_202023 = min_res_202028;\n            }\n            defunc_0_m_fun_res_202020 = defunc_0_m_fun_res_f_res_202023;\n        }\n        \n        int64_t x_202029 = add64(min_res_201943, max_res_202019);\n        int64_t r_202030 = sub64(x_202029, (int64_t) 1);\n        bool x_202031 = sle64((int64_t) 0, r_202030);\n        bool y_202032 = slt64(r_202030, defunc_0_f_res_196740);\n        bool bounds_check_202033 = x_202031 && y_202032;\n        bool index_certs_202034;\n        \n        if (!bounds_check_202033) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 14) == -1) {\n                    global_failure_args[0] = (int64_t) r_202030;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_202035;\n        \n        x_202035 = ((__global int64_t *) mem_222388)[gtid_201936 *\n                                                     (defunc_0_f_res_196740 *\n                                                      n_p_196694) +\n                                                     gtid_201937 *\n                                                     defunc_0_f_res_196740 +\n                                                     r_202030];\n        \n        int64_t abs_arg_202036 = sub64(x_202035, defunc_0_m_fun_r",
                   "es_202020);\n        int64_t abs_res_202037 = abs64(abs_arg_202036);\n        bool x_202038 = sle64((int64_t) 0, max_res_202019);\n        bool y_202039 = slt64(max_res_202019, defunc_0_f_res_196740);\n        bool bounds_check_202040 = x_202038 && y_202039;\n        bool index_certs_202041;\n        \n        if (!bounds_check_202040) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 15) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_202019;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_202042;\n        \n        x_202042 = ((__global int64_t *) mem_222388)[gtid_201936 *\n                                                     (defunc_0_f_res_196740 *\n                                                      n_p_196694) +\n                                                     gtid_201937 *\n                                                     defunc_0_f_res_196740 +\n                                                     max_res_202019];\n        \n        int64_t abs_arg_202043 = sub64(x_202042, defunc_0_m_fun_res_202020);\n        int64_t abs_res_202044 = abs64(abs_arg_202043);\n        int64_t max_res_202045 = smax64(abs_res_202037, abs_res_202044);\n        float defunc_0_f_res_202046 = sitofp_i64_f32(max_res_202045);\n        float defunc_1_f_res_202047 = max_res_201944 + defunc_0_f_res_202046;\n        \n        ((__global float *) mem_222411)[gtid_201936 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_201937 * s_n_m_196745 +\n                                        gtid_201938] = defunc_1_f_res_202047;\n        ((__global int64_t *) mem_222416)[gtid_201936 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_201937 * s_n_m_196",
                   "745 +\n                                          gtid_201938] = max_res_202019;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_201932\n}\n__kernel void mainzisegmap_202549(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_222445)\n{\n    #define segmap_group_sizze_202544 (mainzisegmap_group_sizze_202520)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225705;\n    int32_t local_tid_225706;\n    int64_t group_sizze_225709;\n    int32_t wave_sizze_225708;\n    int32_t group_tid_225707;\n    \n    global_tid_225705 = get_global_id(0);\n    local_tid_225706 = get_local_id(0);\n    group_sizze_225709 = get_local_size(0);\n    wave_sizze_225708 = LOCKSTEP_WIDTH;\n    group_tid_225707 = get_group_id(0);\n    \n    int32_t phys_tid_202549 = global_tid_225705;\n    int64_t global_tid_225710 = sext_i32_i64(group_tid_225707) *\n            segmap_group_sizze_202544 + sext_i32_i64(local_tid_225706);\n    int64_t slice_225711 = n_196692;\n    int64_t slice_225712 = m_196691 * slice_225711;\n    int64_t gtid_202547 = squot64(global_tid_225710, slice_225711);\n    int64_t remnant_225713 = global_tid_225710 - gtid_202547 * slice_225711;\n    int64_t gtid_202548 = remnant_225713;\n    int64_t remnant_225714 = remnant_225713 - gtid_202548;\n    \n    if (slt64(gtid_202547, m_196691) && slt64(gtid_202548, n_196692)) {\n        int64_t x_202550;\n        \n        x_202550 = ((__global int64_t *) ext_mem_222257)[gtid_202547 *\n                                                         n_196692 +\n                                                         gtid_202548];\n        \n        int64_t defunc_0_f_res_202551 = add64((int64_t) 1, x_202550);\n        \n        ((__global int64_t *) mem_222445)[gt",
                   "id_202547 * n_196692 +\n                                          gtid_202548] = defunc_0_f_res_202551;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_202544\n}\n__kernel void mainzisegmap_202561(__global int *global_failure,\n                                  int64_t m_196691, int64_t q_l_196697,\n                                  int64_t min_res_196994, float i64_res_197000,\n                                  __global unsigned char *ext_mem_222256,\n                                  __global unsigned char *mem_222449, __global\n                                  unsigned char *mem_222452, __global\n                                  unsigned char *mem_222455, __global\n                                  unsigned char *mem_222458)\n{\n    #define segmap_group_sizze_202554 (mainzisegmap_group_sizze_202494)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225715;\n    int32_t local_tid_225716;\n    int64_t group_sizze_225719;\n    int32_t wave_sizze_225718;\n    int32_t group_tid_225717;\n    \n    global_tid_225715 = get_global_id(0);\n    local_tid_225716 = get_local_id(0);\n    group_sizze_225719 = get_local_size(0);\n    wave_sizze_225718 = LOCKSTEP_WIDTH;\n    group_tid_225717 = get_group_id(0);\n    \n    int32_t phys_tid_202561 = global_tid_225715;\n    int64_t global_tid_225720 = sext_i32_i64(group_tid_225717) *\n            segmap_group_sizze_202554 + sext_i32_i64(local_tid_225716);\n    int64_t slice_225721 = m_196691;\n    int64_t gtid_202560 = global_tid_225720;\n    int64_t remnant_225722 = global_tid_225720 - gtid_202560;\n    \n    if (slt64(gtid_202560, m_196691)) {\n        int64_t x_202562;\n        \n        x_202562 = ((__global int64_t *) ext_mem_222256)[gtid_202560];\n        \n        int64_t min_arg_202563 = sub64(x_202562, (int64_t) 1);\n        int64_t min_arg_202564 = sub64(x_202562, min_res_196994);\n        int64_t min_res_202565 = smin64(",
                   "q_l_196697, x_202562);\n        float i64_res_202566 = sitofp_i64_f32(x_202562);\n        float x_202567 = i64_res_197000 - i64_res_202566;\n        float max_arg_202568 = x_202567 / 2.0F;\n        float max_res_202569 = fmax32(0.0F, max_arg_202568);\n        \n        ((__global int64_t *) mem_222449)[gtid_202560] = min_arg_202563;\n        ((__global int64_t *) mem_222452)[gtid_202560] = min_arg_202564;\n        ((__global int64_t *) mem_222455)[gtid_202560] = min_res_202565;\n        ((__global float *) mem_222458)[gtid_202560] = max_res_202569;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_202554\n}\n__kernel void mainzisegmap_202582(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t jump_l_196703, int64_t l_n_m_196752,\n                                  int64_t i_196779, unsigned char x_196780_bits,\n                                  int64_t min_res_196994,\n                                  unsigned char loop_cond_196999_bits, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_222445, __global\n                                  unsigned char *mem_222449, __global\n                                  unsigned char *mem_222452, __global\n                                  unsigned char *mem_222455, __global\n                                  unsigned char *mem_222458, __global\n                                  unsigned char *mem_222463, __global\n                                  unsigned char *mem_222467)\n{\n    bool x_196780 = x_196780_bits;\n    bool loop_cond_196999 = loop_cond_196999_bits;\n    \n    #define segmap_group_sizze_202576 (mainzisegmap_group_sizze_202290)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n ",
                   "   \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225723;\n    int32_t local_tid_225724;\n    int64_t group_sizze_225727;\n    int32_t wave_sizze_225726;\n    int32_t group_tid_225725;\n    \n    global_tid_225723 = get_global_id(0);\n    local_tid_225724 = get_local_id(0);\n    group_sizze_225727 = get_local_size(0);\n    wave_sizze_225726 = LOCKSTEP_WIDTH;\n    group_tid_225725 = get_group_id(0);\n    \n    int32_t phys_tid_202582 = global_tid_225723;\n    int64_t global_tid_225728 = sext_i32_i64(group_tid_225725) *\n            segmap_group_sizze_202576 + sext_i32_i64(local_tid_225724);\n    int64_t slice_225729 = l_n_m_196752;\n    int64_t slice_225730 = m_196691 * slice_225729;\n    int64_t gtid_202580 = squot64(global_tid_225728, slice_225729);\n    int64_t remnant_225731 = global_tid_225728 - gtid_202580 * slice_225729;\n    int64_t gtid_202581 = remnant_225731;\n    int64_t remnant_225732 = remnant_225731 - gtid_202581;\n    \n    if (slt64(gtid_202580, m_196691) && slt64(gtid_202581, l_n_m_196752)) {\n        int64_t min_arg_202585;\n        \n        min_arg_202585 = ((__global int64_t *) mem_222449)[gtid_202580];\n        \n        int64_t min_arg_202586;\n        \n        min_arg_202586 = ((__global int64_t *) mem_222452)[gtid_202580];\n        \n        int64_t min_res_202587;\n        \n        min_res_202587 = ((__global int64_t *) mem_222455)[gtid_202580];\n        \n        float max_res_202588;\n        \n        max_res_202588 = ((__global float *) mem_222458)[gtid_202580];\n        \n        int64_t min_arg_202590 = mul64(jump_l_196703, gtid_202581);\n        int64_t min_res_202591 = smin64(i_196779, min_arg_202590);\n        int64_t defunc_0_g_res_202592 = add64((int64_t) 1, min_res_202591);\n        bool init_idx_202593;\n        int64_t init_idx_202594;\n        int64_t init_idx_202595;\n        bool loop_while_202596;\n        int64_t low_202597;\n        int64_t high_202598;\n        \n        loop_while_202596 = x_196780;\n        low_202597 = (int64_t) 0;\n    ",
                   "    high_202598 = i_196779;\n        while (loop_while_202596) {\n            int64_t x_202599 = add64(low_202597, high_202598);\n            int64_t mid_202600 = sdiv64(x_202599, (int64_t) 2);\n            bool x_202601 = sle64((int64_t) 0, mid_202600);\n            bool y_202602 = slt64(mid_202600, n_196692);\n            bool bounds_check_202603 = x_202601 && y_202602;\n            bool index_certs_202604;\n            \n            if (!bounds_check_202603) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 21) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_202600;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t mid_id_202605;\n            \n            mid_id_202605 = ((__global int64_t *) mem_222445)[gtid_202580 *\n                                                              n_196692 +\n                                                              mid_202600];\n            \n            bool cond_202606 = slt64(mid_id_202605, (int64_t) 0);\n            int64_t mid_idx_202607;\n            \n            if (cond_202606) {\n                mid_idx_202607 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_202607 = mid_id_202605;\n            }\n            \n            bool cond_202608 = sle64(defunc_0_g_res_202592, mid_idx_202607);\n            int64_t loopres_202609;\n            int64_t loopres_202610;\n            \n            if (cond_202608) {\n                int64_t loopres_t_res_202611 = sub64(mid_202600, (int64_t) 1);\n                \n                loopres_202609 = low_202597;\n                loopres_202610 = loopres_t_res_202611;\n            } else {\n                int64_t loopres_f_res_202612 = add64((int64_t) 1, mid_202600);\n                \n                loopres_202609 = loopres_f_res_202612;\n   ",
                   "             loopres_202610 = high_202598;\n            }\n            \n            bool loop_cond_202613 = sle64(loopres_202609, loopres_202610);\n            bool loop_while_tmp_225733 = loop_cond_202613;\n            int64_t low_tmp_225734 = loopres_202609;\n            int64_t high_tmp_225735 = loopres_202610;\n            \n            loop_while_202596 = loop_while_tmp_225733;\n            low_202597 = low_tmp_225734;\n            high_202598 = high_tmp_225735;\n        }\n        init_idx_202593 = loop_while_202596;\n        init_idx_202594 = low_202597;\n        init_idx_202595 = high_202598;\n        \n        bool idx_202614;\n        int64_t idx_202615;\n        int64_t idx_202616;\n        int64_t idx_202617;\n        bool loop_while_202618;\n        int64_t l_idx_202619;\n        int64_t r_idx_202620;\n        int64_t span_202621;\n        \n        loop_while_202618 = loop_cond_196999;\n        l_idx_202619 = init_idx_202594;\n        r_idx_202620 = init_idx_202594;\n        span_202621 = (int64_t) 1;\n        while (loop_while_202618) {\n            int64_t max_arg_202622 = sub64(l_idx_202619, (int64_t) 1);\n            int64_t max_res_202623 = smax64((int64_t) 0, max_arg_202622);\n            int64_t min_arg_202624 = add64((int64_t) 1, r_idx_202620);\n            int64_t min_res_202625 = smin64(min_arg_202585, min_arg_202624);\n            bool x_202626 = sle64((int64_t) 0, max_res_202623);\n            bool y_202627 = slt64(max_res_202623, n_196692);\n            bool bounds_check_202628 = x_202626 && y_202627;\n            bool index_certs_202629;\n            \n            if (!bounds_check_202628) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 22) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_202623;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n ",
                   "           int64_t x_202630;\n            \n            x_202630 = ((__global int64_t *) mem_222445)[gtid_202580 *\n                                                         n_196692 +\n                                                         max_res_202623];\n            \n            int64_t abs_arg_202631 = sub64(x_202630, defunc_0_g_res_202592);\n            int64_t abs_res_202632 = abs64(abs_arg_202631);\n            bool x_202633 = sle64((int64_t) 0, min_res_202625);\n            bool y_202634 = slt64(min_res_202625, n_196692);\n            bool bounds_check_202635 = x_202633 && y_202634;\n            bool index_certs_202636;\n            \n            if (!bounds_check_202635) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 23) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_202625;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t x_202637;\n            \n            x_202637 = ((__global int64_t *) mem_222445)[gtid_202580 *\n                                                         n_196692 +\n                                                         min_res_202625];\n            \n            int64_t abs_arg_202638 = sub64(x_202637, defunc_0_g_res_202592);\n            int64_t abs_res_202639 = abs64(abs_arg_202638);\n            bool cond_202640 = max_res_202623 == l_idx_202619;\n            int64_t loopres_202641;\n            int64_t loopres_202642;\n            int64_t loopres_202643;\n            \n            if (cond_202640) {\n                loopres_202641 = l_idx_202619;\n                loopres_202642 = r_idx_202620;\n                loopres_202643 = min_res_196994;\n            } else {\n                bool cond_202644 = slt64(abs_res_202632, abs_res_202639);\n                bool cond_f_res_202645 = min_res_202625 == r_idx_20262",
                   "0;\n                bool x_202646 = !cond_202644;\n                bool y_202647 = cond_f_res_202645 && x_202646;\n                bool cond_202648 = cond_202644 || y_202647;\n                int64_t loopres_f_res_202649;\n                \n                if (cond_202648) {\n                    loopres_f_res_202649 = max_res_202623;\n                } else {\n                    loopres_f_res_202649 = l_idx_202619;\n                }\n                \n                int64_t loopres_f_res_202650;\n                \n                if (cond_202648) {\n                    loopres_f_res_202650 = r_idx_202620;\n                } else {\n                    loopres_f_res_202650 = min_res_202625;\n                }\n                \n                int64_t loopres_f_res_202651;\n                \n                if (cond_202648) {\n                    int64_t loopres_f_res_t_res_202652 = add64((int64_t) 1,\n                                                               span_202621);\n                    \n                    loopres_f_res_202651 = loopres_f_res_t_res_202652;\n                } else {\n                    int64_t loopres_f_res_f_res_202653 = add64((int64_t) 1,\n                                                               span_202621);\n                    \n                    loopres_f_res_202651 = loopres_f_res_f_res_202653;\n                }\n                loopres_202641 = loopres_f_res_202649;\n                loopres_202642 = loopres_f_res_202650;\n                loopres_202643 = loopres_f_res_202651;\n            }\n            \n            bool loop_cond_202654 = slt64(loopres_202643, min_res_196994);\n            bool loop_while_tmp_225736 = loop_cond_202654;\n            int64_t l_idx_tmp_225737 = loopres_202641;\n            int64_t r_idx_tmp_225738 = loopres_202642;\n            int64_t span_tmp_225739 = loopres_202643;\n            \n            loop_while_202618 = loop_while_tmp_225736;\n            l_idx_202619 = l_idx_tmp_225737;\n            r_idx_202620 = r_idx_tmp_225738;\n ",
                   "           span_202621 = span_tmp_225739;\n        }\n        idx_202614 = loop_while_202618;\n        idx_202615 = l_idx_202619;\n        idx_202616 = r_idx_202620;\n        idx_202617 = span_202621;\n        \n        int64_t min_res_202655 = smin64(min_arg_202586, idx_202615);\n        int64_t max_res_202656 = smax64((int64_t) 0, min_res_202655);\n        int64_t x_202657 = add64(min_res_202587, max_res_202656);\n        int64_t r_202658 = sub64(x_202657, (int64_t) 1);\n        bool x_202659 = sle64((int64_t) 0, r_202658);\n        bool y_202660 = slt64(r_202658, n_196692);\n        bool bounds_check_202661 = x_202659 && y_202660;\n        bool index_certs_202662;\n        \n        if (!bounds_check_202661) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 24) == -1) {\n                    global_failure_args[0] = (int64_t) r_202658;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_202663;\n        \n        x_202663 = ((__global int64_t *) ext_mem_222257)[gtid_202580 *\n                                                         n_196692 + r_202658];\n        \n        int64_t abs_arg_202664 = sub64(x_202663, min_res_202591);\n        int64_t abs_res_202665 = abs64(abs_arg_202664);\n        bool x_202666 = sle64((int64_t) 0, max_res_202656);\n        bool y_202667 = slt64(max_res_202656, n_196692);\n        bool bounds_check_202668 = x_202666 && y_202667;\n        bool index_certs_202669;\n        \n        if (!bounds_check_202668) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 25) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_202656;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_202670;\n        \n        x_202670 = ((__global int64_t *) ext",
                   "_mem_222257)[gtid_202580 *\n                                                         n_196692 +\n                                                         max_res_202656];\n        \n        int64_t abs_arg_202671 = sub64(x_202670, min_res_202591);\n        int64_t abs_res_202672 = abs64(abs_arg_202671);\n        int64_t max_res_202673 = smax64(abs_res_202665, abs_res_202672);\n        float defunc_0_f_res_202674 = sitofp_i64_f32(max_res_202673);\n        float defunc_1_f_res_202675 = max_res_202588 + defunc_0_f_res_202674;\n        \n        ((__global float *) mem_222463)[gtid_202580 * l_n_m_196752 +\n                                        gtid_202581] = defunc_1_f_res_202675;\n        ((__global int64_t *) mem_222467)[gtid_202580 * l_n_m_196752 +\n                                          gtid_202581] = max_res_202656;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_202576\n}\n__kernel void mainzisegmap_203175(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_222494)\n{\n    #define segmap_group_sizze_203170 (mainzisegmap_group_sizze_203146)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225765;\n    int32_t local_tid_225766;\n    int64_t group_sizze_225769;\n    int32_t wave_sizze_225768;\n    int32_t group_tid_225767;\n    \n    global_tid_225765 = get_global_id(0);\n    local_tid_225766 = get_local_id(0);\n    group_sizze_225769 = get_local_size(0);\n    wave_sizze_225768 = LOCKSTEP_WIDTH;\n    group_tid_225767 = get_group_id(0);\n    \n    int32_t phys_tid_203175 = global_tid_225765;\n    int64_t global_tid_225770 = sext_i32_i64(group_tid_225767) *\n            segmap_group_sizze_203170 + sext_i32_i64(local_tid_225766);\n    int64_t slice_225771 = n_196692;\n    int64_",
                   "t slice_225772 = m_196691 * slice_225771;\n    int64_t gtid_203173 = squot64(global_tid_225770, slice_225771);\n    int64_t remnant_225773 = global_tid_225770 - gtid_203173 * slice_225771;\n    int64_t gtid_203174 = remnant_225773;\n    int64_t remnant_225774 = remnant_225773 - gtid_203174;\n    \n    if (slt64(gtid_203173, m_196691) && slt64(gtid_203174, n_196692)) {\n        int64_t x_203176;\n        \n        x_203176 = ((__global int64_t *) ext_mem_222257)[gtid_203173 *\n                                                         n_196692 +\n                                                         gtid_203174];\n        \n        int64_t defunc_0_f_res_203177 = add64((int64_t) 1, x_203176);\n        \n        ((__global int64_t *) mem_222494)[gtid_203173 * n_196692 +\n                                          gtid_203174] = defunc_0_f_res_203177;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203170\n}\n__kernel void mainzisegmap_203187(__global int *global_failure,\n                                  int64_t m_196691, int64_t q_t_196696,\n                                  int64_t min_res_197106, float i64_res_197112,\n                                  __global unsigned char *ext_mem_222256,\n                                  __global unsigned char *mem_222498, __global\n                                  unsigned char *mem_222501, __global\n                                  unsigned char *mem_222504, __global\n                                  unsigned char *mem_222507)\n{\n    #define segmap_group_sizze_203180 (mainzisegmap_group_sizze_203120)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225775;\n    int32_t local_tid_225776;\n    int64_t group_sizze_225779;\n    int32_t wave_sizze_225778;\n    int32_t group_tid_225777;\n    \n    global_tid_225775 = get_global_id(0);\n    local_tid_225776 = get_local_id(0);\n    group_sizze_225779 = get_local_size(0);\n  ",
                   "  wave_sizze_225778 = LOCKSTEP_WIDTH;\n    group_tid_225777 = get_group_id(0);\n    \n    int32_t phys_tid_203187 = global_tid_225775;\n    int64_t global_tid_225780 = sext_i32_i64(group_tid_225777) *\n            segmap_group_sizze_203180 + sext_i32_i64(local_tid_225776);\n    int64_t slice_225781 = m_196691;\n    int64_t gtid_203186 = global_tid_225780;\n    int64_t remnant_225782 = global_tid_225780 - gtid_203186;\n    \n    if (slt64(gtid_203186, m_196691)) {\n        int64_t x_203188;\n        \n        x_203188 = ((__global int64_t *) ext_mem_222256)[gtid_203186];\n        \n        int64_t min_arg_203189 = sub64(x_203188, (int64_t) 1);\n        int64_t min_arg_203190 = sub64(x_203188, min_res_197106);\n        int64_t min_res_203191 = smin64(q_t_196696, x_203188);\n        float i64_res_203192 = sitofp_i64_f32(x_203188);\n        float x_203193 = i64_res_197112 - i64_res_203192;\n        float max_arg_203194 = x_203193 / 2.0F;\n        float max_res_203195 = fmax32(0.0F, max_arg_203194);\n        \n        ((__global int64_t *) mem_222498)[gtid_203186] = min_arg_203189;\n        ((__global int64_t *) mem_222501)[gtid_203186] = min_arg_203190;\n        ((__global int64_t *) mem_222504)[gtid_203186] = min_res_203191;\n        ((__global float *) mem_222507)[gtid_203186] = max_res_203195;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203180\n}\n__kernel void mainzisegmap_203208(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t jump_t_196702, int64_t t_n_m_196759,\n                                  int64_t i_196779, unsigned char x_196780_bits,\n                                  int64_t min_res_197106,\n                                  unsigned char loop_cond_197111_bits, __global\n                                  unsigned char *ext_mem_222257, __global\n",
                   "                                  unsigned char *mem_222494, __global\n                                  unsigned char *mem_222498, __global\n                                  unsigned char *mem_222501, __global\n                                  unsigned char *mem_222504, __global\n                                  unsigned char *mem_222507, __global\n                                  unsigned char *mem_222512, __global\n                                  unsigned char *mem_222516)\n{\n    bool x_196780 = x_196780_bits;\n    bool loop_cond_197111 = loop_cond_197111_bits;\n    \n    #define segmap_group_sizze_203202 (mainzisegmap_group_sizze_202916)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225783;\n    int32_t local_tid_225784;\n    int64_t group_sizze_225787;\n    int32_t wave_sizze_225786;\n    int32_t group_tid_225785;\n    \n    global_tid_225783 = get_global_id(0);\n    local_tid_225784 = get_local_id(0);\n    group_sizze_225787 = get_local_size(0);\n    wave_sizze_225786 = LOCKSTEP_WIDTH;\n    group_tid_225785 = get_group_id(0);\n    \n    int32_t phys_tid_203208 = global_tid_225783;\n    int64_t global_tid_225788 = sext_i32_i64(group_tid_225785) *\n            segmap_group_sizze_203202 + sext_i32_i64(local_tid_225784);\n    int64_t slice_225789 = t_n_m_196759;\n    int64_t slice_225790 = m_196691 * slice_225789;\n    int64_t gtid_203206 = squot64(global_tid_225788, slice_225789);\n    int64_t remnant_225791 = global_tid_225788 - gtid_203206 * slice_225789;\n    int64_t gtid_203207 = remnant_225791;\n    int64_t remnant_225792 = remnant_225791 - gtid_203207;\n    \n    if (slt64(gtid_203206, m_196691) && slt64(gtid_203207, t_n_m_196759)) {\n        int64_t min_arg_203211;\n        \n        min_arg_203211 = ((__global int64_t *) mem_222498)[gtid_203206];\n        \n        int64_t min_arg_203212;\n        \n        min_arg_203212 = ((__global int64_t *) mem_222501)[gtid",
                   "_203206];\n        \n        int64_t min_res_203213;\n        \n        min_res_203213 = ((__global int64_t *) mem_222504)[gtid_203206];\n        \n        float max_res_203214;\n        \n        max_res_203214 = ((__global float *) mem_222507)[gtid_203206];\n        \n        int64_t min_arg_203216 = mul64(jump_t_196702, gtid_203207);\n        int64_t min_res_203217 = smin64(i_196779, min_arg_203216);\n        int64_t defunc_0_g_res_203218 = add64((int64_t) 1, min_res_203217);\n        bool init_idx_203219;\n        int64_t init_idx_203220;\n        int64_t init_idx_203221;\n        bool loop_while_203222;\n        int64_t low_203223;\n        int64_t high_203224;\n        \n        loop_while_203222 = x_196780;\n        low_203223 = (int64_t) 0;\n        high_203224 = i_196779;\n        while (loop_while_203222) {\n            int64_t x_203225 = add64(low_203223, high_203224);\n            int64_t mid_203226 = sdiv64(x_203225, (int64_t) 2);\n            bool x_203227 = sle64((int64_t) 0, mid_203226);\n            bool y_203228 = slt64(mid_203226, n_196692);\n            bool bounds_check_203229 = x_203227 && y_203228;\n            bool index_certs_203230;\n            \n            if (!bounds_check_203229) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 31) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_203226;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t mid_id_203231;\n            \n            mid_id_203231 = ((__global int64_t *) mem_222494)[gtid_203206 *\n                                                              n_196692 +\n                                                              mid_203226];\n            \n            bool cond_203232 = slt64(mid_id_203231, (int64_t) 0);\n            int64_t mid_idx_203233;\n            \n            i",
                   "f (cond_203232) {\n                mid_idx_203233 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_203233 = mid_id_203231;\n            }\n            \n            bool cond_203234 = sle64(defunc_0_g_res_203218, mid_idx_203233);\n            int64_t loopres_203235;\n            int64_t loopres_203236;\n            \n            if (cond_203234) {\n                int64_t loopres_t_res_203237 = sub64(mid_203226, (int64_t) 1);\n                \n                loopres_203235 = low_203223;\n                loopres_203236 = loopres_t_res_203237;\n            } else {\n                int64_t loopres_f_res_203238 = add64((int64_t) 1, mid_203226);\n                \n                loopres_203235 = loopres_f_res_203238;\n                loopres_203236 = high_203224;\n            }\n            \n            bool loop_cond_203239 = sle64(loopres_203235, loopres_203236);\n            bool loop_while_tmp_225793 = loop_cond_203239;\n            int64_t low_tmp_225794 = loopres_203235;\n            int64_t high_tmp_225795 = loopres_203236;\n            \n            loop_while_203222 = loop_while_tmp_225793;\n            low_203223 = low_tmp_225794;\n            high_203224 = high_tmp_225795;\n        }\n        init_idx_203219 = loop_while_203222;\n        init_idx_203220 = low_203223;\n        init_idx_203221 = high_203224;\n        \n        bool idx_203240;\n        int64_t idx_203241;\n        int64_t idx_203242;\n        int64_t idx_203243;\n        bool loop_while_203244;\n        int64_t l_idx_203245;\n        int64_t r_idx_203246;\n        int64_t span_203247;\n        \n        loop_while_203244 = loop_cond_197111;\n        l_idx_203245 = init_idx_203220;\n        r_idx_203246 = init_idx_203220;\n        span_203247 = (int64_t) 1;\n        while (loop_while_203244) {\n            int64_t max_arg_203248 = sub64(l_idx_203245, (int64_t) 1);\n            int64_t max_res_203249 = smax64((int64_t) 0, max_arg_203248);\n            int64_t min_arg_203250 = add64((int64_t) 1, r_idx_203246);\n  ",
                   "          int64_t min_res_203251 = smin64(min_arg_203211, min_arg_203250);\n            bool x_203252 = sle64((int64_t) 0, max_res_203249);\n            bool y_203253 = slt64(max_res_203249, n_196692);\n            bool bounds_check_203254 = x_203252 && y_203253;\n            bool index_certs_203255;\n            \n            if (!bounds_check_203254) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 32) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_203249;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t x_203256;\n            \n            x_203256 = ((__global int64_t *) mem_222494)[gtid_203206 *\n                                                         n_196692 +\n                                                         max_res_203249];\n            \n            int64_t abs_arg_203257 = sub64(x_203256, defunc_0_g_res_203218);\n            int64_t abs_res_203258 = abs64(abs_arg_203257);\n            bool x_203259 = sle64((int64_t) 0, min_res_203251);\n            bool y_203260 = slt64(min_res_203251, n_196692);\n            bool bounds_check_203261 = x_203259 && y_203260;\n            bool index_certs_203262;\n            \n            if (!bounds_check_203261) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 33) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_203251;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            int64_t x_203263;\n            \n            x_203263 = ((__global int64_t *) mem_222494)[gtid_203206 *\n                                                         n_196692 +\n     ",
                   "                                                    min_res_203251];\n            \n            int64_t abs_arg_203264 = sub64(x_203263, defunc_0_g_res_203218);\n            int64_t abs_res_203265 = abs64(abs_arg_203264);\n            bool cond_203266 = max_res_203249 == l_idx_203245;\n            int64_t loopres_203267;\n            int64_t loopres_203268;\n            int64_t loopres_203269;\n            \n            if (cond_203266) {\n                loopres_203267 = l_idx_203245;\n                loopres_203268 = r_idx_203246;\n                loopres_203269 = min_res_197106;\n            } else {\n                bool cond_203270 = slt64(abs_res_203258, abs_res_203265);\n                bool cond_f_res_203271 = min_res_203251 == r_idx_203246;\n                bool x_203272 = !cond_203270;\n                bool y_203273 = cond_f_res_203271 && x_203272;\n                bool cond_203274 = cond_203270 || y_203273;\n                int64_t loopres_f_res_203275;\n                \n                if (cond_203274) {\n                    loopres_f_res_203275 = max_res_203249;\n                } else {\n                    loopres_f_res_203275 = l_idx_203245;\n                }\n                \n                int64_t loopres_f_res_203276;\n                \n                if (cond_203274) {\n                    loopres_f_res_203276 = r_idx_203246;\n                } else {\n                    loopres_f_res_203276 = min_res_203251;\n                }\n                \n                int64_t loopres_f_res_203277;\n                \n                if (cond_203274) {\n                    int64_t loopres_f_res_t_res_203278 = add64((int64_t) 1,\n                                                               span_203247);\n                    \n                    loopres_f_res_203277 = loopres_f_res_t_res_203278;\n                } else {\n                    int64_t loopres_f_res_f_res_203279 = add64((int64_t) 1,\n                                                               span_203247);\n                 ",
                   "   \n                    loopres_f_res_203277 = loopres_f_res_f_res_203279;\n                }\n                loopres_203267 = loopres_f_res_203275;\n                loopres_203268 = loopres_f_res_203276;\n                loopres_203269 = loopres_f_res_203277;\n            }\n            \n            bool loop_cond_203280 = slt64(loopres_203269, min_res_197106);\n            bool loop_while_tmp_225796 = loop_cond_203280;\n            int64_t l_idx_tmp_225797 = loopres_203267;\n            int64_t r_idx_tmp_225798 = loopres_203268;\n            int64_t span_tmp_225799 = loopres_203269;\n            \n            loop_while_203244 = loop_while_tmp_225796;\n            l_idx_203245 = l_idx_tmp_225797;\n            r_idx_203246 = r_idx_tmp_225798;\n            span_203247 = span_tmp_225799;\n        }\n        idx_203240 = loop_while_203244;\n        idx_203241 = l_idx_203245;\n        idx_203242 = r_idx_203246;\n        idx_203243 = span_203247;\n        \n        int64_t min_res_203281 = smin64(min_arg_203212, idx_203241);\n        int64_t max_res_203282 = smax64((int64_t) 0, min_res_203281);\n        int64_t x_203283 = add64(min_res_203213, max_res_203282);\n        int64_t r_203284 = sub64(x_203283, (int64_t) 1);\n        bool x_203285 = sle64((int64_t) 0, r_203284);\n        bool y_203286 = slt64(r_203284, n_196692);\n        bool bounds_check_203287 = x_203285 && y_203286;\n        bool index_certs_203288;\n        \n        if (!bounds_check_203287) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 34) == -1) {\n                    global_failure_args[0] = (int64_t) r_203284;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_203289;\n        \n        x_203289 = ((__global int64_t *) ext_mem_222257)[gtid_203206 *\n                                                         n_196692 + r_203284];\n        \n        int64_t abs_arg_203290 = sub6",
                   "4(x_203289, min_res_203217);\n        int64_t abs_res_203291 = abs64(abs_arg_203290);\n        bool x_203292 = sle64((int64_t) 0, max_res_203282);\n        bool y_203293 = slt64(max_res_203282, n_196692);\n        bool bounds_check_203294 = x_203292 && y_203293;\n        bool index_certs_203295;\n        \n        if (!bounds_check_203294) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 35) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_203282;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        int64_t x_203296;\n        \n        x_203296 = ((__global int64_t *) ext_mem_222257)[gtid_203206 *\n                                                         n_196692 +\n                                                         max_res_203282];\n        \n        int64_t abs_arg_203297 = sub64(x_203296, min_res_203217);\n        int64_t abs_res_203298 = abs64(abs_arg_203297);\n        int64_t max_res_203299 = smax64(abs_res_203291, abs_res_203298);\n        float defunc_0_f_res_203300 = sitofp_i64_f32(max_res_203299);\n        float defunc_1_f_res_203301 = max_res_203214 + defunc_0_f_res_203300;\n        \n        ((__global float *) mem_222512)[gtid_203206 * t_n_m_196759 +\n                                        gtid_203207] = defunc_1_f_res_203301;\n        ((__global int64_t *) mem_222516)[gtid_203206 * t_n_m_196759 +\n                                          gtid_203207] = max_res_203282;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203202\n}\n__kernel void mainzisegmap_203350(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222568, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_param_222572, __global\n         ",
                   "                         unsigned char *mem_222577)\n{\n    #define segmap_group_sizze_203345 (mainzisegmap_group_sizze_203319)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225840;\n    int32_t local_tid_225841;\n    int64_t group_sizze_225844;\n    int32_t wave_sizze_225843;\n    int32_t group_tid_225842;\n    \n    global_tid_225840 = get_global_id(0);\n    local_tid_225841 = get_local_id(0);\n    group_sizze_225844 = get_local_size(0);\n    wave_sizze_225843 = LOCKSTEP_WIDTH;\n    group_tid_225842 = get_group_id(0);\n    \n    int32_t phys_tid_203350 = global_tid_225840;\n    int64_t global_tid_225845 = sext_i32_i64(group_tid_225842) *\n            segmap_group_sizze_203345 + sext_i32_i64(local_tid_225841);\n    int64_t slice_225846 = n_196692;\n    int64_t slice_225847 = m_196691 * slice_225846;\n    int64_t gtid_203348 = squot64(global_tid_225845, slice_225846);\n    int64_t remnant_225848 = global_tid_225845 - gtid_203348 * slice_225846;\n    int64_t gtid_203349 = remnant_225848;\n    int64_t remnant_225849 = remnant_225848 - gtid_203349;\n    \n    if (slt64(gtid_203348, m_196691) && slt64(gtid_203349, n_196692)) {\n        float x_203351;\n        \n        x_203351 = ((__global float *) Y_mem_222225)[gtid_203348 * n_196692 +\n                                                     gtid_203349];\n        \n        float x_203352;\n        \n        x_203352 = ((__global float *) mem_param_222572)[gtid_203348 *\n                                                         ctx_param_ext_222568 +\n                                                         gtid_203349];\n        \n        float defunc_1_f_res_203353 = x_203351 - x_203352;\n        \n        ((__global float *) mem_222577)[gtid_203348 * n_196692 + gtid_203349] =\n            defunc_1_f_res_203353;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203345\n}\n__kernel void mainzisegmap_203495(__global int *",
                   "global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t n_p_196694,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t i_196779,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222322, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_222577, __global\n                                  unsigned char *mem_222583, __global\n                                  unsigned char *mem_222588)\n{\n    #define segmap_group_sizze_203488 (mainzisegmap_group_sizze_203382)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225850;\n    int32_t local_tid_225851;\n    int64_t group_sizze_225854;\n    int32_t wave_sizze_225853;\n    int32_t group_tid_225852;\n    \n    global_tid_225850 = get_global_id(0);\n    local_tid_225851 = get_local_id(0);\n    group_sizze_225854 = get_local_size(0);\n    wave_sizze_225853 = LOCKSTEP_WIDTH;\n    group_tid_225852 = get_group_id(0);\n    \n    int32_t phys_tid_203495 = global_tid_225850;\n    int64_t global_tid_225855 = sext_i32_i64(group_tid_225852) *\n            segmap_group_sizze_203488 + sext_i32_i64(local_tid_225851);\n    int64_t slice_225856 = defunc_0_f_res_196740;\n    int64_t slice_225857 = n_p_196694 * slice_225856;\n    int64_t slice_225858 = m_196691 * slice_225857;\n    int64_t gtid_203492 = squot64(global_tid_225855, slice_225857);\n    int64_t remnant_225859 = global_tid_225855 - gtid",
                   "_203492 * slice_225857;\n    int64_t gtid_203493 = squot64(remnant_225859, slice_225856);\n    int64_t remnant_225860 = remnant_225859 - gtid_203493 * slice_225856;\n    int64_t gtid_203494 = remnant_225860;\n    int64_t remnant_225861 = remnant_225860 - gtid_203494;\n    \n    if ((slt64(gtid_203492, m_196691) && slt64(gtid_203493, n_p_196694)) &&\n        slt64(gtid_203494, defunc_0_f_res_196740)) {\n        int64_t x_203499;\n        \n        x_203499 = ((__global int64_t *) ext_mem_222322)[gtid_203492 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_203493 *\n                                                         defunc_0_f_res_196740 +\n                                                         gtid_203494];\n        \n        int64_t x_203500 = mul64(n_p_196694, x_203499);\n        int64_t idx_203501 = add64(gtid_203493, x_203500);\n        bool cond_203502 = slt64(i_196779, idx_203501);\n        bool cond_f_res_203503 = slt64(x_203499, (int64_t) 0);\n        bool x_203504 = !cond_203502;\n        bool y_203505 = cond_f_res_203503 && x_203504;\n        bool cond_203506 = cond_203502 || y_203505;\n        float defunc_0_f_res_203507;\n        float defunc_0_f_res_203508;\n        \n        if (cond_203506) {\n            defunc_0_f_res_203507 = 0.0F;\n            defunc_0_f_res_203508 = 0.0F;\n        } else {\n            bool x_203509 = sle64((int64_t) 0, idx_203501);\n            bool y_203510 = slt64(idx_203501, n_196692);\n            bool bounds_check_203511 = x_203509 && y_203510;\n            bool index_certs_203512;\n            \n            if (!bounds_check_203511) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 36) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) idx_203501;\n                        global_failure_args[1] = (int64_",
                   "t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_f_res_203513;\n            \n            defunc_0_f_res_f_res_203513 = ((__global\n                                            float *) mem_222577)[gtid_203492 *\n                                                                 n_196692 +\n                                                                 idx_203501];\n            \n            float defunc_0_f_res_f_res_203514;\n            \n            defunc_0_f_res_f_res_203514 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_203492 *\n                                                                        ctx_param_ext_222546 +\n                                                                        idx_203501 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_203507 = defunc_0_f_res_f_res_203513;\n            defunc_0_f_res_203508 = defunc_0_f_res_f_res_203514;\n        }\n        ((__global float *) mem_222583)[gtid_203492 * (defunc_0_f_res_196740 *\n                                                       n_p_196694) +\n                                        gtid_203493 * defunc_0_f_res_196740 +\n                                        gtid_203494] = defunc_0_f_res_203507;\n        ((__global float *) mem_222588)[gtid_203492 * (defunc_0_f_res_196740 *\n                                                       n_p_196694) +\n                                        gtid_203493 * defunc_0_f_res_196740 +\n                                        gtid_203494] = defunc_0_f_res_203508;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203488\n}\n__kernel void mainzisegmap_203625(__global int *global_failure,\n                                  int64_t m_196691, i",
                   "nt64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_203621,\n                                  int64_t num_threads_225153, __global\n                                  unsigned char *mem_222597, __global\n                                  unsigned char *mem_222600, __global\n                                  unsigned char *mem_222604, __global\n                                  unsigned char *mem_222608, __global\n                                  unsigned char *mem_222612, __global\n                                  unsigned char *mem_222616, __global\n                                  unsigned char *mem_222665, __global\n                                  unsigned char *color_225033)\n{\n    #define segmap_group_sizze_203620 (mainzisegmap_group_sizze_203524)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225866;\n    int32_t local_tid_225867;\n    int64_t group_sizze_225870;\n    int32_t wave_sizze_225869;\n    int32_t group_tid_225868;\n    \n    global_tid_225866 = get_global_id(0);\n    local_tid_225867 = get_local_id(0);\n    group_sizze_225870 = get_local_size(0);\n    wave_sizze_225869 = LOCKSTEP_WIDTH;\n    group_tid_225868 = get_group_id(0);\n    \n    int32_t phys_tid_203625 = global_tid_225866;\n    int32_t phys_group_id_225871;\n    \n    phys_group_id_225871 = get_group_id(0);\n    for (int32_t i_225872 = 0; i_225872 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_203620)) -\n                   phys_group_id_225871, sext_i64_i32(num_groups_203621));\n         i_225872++) {\n        int32_t virt_group_id_225873 = phys_g",
                   "roup_id_225871 + i_225872 *\n                sext_i64_i32(num_groups_203621);\n        int64_t global_tid_225874 = sext_i32_i64(virt_group_id_225873) *\n                segmap_group_sizze_203620 + sext_i32_i64(local_tid_225867);\n        int64_t slice_225875 = m_196691;\n        int64_t gtid_203624 = global_tid_225874;\n        int64_t remnant_225876 = global_tid_225874 - gtid_203624;\n        \n        if (slt64(gtid_203624, m_196691)) {\n            for (int64_t i_222011 = 0; i_222011 < n_p_196694; i_222011++) {\n                int64_t x_203636;\n                \n                x_203636 = ((__global int64_t *) mem_222600)[i_222011 *\n                                                             m_196691 +\n                                                             gtid_203624];\n                for (int64_t i_222015 = 0; i_222015 < s_n_m_196745;\n                     i_222015++) {\n                    int64_t x_203641;\n                    \n                    x_203641 = ((__global int64_t *) mem_222608)[i_222011 *\n                                                                 (m_196691 *\n                                                                  s_n_m_196745) +\n                                                                 i_222015 *\n                                                                 m_196691 +\n                                                                 gtid_203624];\n                    \n                    float x_203642;\n                    \n                    x_203642 = ((__global float *) mem_222597)[i_222011 *\n                                                               (m_196691 *\n                                                                s_n_m_196745) +\n                                                               i_222015 *\n                                                               m_196691 +\n                                                               gtid_203624];\n                    \n                    bool cond_203643 =",
                   " i_222015 == (int64_t) 0;\n                    int64_t defunc_0_m_fun_res_203644;\n                    \n                    if (cond_203643) {\n                        defunc_0_m_fun_res_203644 = (int64_t) 0;\n                    } else {\n                        int64_t y_203645 = sub64(s_n_m_196745, (int64_t) 1);\n                        bool cond_203646 = i_222015 == y_203645;\n                        int64_t defunc_0_m_fun_res_f_res_203647;\n                        \n                        if (cond_203646) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_203648 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_203647 =\n                                defunc_0_m_fun_res_f_res_t_res_203648;\n                        } else {\n                            int64_t x_203649 = sub64(i_222015, (int64_t) 1);\n                            int64_t x_203650 = mul64(jump_s_196701, x_203649);\n                            int64_t min_arg_203651 = add64((int64_t) 1,\n                                                           x_203650);\n                            int64_t min_res_203652 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_203651);\n                            \n                            defunc_0_m_fun_res_f_res_203647 = min_res_203652;\n                        }\n                        defunc_0_m_fun_res_203644 =\n                            defunc_0_m_fun_res_f_res_203647;\n                    }\n                    \n                    float defunc_2_reduce_res_203653;\n                    float redout_221545 = 0.0F;\n                    \n                    for (int64_t i_221546 = 0; i_221546 < q_s_196695;\n                         i_221546++) {\n                        bool cond_203658 = sle64(x_203636, i_221546);\n                        int64_t defunc_0_f_res_203659;\n                    ",
                   "    \n                        if (cond_203658) {\n                            defunc_0_f_res_203659 = (int64_t) 0;\n                        } else {\n                            int64_t i_203660 = add64(x_203641, i_221546);\n                            int64_t defunc_0_add_arg_203661;\n                            \n                            defunc_0_add_arg_203661 = ((__global\n                                                        int64_t *) mem_222616)[i_222011 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                                                               i_203660 *\n                                                                               m_196691 +\n                                                                               gtid_203624];\n                            \n                            int64_t defunc_1_add_res_203662 = add64((int64_t) 1,\n                                                                    defunc_0_add_arg_203661);\n                            \n                            defunc_0_f_res_203659 = defunc_1_add_res_203662;\n                        }\n                        \n                        float defunc_0_f_res_203663;\n                        \n                        if (cond_203658) {\n                            defunc_0_f_res_203663 = 0.0F;\n                        } else {\n                            int64_t i_203664 = add64(x_203641, i_221546);\n                            float defunc_0_add_arg_203665;\n                            \n                            defunc_0_add_arg_203665 = ((__global\n                                                        float *) mem_222604)[i_222011 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_",
                   "res_196740) +\n                                                                             i_203664 *\n                                                                             m_196691 +\n                                                                             gtid_203624];\n                            defunc_0_f_res_203663 = defunc_0_add_arg_203665;\n                        }\n                        \n                        int64_t binop_p_203666 = sub64(defunc_0_f_res_203659,\n                                                       defunc_0_m_fun_res_203644);\n                        float defunc_0_f_res_203667 =\n                              sitofp_i64_f32(binop_p_203666);\n                        float abs_res_203668 =\n                              (float) fabs(defunc_0_f_res_203667);\n                        float tmp1_203669 = abs_res_203668 / x_203642;\n                        float x_203670 = tmp1_203669 * tmp1_203669;\n                        float y_203671 = tmp1_203669 * x_203670;\n                        float tmp2_203672 = 1.0F - y_203671;\n                        float x_203673 = tmp2_203672 * tmp2_203672;\n                        float tmp3_203674 = tmp2_203672 * x_203673;\n                        float w_j_203675 = defunc_0_f_res_203663 * tmp3_203674;\n                        float defunc_1_op_res_203656 = w_j_203675 +\n                              redout_221545;\n                        float redout_tmp_225879 = defunc_1_op_res_203656;\n                        \n                        redout_221545 = redout_tmp_225879;\n                    }\n                    defunc_2_reduce_res_203653 = redout_221545;\n                    \n                    float a0_203676 = 1.0F / defunc_2_reduce_res_203653;\n                    int64_t defunc_0_m_fun_res_203677;\n                    \n                    if (cond_203643) {\n                        defunc_0_m_fun_res_203677 = (int64_t) 0;\n                    } else {\n                        int64_t y_203678 = sub64(s_n_m_1967",
                   "45, (int64_t) 1);\n                        bool cond_203679 = i_222015 == y_203678;\n                        int64_t defunc_0_m_fun_res_f_res_203680;\n                        \n                        if (cond_203679) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_203681 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_203680 =\n                                defunc_0_m_fun_res_f_res_t_res_203681;\n                        } else {\n                            int64_t x_203682 = sub64(i_222015, (int64_t) 1);\n                            int64_t x_203683 = mul64(jump_s_196701, x_203682);\n                            int64_t min_arg_203684 = add64((int64_t) 1,\n                                                           x_203683);\n                            int64_t min_res_203685 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_203684);\n                            \n                            defunc_0_m_fun_res_f_res_203680 = min_res_203685;\n                        }\n                        defunc_0_m_fun_res_203677 =\n                            defunc_0_m_fun_res_f_res_203680;\n                    }\n                    \n                    float defunc_2_reduce_res_203686;\n                    float redout_221547 = 0.0F;\n                    \n                    for (int64_t i_221548 = 0; i_221548 < q_s_196695;\n                         i_221548++) {\n                        bool cond_203691 = sle64(x_203636, i_221548);\n                        int64_t defunc_0_f_res_203692;\n                        \n                        if (cond_203691) {\n                            defunc_0_f_res_203692 = (int64_t) 0;\n                        } else {\n                            int64_t i_203693 = add64(x_203641, i_221548);\n                            int64_t defunc_0_add_arg_203694;\n             ",
                   "               \n                            defunc_0_add_arg_203694 = ((__global\n                                                        int64_t *) mem_222616)[i_222011 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                                                               i_203693 *\n                                                                               m_196691 +\n                                                                               gtid_203624];\n                            \n                            int64_t defunc_1_add_res_203695 = add64((int64_t) 1,\n                                                                    defunc_0_add_arg_203694);\n                            \n                            defunc_0_f_res_203692 = defunc_1_add_res_203695;\n                        }\n                        \n                        float defunc_0_f_res_203696;\n                        \n                        if (cond_203691) {\n                            defunc_0_f_res_203696 = 0.0F;\n                        } else {\n                            int64_t i_203697 = add64(x_203641, i_221548);\n                            float defunc_0_add_arg_203698;\n                            \n                            defunc_0_add_arg_203698 = ((__global\n                                                        float *) mem_222604)[i_222011 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_203697 *\n                                                                             m_196691 +\n                                                                             gtid_203624];\n             ",
                   "               defunc_0_f_res_203696 = defunc_0_add_arg_203698;\n                        }\n                        \n                        int64_t binop_p_203699 = sub64(defunc_0_f_res_203692,\n                                                       defunc_0_m_fun_res_203677);\n                        float defunc_0_f_res_203700 =\n                              sitofp_i64_f32(binop_p_203699);\n                        float abs_res_203701 =\n                              (float) fabs(defunc_0_f_res_203700);\n                        float tmp1_203702 = abs_res_203701 / x_203642;\n                        float x_203703 = tmp1_203702 * tmp1_203702;\n                        float y_203704 = tmp1_203702 * x_203703;\n                        float tmp2_203705 = 1.0F - y_203704;\n                        float x_203706 = tmp2_203705 * tmp2_203705;\n                        float tmp3_203707 = tmp2_203705 * x_203706;\n                        float tmp4_203708 = defunc_0_f_res_203696 * tmp3_203707;\n                        float defunc_0_f_res_203709;\n                        \n                        if (cond_203691) {\n                            defunc_0_f_res_203709 = 0.0F;\n                        } else {\n                            int64_t i_203710 = add64(x_203641, i_221548);\n                            float defunc_0_add_arg_203711;\n                            \n                            defunc_0_add_arg_203711 = ((__global\n                                                        float *) mem_222612)[i_222011 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_203710 *\n                                                                             m_196691 +\n                                                                             gtid_203624];\n                          ",
                   "  defunc_0_f_res_203709 = defunc_0_add_arg_203711;\n                        }\n                        \n                        float x_203712 = a0_203676 * tmp4_203708;\n                        float defunc_9_fit_fun_res_203713 =\n                              defunc_0_f_res_203709 * x_203712;\n                        float defunc_1_op_res_203689 =\n                              defunc_9_fit_fun_res_203713 + redout_221547;\n                        float redout_tmp_225880 = defunc_1_op_res_203689;\n                        \n                        redout_221547 = redout_tmp_225880;\n                    }\n                    defunc_2_reduce_res_203686 = redout_221547;\n                    ((__global float *) color_225033)[phys_tid_203625 +\n                                                      (i_222011 *\n                                                       (num_threads_225153 *\n                                                        s_n_m_196745) +\n                                                       i_222015 *\n                                                       num_threads_225153)] =\n                        defunc_2_reduce_res_203686;\n                }\n            }\n            for (int64_t i_225881 = 0; i_225881 < n_p_196694; i_225881++) {\n                for (int64_t i_225882 = 0; i_225882 < s_n_m_196745;\n                     i_225882++) {\n                    float tmp_225883;\n                    \n                    tmp_225883 = ((__global\n                                   float *) color_225033)[phys_tid_203625 +\n                                                          (i_225881 *\n                                                           (num_threads_225153 *\n                                                            s_n_m_196745) +\n                                                           i_225882 *\n                                                           num_threads_225153)];\n                    ((__global float *) mem_222665)[gtid_203624 + (i_225881 *\n     ",
                   "                                                              (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_225882 *\n                                                                   m_196691)] =\n                        tmp_225883;\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_203620\n}\n__kernel void mainzisegmap_204765(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_204745,\n                                  int64_t num_threads_225155, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *mem_222669, __global\n                                  unsigned char *mem_222673, __global\n                                  unsigned char *mem_222677, __global\n                                  unsigned char *mem_222681, __global\n                                  unsigned char *mem_222685, __global\n                                  unsigned char *mem_222705, __global\n                                  unsigned char *color_225034)\n{\n    #define segmap_group_sizze_204744 (mainzisegmap_group_sizze_203719)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225884;\n    int32_t local_tid_225885;\n    int64_t group_sizze_225888;\n    int32_t wave_sizze_225887;\n    int32_t group_tid_225886;\n    \n   ",
                   " global_tid_225884 = get_global_id(0);\n    local_tid_225885 = get_local_id(0);\n    group_sizze_225888 = get_local_size(0);\n    wave_sizze_225887 = LOCKSTEP_WIDTH;\n    group_tid_225886 = get_group_id(0);\n    \n    int32_t phys_tid_204765 = global_tid_225884;\n    int32_t phys_group_id_225889;\n    \n    phys_group_id_225889 = get_group_id(0);\n    for (int32_t i_225890 = 0; i_225890 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_204744)) -\n                   phys_group_id_225889, sext_i64_i32(num_groups_204745));\n         i_225890++) {\n        int32_t virt_group_id_225891 = phys_group_id_225889 + i_225890 *\n                sext_i64_i32(num_groups_204745);\n        int64_t global_tid_225892 = sext_i32_i64(virt_group_id_225891) *\n                segmap_group_sizze_204744 + sext_i32_i64(local_tid_225885);\n        int64_t slice_225893 = n_p_196694;\n        int64_t slice_225894 = m_196691 * slice_225893;\n        int64_t gtid_204763 = squot64(global_tid_225892, slice_225893);\n        int64_t remnant_225895 = global_tid_225892 - gtid_204763 * slice_225893;\n        int64_t gtid_204764 = remnant_225895;\n        int64_t remnant_225896 = remnant_225895 - gtid_204764;\n        \n        if (slt64(gtid_204763, m_196691) && slt64(gtid_204764, n_p_196694)) {\n            int64_t x_204769;\n            \n            x_204769 = ((__global int64_t *) ext_mem_222321)[gtid_204763 *\n                                                             n_p_196694 +\n                                                             gtid_204764];\n            for (int64_t i_222019 = 0; i_222019 < s_n_m_196745; i_222019++) {\n                int64_t x_204774;\n                \n                x_204774 = ((__global int64_t *) mem_222669)[i_222019 *\n                                                             (n_p_196694 *\n                                                              m_196691) +\n                                               ",
                   "              gtid_204763 *\n                                                             n_p_196694 +\n                                                             gtid_204764];\n                \n                float x_204775;\n                \n                x_204775 = ((__global float *) mem_222673)[i_222019 *\n                                                           (n_p_196694 *\n                                                            m_196691) +\n                                                           gtid_204763 *\n                                                           n_p_196694 +\n                                                           gtid_204764];\n                \n                bool cond_204776 = i_222019 == (int64_t) 0;\n                int64_t defunc_0_m_fun_res_204777;\n                \n                if (cond_204776) {\n                    defunc_0_m_fun_res_204777 = (int64_t) 0;\n                } else {\n                    int64_t y_204778 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_204779 = i_222019 == y_204778;\n                    int64_t defunc_0_m_fun_res_f_res_204780;\n                    \n                    if (cond_204779) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_204781 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_204780 =\n                            defunc_0_m_fun_res_f_res_t_res_204781;\n                    } else {\n                        int64_t x_204782 = sub64(i_222019, (int64_t) 1);\n                        int64_t x_204783 = mul64(jump_s_196701, x_204782);\n                        int64_t min_arg_204784 = add64((int64_t) 1, x_204783);\n                        int64_t min_res_204785 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_204784);\n                        \n                        defunc_0_m_fun_res_f_res_204780 = min_res_204785;\n  ",
                   "                  }\n                    defunc_0_m_fun_res_204777 = defunc_0_m_fun_res_f_res_204780;\n                }\n                \n                float defunc_2_reduce_res_204786;\n                float redout_221553 = 0.0F;\n                \n                for (int64_t i_221554 = 0; i_221554 < q_s_196695; i_221554++) {\n                    bool cond_204791 = sle64(x_204769, i_221554);\n                    int64_t defunc_0_f_res_204792;\n                    \n                    if (cond_204791) {\n                        defunc_0_f_res_204792 = (int64_t) 0;\n                    } else {\n                        int64_t i_204793 = add64(x_204774, i_221554);\n                        int64_t defunc_0_add_arg_204794;\n                        \n                        defunc_0_add_arg_204794 = ((__global\n                                                    int64_t *) mem_222677)[i_204793 *\n                                                                           (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_204763 *\n                                                                           n_p_196694 +\n                                                                           gtid_204764];\n                        \n                        int64_t defunc_1_add_res_204795 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_204794);\n                        \n                        defunc_0_f_res_204792 = defunc_1_add_res_204795;\n                    }\n                    \n                    float defunc_0_f_res_204796;\n                    \n                    if (cond_204791) {\n                        defunc_0_f_res_204796 = 0.0F;\n                    } else {\n                        int64_t i_204797 = add64(x_204774, i_221554);\n                        float defunc_0_add_arg_204798;\n              ",
                   "          \n                        defunc_0_add_arg_204798 = ((__global\n                                                    float *) mem_222681)[i_204797 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_204763 *\n                                                                         n_p_196694 +\n                                                                         gtid_204764];\n                        defunc_0_f_res_204796 = defunc_0_add_arg_204798;\n                    }\n                    \n                    int64_t binop_p_204799 = sub64(defunc_0_f_res_204792,\n                                                   defunc_0_m_fun_res_204777);\n                    float defunc_0_f_res_204800 =\n                          sitofp_i64_f32(binop_p_204799);\n                    float abs_res_204801 = (float) fabs(defunc_0_f_res_204800);\n                    float tmp1_204802 = abs_res_204801 / x_204775;\n                    float x_204803 = tmp1_204802 * tmp1_204802;\n                    float y_204804 = tmp1_204802 * x_204803;\n                    float tmp2_204805 = 1.0F - y_204804;\n                    float x_204806 = tmp2_204805 * tmp2_204805;\n                    float tmp3_204807 = tmp2_204805 * x_204806;\n                    float w_j_204808 = defunc_0_f_res_204796 * tmp3_204807;\n                    float defunc_1_op_res_204789 = w_j_204808 + redout_221553;\n                    float redout_tmp_225898 = defunc_1_op_res_204789;\n                    \n                    redout_221553 = redout_tmp_225898;\n                }\n                defunc_2_reduce_res_204786 = redout_221553;\n                \n                float a0_204809 = 1.0F / defunc_2_reduce_res_204786;\n                int64_t defunc_0_m_fun_res_204810;\n                \n                if (cond_204776) {\n         ",
                   "           defunc_0_m_fun_res_204810 = (int64_t) 0;\n                } else {\n                    int64_t y_204811 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_204812 = i_222019 == y_204811;\n                    int64_t defunc_0_m_fun_res_f_res_204813;\n                    \n                    if (cond_204812) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_204814 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_204813 =\n                            defunc_0_m_fun_res_f_res_t_res_204814;\n                    } else {\n                        int64_t x_204815 = sub64(i_222019, (int64_t) 1);\n                        int64_t x_204816 = mul64(jump_s_196701, x_204815);\n                        int64_t min_arg_204817 = add64((int64_t) 1, x_204816);\n                        int64_t min_res_204818 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_204817);\n                        \n                        defunc_0_m_fun_res_f_res_204813 = min_res_204818;\n                    }\n                    defunc_0_m_fun_res_204810 = defunc_0_m_fun_res_f_res_204813;\n                }\n                \n                float defunc_2_reduce_res_204819;\n                float redout_221555 = 0.0F;\n                \n                for (int64_t i_221556 = 0; i_221556 < q_s_196695; i_221556++) {\n                    bool cond_204824 = sle64(x_204769, i_221556);\n                    int64_t defunc_0_f_res_204825;\n                    \n                    if (cond_204824) {\n                        defunc_0_f_res_204825 = (int64_t) 0;\n                    } else {\n                        int64_t i_204826 = add64(x_204774, i_221556);\n                        int64_t defunc_0_add_arg_204827;\n                        \n                        defunc_0_add_arg_204827 = ((__global\n                                                    int64_",
                   "t *) mem_222677)[i_204826 *\n                                                                           (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_204763 *\n                                                                           n_p_196694 +\n                                                                           gtid_204764];\n                        \n                        int64_t defunc_1_add_res_204828 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_204827);\n                        \n                        defunc_0_f_res_204825 = defunc_1_add_res_204828;\n                    }\n                    \n                    float defunc_0_f_res_204829;\n                    \n                    if (cond_204824) {\n                        defunc_0_f_res_204829 = 0.0F;\n                    } else {\n                        int64_t i_204830 = add64(x_204774, i_221556);\n                        float defunc_0_add_arg_204831;\n                        \n                        defunc_0_add_arg_204831 = ((__global\n                                                    float *) mem_222681)[i_204830 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_204763 *\n                                                                         n_p_196694 +\n                                                                         gtid_204764];\n                        defunc_0_f_res_204829 = defunc_0_add_arg_204831;\n                    }\n                    \n                    int64_t binop_p_204832 = sub64(defunc_0_f_res_204825,\n                                                   defunc_0_m_fun_res_204810);\n       ",
                   "             float defunc_0_f_res_204833 =\n                          sitofp_i64_f32(binop_p_204832);\n                    float abs_res_204834 = (float) fabs(defunc_0_f_res_204833);\n                    float tmp1_204835 = abs_res_204834 / x_204775;\n                    float x_204836 = tmp1_204835 * tmp1_204835;\n                    float y_204837 = tmp1_204835 * x_204836;\n                    float tmp2_204838 = 1.0F - y_204837;\n                    float x_204839 = tmp2_204838 * tmp2_204838;\n                    float tmp3_204840 = tmp2_204838 * x_204839;\n                    float tmp4_204841 = defunc_0_f_res_204829 * tmp3_204840;\n                    float defunc_0_f_res_204842;\n                    \n                    if (cond_204824) {\n                        defunc_0_f_res_204842 = 0.0F;\n                    } else {\n                        int64_t i_204843 = add64(x_204774, i_221556);\n                        float defunc_0_add_arg_204844;\n                        \n                        defunc_0_add_arg_204844 = ((__global\n                                                    float *) mem_222685)[i_204843 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_204763 *\n                                                                         n_p_196694 +\n                                                                         gtid_204764];\n                        defunc_0_f_res_204842 = defunc_0_add_arg_204844;\n                    }\n                    \n                    float x_204845 = a0_204809 * tmp4_204841;\n                    float defunc_9_fit_fun_res_204846 = defunc_0_f_res_204842 *\n                          x_204845;\n                    float defunc_1_op_res_204822 = defunc_9_fit_fun_res_204846 +\n                          redout_221555;\n                    float red",
                   "out_tmp_225899 = defunc_1_op_res_204822;\n                    \n                    redout_221555 = redout_tmp_225899;\n                }\n                defunc_2_reduce_res_204819 = redout_221555;\n                ((__global float *) color_225034)[phys_tid_204765 + i_222019 *\n                                                  num_threads_225155] =\n                    defunc_2_reduce_res_204819;\n            }\n            for (int64_t i_225900 = 0; i_225900 < s_n_m_196745; i_225900++) {\n                float tmp_225901;\n                \n                tmp_225901 = ((__global float *) color_225034)[phys_tid_204765 +\n                                                               i_225900 *\n                                                               num_threads_225155];\n                ((__global float *) mem_222705)[gtid_204763 * n_p_196694 +\n                                                gtid_204764 + i_225900 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_225901;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_204744\n}\n__kernel void mainzisegmap_204973(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *ext_mem_222322, __global\n                                  unsigned char *ext_mem_222419, __global\n                                  unsigned char *ext_mem_222420, __global\n                                  unsigned char *mem_222583, __global\n                                  unsign",
                   "ed char *mem_222588, __global\n                                  unsigned char *mem_222738)\n{\n    #define segmap_group_sizze_204962 (mainzisegmap_group_sizze_204054)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225958;\n    int32_t local_tid_225959;\n    int64_t group_sizze_225962;\n    int32_t wave_sizze_225961;\n    int32_t group_tid_225960;\n    \n    global_tid_225958 = get_global_id(0);\n    local_tid_225959 = get_local_id(0);\n    group_sizze_225962 = get_local_size(0);\n    wave_sizze_225961 = LOCKSTEP_WIDTH;\n    group_tid_225960 = get_group_id(0);\n    \n    int32_t phys_tid_204973 = global_tid_225958;\n    int64_t global_tid_225963 = sext_i32_i64(group_tid_225960) *\n            segmap_group_sizze_204962 + sext_i32_i64(local_tid_225959);\n    int64_t slice_225964 = s_n_m_196745;\n    int64_t slice_225965 = n_p_196694 * slice_225964;\n    int64_t slice_225966 = m_196691 * slice_225965;\n    int64_t gtid_204970 = squot64(global_tid_225963, slice_225965);\n    int64_t remnant_225967 = global_tid_225963 - gtid_204970 * slice_225965;\n    int64_t gtid_204971 = squot64(remnant_225967, slice_225964);\n    int64_t remnant_225968 = remnant_225967 - gtid_204971 * slice_225964;\n    int64_t gtid_204972 = remnant_225968;\n    int64_t remnant_225969 = remnant_225968 - gtid_204972;\n    \n    if ((slt64(gtid_204970, m_196691) && slt64(gtid_204971, n_p_196694)) &&\n        slt64(gtid_204972, s_n_m_196745)) {\n        int64_t x_204977;\n        \n        x_204977 = ((__global int64_t *) ext_mem_222321)[gtid_204970 *\n                                                         n_p_196694 +\n                                                         gtid_204971];\n        \n        int64_t x_204979;\n        \n        x_204979 = ((__global int64_t *) ext_mem_222420)[gtid_204970 *\n                                                         (s_n_m_196745 *\n                                    ",
                   "                      n_p_196694) +\n                                                         gtid_204971 *\n                                                         s_n_m_196745 +\n                                                         gtid_204972];\n        \n        float x_204980;\n        \n        x_204980 = ((__global float *) ext_mem_222419)[gtid_204970 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_204971 *\n                                                       s_n_m_196745 +\n                                                       gtid_204972];\n        \n        bool cond_204981 = gtid_204972 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_204982;\n        \n        if (cond_204981) {\n            defunc_0_m_fun_res_204982 = (int64_t) 0;\n        } else {\n            int64_t y_204983 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_204984 = gtid_204972 == y_204983;\n            int64_t defunc_0_m_fun_res_f_res_204985;\n            \n            if (cond_204984) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_204986 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_204985 =\n                    defunc_0_m_fun_res_f_res_t_res_204986;\n            } else {\n                int64_t x_204987 = sub64(gtid_204972, (int64_t) 1);\n                int64_t x_204988 = mul64(jump_s_196701, x_204987);\n                int64_t min_arg_204989 = add64((int64_t) 1, x_204988);\n                int64_t min_res_204990 = smin64(defunc_0_f_res_196740,\n                                                min_arg_204989);\n                \n                defunc_0_m_fun_res_f_res_204985 = min_res_204990;\n            }\n            defunc_0_m_fun_res_204982 = defunc_0_m_fun_res_f_res_204985;\n        }\n        \n        float defunc_2_reduce_res_204991;\n        flo",
                   "at redout_221569 = 0.0F;\n        \n        for (int64_t i_221570 = 0; i_221570 < q_s_196695; i_221570++) {\n            bool cond_204996 = sle64(x_204977, i_221570);\n            int64_t defunc_0_f_res_204997;\n            \n            if (cond_204996) {\n                defunc_0_f_res_204997 = (int64_t) 0;\n            } else {\n                int64_t i_204998 = add64(x_204979, i_221570);\n                int64_t defunc_0_add_arg_204999;\n                \n                defunc_0_add_arg_204999 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_204970 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_204971 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_204998];\n                \n                int64_t defunc_1_add_res_205000 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_204999);\n                \n                defunc_0_f_res_204997 = defunc_1_add_res_205000;\n            }\n            \n            float defunc_0_f_res_205001;\n            \n            if (cond_204996) {\n                defunc_0_f_res_205001 = 0.0F;\n            } else {\n                int64_t i_205002 = add64(x_204979, i_221570);\n                float defunc_0_add_arg_205003;\n                \n                defunc_0_add_arg_205003 = ((__global\n                                            float *) mem_222588)[gtid_204970 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_204971 *\n                             ",
                   "                                    defunc_0_f_res_196740 +\n                                                                 i_205002];\n                defunc_0_f_res_205001 = defunc_0_add_arg_205003;\n            }\n            \n            int64_t binop_p_205004 = sub64(defunc_0_f_res_204997,\n                                           defunc_0_m_fun_res_204982);\n            float defunc_0_f_res_205005 = sitofp_i64_f32(binop_p_205004);\n            float abs_res_205006 = (float) fabs(defunc_0_f_res_205005);\n            float tmp1_205007 = abs_res_205006 / x_204980;\n            float x_205008 = tmp1_205007 * tmp1_205007;\n            float y_205009 = tmp1_205007 * x_205008;\n            float tmp2_205010 = 1.0F - y_205009;\n            float x_205011 = tmp2_205010 * tmp2_205010;\n            float tmp3_205012 = tmp2_205010 * x_205011;\n            float w_j_205013 = defunc_0_f_res_205001 * tmp3_205012;\n            float defunc_1_op_res_204994 = w_j_205013 + redout_221569;\n            float redout_tmp_225970 = defunc_1_op_res_204994;\n            \n            redout_221569 = redout_tmp_225970;\n        }\n        defunc_2_reduce_res_204991 = redout_221569;\n        \n        float a0_205014 = 1.0F / defunc_2_reduce_res_204991;\n        int64_t defunc_0_m_fun_res_205015;\n        \n        if (cond_204981) {\n            defunc_0_m_fun_res_205015 = (int64_t) 0;\n        } else {\n            int64_t y_205016 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_205017 = gtid_204972 == y_205016;\n            int64_t defunc_0_m_fun_res_f_res_205018;\n            \n            if (cond_205017) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_205019 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_205018 =\n                    defunc_0_m_fun_res_f_res_t_res_205019;\n            } else {\n                int64_t x_205020 = sub64(gtid_204972, (int64_t) 1);\n                int64_t x_205021 = mul64(jump_s_196701, x",
                   "_205020);\n                int64_t min_arg_205022 = add64((int64_t) 1, x_205021);\n                int64_t min_res_205023 = smin64(defunc_0_f_res_196740,\n                                                min_arg_205022);\n                \n                defunc_0_m_fun_res_f_res_205018 = min_res_205023;\n            }\n            defunc_0_m_fun_res_205015 = defunc_0_m_fun_res_f_res_205018;\n        }\n        \n        float defunc_2_reduce_res_205024;\n        float redout_221571 = 0.0F;\n        \n        for (int64_t i_221572 = 0; i_221572 < q_s_196695; i_221572++) {\n            bool cond_205029 = sle64(x_204977, i_221572);\n            int64_t defunc_0_f_res_205030;\n            \n            if (cond_205029) {\n                defunc_0_f_res_205030 = (int64_t) 0;\n            } else {\n                int64_t i_205031 = add64(x_204979, i_221572);\n                int64_t defunc_0_add_arg_205032;\n                \n                defunc_0_add_arg_205032 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_204970 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_204971 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_205031];\n                \n                int64_t defunc_1_add_res_205033 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_205032);\n                \n                defunc_0_f_res_205030 = defunc_1_add_res_205033;\n            }\n            \n            float defunc_0_f_res_205034;\n            \n            if (cond_205029) {\n                defunc_0_f_res_205034 = 0.0F;\n            } else {\n                int64_t i_205035 = add64(x_204979, i_221572);\n               ",
                   " float defunc_0_add_arg_205036;\n                \n                defunc_0_add_arg_205036 = ((__global\n                                            float *) mem_222588)[gtid_204970 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_204971 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_205035];\n                defunc_0_f_res_205034 = defunc_0_add_arg_205036;\n            }\n            \n            int64_t binop_p_205037 = sub64(defunc_0_f_res_205030,\n                                           defunc_0_m_fun_res_205015);\n            float defunc_0_f_res_205038 = sitofp_i64_f32(binop_p_205037);\n            float abs_res_205039 = (float) fabs(defunc_0_f_res_205038);\n            float tmp1_205040 = abs_res_205039 / x_204980;\n            float x_205041 = tmp1_205040 * tmp1_205040;\n            float y_205042 = tmp1_205040 * x_205041;\n            float tmp2_205043 = 1.0F - y_205042;\n            float x_205044 = tmp2_205043 * tmp2_205043;\n            float tmp3_205045 = tmp2_205043 * x_205044;\n            float tmp4_205046 = defunc_0_f_res_205034 * tmp3_205045;\n            float defunc_0_f_res_205047;\n            \n            if (cond_205029) {\n                defunc_0_f_res_205047 = 0.0F;\n            } else {\n                int64_t i_205048 = add64(x_204979, i_221572);\n                float defunc_0_add_arg_205049;\n                \n                defunc_0_add_arg_205049 = ((__global\n                                            float *) mem_222583)[gtid_204970 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                    ",
                   "             gtid_204971 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_205048];\n                defunc_0_f_res_205047 = defunc_0_add_arg_205049;\n            }\n            \n            float x_205050 = a0_205014 * tmp4_205046;\n            float defunc_9_fit_fun_res_205051 = defunc_0_f_res_205047 *\n                  x_205050;\n            float defunc_1_op_res_205027 = defunc_9_fit_fun_res_205051 +\n                  redout_221571;\n            float redout_tmp_225971 = defunc_1_op_res_205027;\n            \n            redout_221571 = redout_tmp_225971;\n        }\n        defunc_2_reduce_res_205024 = redout_221571;\n        ((__global float *) mem_222738)[gtid_204970 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_204971 * s_n_m_196745 +\n                                        gtid_204972] =\n            defunc_2_reduce_res_205024;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_204962\n}\n__kernel void mainzisegmap_205062(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_222744, __global\n                                  unsigned char *mem_222748)\n{\n    #define segmap_group_sizze_205055 (mainzisegmap_group_sizze_204315)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225972;\n    int32_t local_tid_225973;\n    int64_t group_sizze_225976;\n    int32_t wave_sizze_225975;\n    int32_t group_tid_225974;\n ",
                   "   \n    global_tid_225972 = get_global_id(0);\n    local_tid_225973 = get_local_id(0);\n    group_sizze_225976 = get_local_size(0);\n    wave_sizze_225975 = LOCKSTEP_WIDTH;\n    group_tid_225974 = get_group_id(0);\n    \n    int32_t phys_tid_205062 = global_tid_225972;\n    int64_t global_tid_225977 = sext_i32_i64(group_tid_225974) *\n            segmap_group_sizze_205055 + sext_i32_i64(local_tid_225973);\n    int64_t slice_225978 = s_n_m_196745;\n    int64_t slice_225979 = n_p_196694 * slice_225978;\n    int64_t slice_225980 = m_196691 * slice_225979;\n    int64_t gtid_205059 = squot64(global_tid_225977, slice_225979);\n    int64_t remnant_225981 = global_tid_225977 - gtid_205059 * slice_225979;\n    int64_t gtid_205060 = squot64(remnant_225981, slice_225978);\n    int64_t remnant_225982 = remnant_225981 - gtid_205060 * slice_225978;\n    int64_t gtid_205061 = remnant_225982;\n    int64_t remnant_225983 = remnant_225982 - gtid_205061;\n    \n    if ((slt64(gtid_205059, m_196691) && slt64(gtid_205060, n_p_196694)) &&\n        slt64(gtid_205061, s_n_m_196745)) {\n        bool cond_205064 = gtid_205061 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_205065;\n        \n        if (cond_205064) {\n            defunc_0_m_fun_res_205065 = (int64_t) 0;\n        } else {\n            int64_t y_205066 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_205067 = gtid_205061 == y_205066;\n            int64_t defunc_0_m_fun_res_f_res_205068;\n            \n            if (cond_205067) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_205069 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_205068 =\n                    defunc_0_m_fun_res_f_res_t_res_205069;\n            } else {\n                int64_t x_205070 = sub64(gtid_205061, (int64_t) 1);\n                int64_t x_205071 = mul64(jump_s_196701, x_205070);\n                int64_t min_arg_205072 = add64((int64_t) 1, x_205071);\n                int64_t min_res_205073 ",
                   "= smin64(defunc_0_f_res_196740,\n                                                min_arg_205072);\n                \n                defunc_0_m_fun_res_f_res_205068 = min_res_205073;\n            }\n            defunc_0_m_fun_res_205065 = defunc_0_m_fun_res_f_res_205068;\n        }\n        ((__global int64_t *) mem_222744)[gtid_205059 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_205060 * s_n_m_196745 +\n                                          gtid_205061] =\n            defunc_0_m_fun_res_205065;\n        ((__global bool *) mem_222748)[gtid_205059 * (s_n_m_196745 *\n                                                      n_p_196694) +\n                                       gtid_205060 * s_n_m_196745 +\n                                       gtid_205061] = cond_205064;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_205055\n}\n__kernel void mainzisegmap_205134(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_222754, __global\n                                  unsigned char *mem_222760, __global\n                                  unsigned char *mem_222765)\n{\n    #define segmap_group_sizze_205127 (mainzisegmap_group_sizze_204229)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226060;\n    int32_t local_tid_226061;\n    int64_t group_sizze_226064;\n    int32_t wave_sizze_226063;\n    int32_t group_tid_226062;\n    \n    global_tid_226060 = get_global_id(0);\n    local_tid_226061 = get_local_id(0);\n    group_sizze_",
                   "226064 = get_local_size(0);\n    wave_sizze_226063 = LOCKSTEP_WIDTH;\n    group_tid_226062 = get_group_id(0);\n    \n    int32_t phys_tid_205134 = global_tid_226060;\n    int64_t global_tid_226065 = sext_i32_i64(group_tid_226062) *\n            segmap_group_sizze_205127 + sext_i32_i64(local_tid_226061);\n    int64_t slice_226066 = s_n_m_196745;\n    int64_t slice_226067 = n_p_196694 * slice_226066;\n    int64_t slice_226068 = m_196691 * slice_226067;\n    int64_t gtid_205131 = squot64(global_tid_226065, slice_226067);\n    int64_t remnant_226069 = global_tid_226065 - gtid_205131 * slice_226067;\n    int64_t gtid_205132 = squot64(remnant_226069, slice_226066);\n    int64_t remnant_226070 = remnant_226069 - gtid_205132 * slice_226066;\n    int64_t gtid_205133 = remnant_226070;\n    int64_t remnant_226071 = remnant_226070 - gtid_205133;\n    \n    if ((slt64(gtid_205131, m_196691) && slt64(gtid_205132, n_p_196694)) &&\n        slt64(gtid_205133, s_n_m_196745)) {\n        bool index_primexp_221810 = gtid_205133 == (int64_t) 0;\n        float defunc_2_reduce_res_205137;\n        \n        defunc_2_reduce_res_205137 = ((__global\n                                       float *) mem_222754)[gtid_205131 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_205132 *\n                                                            s_n_m_196745 +\n                                                            gtid_205133];\n        \n        float a0_205138 = 1.0F / defunc_2_reduce_res_205137;\n        int64_t defunc_0_m_fun_res_205139;\n        \n        if (index_primexp_221810) {\n            defunc_0_m_fun_res_205139 = (int64_t) 0;\n        } else {\n            int64_t y_205140 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_205141 = gtid_205133 == y_205140;\n            int64_t defunc_0_m_fun_res_f_res_205142;\n            \n            if (co",
                   "nd_205141) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_205143 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_205142 =\n                    defunc_0_m_fun_res_f_res_t_res_205143;\n            } else {\n                int64_t x_205144 = sub64(gtid_205133, (int64_t) 1);\n                int64_t x_205145 = mul64(jump_s_196701, x_205144);\n                int64_t min_arg_205146 = add64((int64_t) 1, x_205145);\n                int64_t min_res_205147 = smin64(defunc_0_f_res_196740,\n                                                min_arg_205146);\n                \n                defunc_0_m_fun_res_f_res_205142 = min_res_205147;\n            }\n            defunc_0_m_fun_res_205139 = defunc_0_m_fun_res_f_res_205142;\n        }\n        ((__global float *) mem_222760)[gtid_205131 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_205132 * s_n_m_196745 +\n                                        gtid_205133] = a0_205138;\n        ((__global int64_t *) mem_222765)[gtid_205131 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_205132 * s_n_m_196745 +\n                                          gtid_205133] =\n            defunc_0_m_fun_res_205139;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_205127\n}\n__kernel void mainzisegmap_205348(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_205343,\n                                  int64_t num_threads_225163, __global\n     ",
                   "                             unsigned char *mem_222791, __global\n                                  unsigned char *mem_222794, __global\n                                  unsigned char *mem_222798, __global\n                                  unsigned char *mem_222802, __global\n                                  unsigned char *mem_222806, __global\n                                  unsigned char *mem_222810, __global\n                                  unsigned char *mem_222903, __global\n                                  unsigned char *mem_222907, __global\n                                  unsigned char *color_225039, __global\n                                  unsigned char *color_225040)\n{\n    #define segmap_group_sizze_205342 (mainzisegmap_group_sizze_205216)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226156;\n    int32_t local_tid_226157;\n    int64_t group_sizze_226160;\n    int32_t wave_sizze_226159;\n    int32_t group_tid_226158;\n    \n    global_tid_226156 = get_global_id(0);\n    local_tid_226157 = get_local_id(0);\n    group_sizze_226160 = get_local_size(0);\n    wave_sizze_226159 = LOCKSTEP_WIDTH;\n    group_tid_226158 = get_group_id(0);\n    \n    int32_t phys_tid_205348 = global_tid_226156;\n    int32_t phys_group_id_226161;\n    \n    phys_group_id_226161 = get_group_id(0);\n    for (int32_t i_226162 = 0; i_226162 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_205342)) -\n                   phys_group_id_226161, sext_i64_i32(num_groups_205343));\n         i_226162++) {\n        int32_t virt_group_id_226163 = phys_group_id_226161 + i_226162 *\n                sext_i64_i32(num_groups_205343);\n        int64_t global_tid_226164 = sext_i32_i64(virt_group_id_226163) *\n                segmap_group_sizze_205342 + sext_i32_i64(local_tid_226157);\n        int64_t slice_226165 = m_196691;\n       ",
                   " int64_t gtid_205347 = global_tid_226164;\n        int64_t remnant_226166 = global_tid_226164 - gtid_205347;\n        \n        if (slt64(gtid_205347, m_196691)) {\n            for (int64_t i_222025 = 0; i_222025 < n_p_196694; i_222025++) {\n                int64_t x_205360;\n                \n                x_205360 = ((__global int64_t *) mem_222794)[i_222025 *\n                                                             m_196691 +\n                                                             gtid_205347];\n                for (int64_t i_222032 = 0; i_222032 < s_n_m_196745;\n                     i_222032++) {\n                    int64_t x_205366;\n                    \n                    x_205366 = ((__global int64_t *) mem_222802)[i_222025 *\n                                                                 (m_196691 *\n                                                                  s_n_m_196745) +\n                                                                 i_222032 *\n                                                                 m_196691 +\n                                                                 gtid_205347];\n                    \n                    float x_205367;\n                    \n                    x_205367 = ((__global float *) mem_222791)[i_222025 *\n                                                               (m_196691 *\n                                                                s_n_m_196745) +\n                                                               i_222032 *\n                                                               m_196691 +\n                                                               gtid_205347];\n                    \n                    bool cond_205368 = i_222032 == (int64_t) 0;\n                    int64_t defunc_0_m_fun_res_205369;\n                    \n                    if (cond_205368) {\n                        defunc_0_m_fun_res_205369 = (int64_t) 0;\n                    } else {\n                        int64_t y_20537",
                   "0 = sub64(s_n_m_196745, (int64_t) 1);\n                        bool cond_205371 = i_222032 == y_205370;\n                        int64_t defunc_0_m_fun_res_f_res_205372;\n                        \n                        if (cond_205371) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_205373 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_205372 =\n                                defunc_0_m_fun_res_f_res_t_res_205373;\n                        } else {\n                            int64_t x_205374 = sub64(i_222032, (int64_t) 1);\n                            int64_t x_205375 = mul64(jump_s_196701, x_205374);\n                            int64_t min_arg_205376 = add64((int64_t) 1,\n                                                           x_205375);\n                            int64_t min_res_205377 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_205376);\n                            \n                            defunc_0_m_fun_res_f_res_205372 = min_res_205377;\n                        }\n                        defunc_0_m_fun_res_205369 =\n                            defunc_0_m_fun_res_f_res_205372;\n                    }\n                    \n                    float defunc_2_reduce_res_205378;\n                    float defunc_2_reduce_res_205379;\n                    float defunc_2_reduce_res_205380;\n                    float redout_221587;\n                    float redout_221588;\n                    float redout_221589;\n                    \n                    redout_221587 = 0.0F;\n                    redout_221588 = 0.0F;\n                    redout_221589 = 0.0F;\n                    for (int64_t i_221590 = 0; i_221590 < q_s_196695;\n                         i_221590++) {\n                        bool cond_205391 = sle64(x_205360, i_221590);\n                        int64_t defunc_0",
                   "_f_res_205392;\n                        \n                        if (cond_205391) {\n                            defunc_0_f_res_205392 = (int64_t) 0;\n                        } else {\n                            int64_t i_205393 = add64(x_205366, i_221590);\n                            int64_t defunc_0_add_arg_205394;\n                            \n                            defunc_0_add_arg_205394 = ((__global\n                                                        int64_t *) mem_222810)[i_222025 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                                                               i_205393 *\n                                                                               m_196691 +\n                                                                               gtid_205347];\n                            \n                            int64_t defunc_1_add_res_205395 = add64((int64_t) 1,\n                                                                    defunc_0_add_arg_205394);\n                            \n                            defunc_0_f_res_205392 = defunc_1_add_res_205395;\n                        }\n                        \n                        float defunc_0_f_res_205396;\n                        \n                        if (cond_205391) {\n                            defunc_0_f_res_205396 = 0.0F;\n                        } else {\n                            int64_t i_205397 = add64(x_205366, i_221590);\n                            float defunc_0_add_arg_205398;\n                            \n                            defunc_0_add_arg_205398 = ((__global\n                                                        float *) mem_222798)[i_222025 *\n                                                                             (m_196691 *\n                                                      ",
                   "                        defunc_0_f_res_196740) +\n                                                                             i_205397 *\n                                                                             m_196691 +\n                                                                             gtid_205347];\n                            defunc_0_f_res_205396 = defunc_0_add_arg_205398;\n                        }\n                        \n                        int64_t binop_p_205399 = sub64(defunc_0_f_res_205392,\n                                                       defunc_0_m_fun_res_205369);\n                        float defunc_0_f_res_205400 =\n                              sitofp_i64_f32(binop_p_205399);\n                        float abs_res_205401 =\n                              (float) fabs(defunc_0_f_res_205400);\n                        float tmp1_205402 = abs_res_205401 / x_205367;\n                        float x_205403 = tmp1_205402 * tmp1_205402;\n                        float y_205404 = tmp1_205402 * x_205403;\n                        float tmp2_205405 = 1.0F - y_205404;\n                        float x_205406 = tmp2_205405 * tmp2_205405;\n                        float tmp3_205407 = tmp2_205405 * x_205406;\n                        float w_j_205408 = defunc_0_f_res_205396 * tmp3_205407;\n                        float xw_j_205409 = defunc_0_f_res_205400 * w_j_205408;\n                        float x2w_j_205410 = defunc_0_f_res_205400 *\n                              xw_j_205409;\n                        float defunc_1_op_res_205383 = w_j_205408 +\n                              redout_221587;\n                        float defunc_1_op_res_205386 = xw_j_205409 +\n                              redout_221588;\n                        float defunc_1_op_res_205389 = x2w_j_205410 +\n                              redout_221589;\n                        float redout_tmp_226171 = defunc_1_op_res_205383;\n                        float redout_tmp_226172 = defunc_1_op_res_205386;\n  ",
                   "                      float redout_tmp_226173 = defunc_1_op_res_205389;\n                        \n                        redout_221587 = redout_tmp_226171;\n                        redout_221588 = redout_tmp_226172;\n                        redout_221589 = redout_tmp_226173;\n                    }\n                    defunc_2_reduce_res_205378 = redout_221587;\n                    defunc_2_reduce_res_205379 = redout_221588;\n                    defunc_2_reduce_res_205380 = redout_221589;\n                    \n                    float x_205411 = defunc_2_reduce_res_205378 *\n                          defunc_2_reduce_res_205380;\n                    float y_205412 = defunc_2_reduce_res_205379 *\n                          defunc_2_reduce_res_205379;\n                    float y_205413 = x_205411 - y_205412;\n                    float det1_205414 = 1.0F / y_205413;\n                    float a11_205415 = defunc_2_reduce_res_205380 * det1_205414;\n                    float x_205416 = 0.0F - defunc_2_reduce_res_205379;\n                    float b11_205417 = det1_205414 * x_205416;\n                    float c11_205418 = defunc_2_reduce_res_205378 * det1_205414;\n                    int64_t defunc_0_m_fun_res_205419;\n                    \n                    if (cond_205368) {\n                        defunc_0_m_fun_res_205419 = (int64_t) 0;\n                    } else {\n                        int64_t y_205420 = sub64(s_n_m_196745, (int64_t) 1);\n                        bool cond_205421 = i_222032 == y_205420;\n                        int64_t defunc_0_m_fun_res_f_res_205422;\n                        \n                        if (cond_205421) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_205423 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_205422 =\n                                defunc_0_m_fun_res_f_res_t_res_205423;\n                        } else {\n        ",
                   "                    int64_t x_205424 = sub64(i_222032, (int64_t) 1);\n                            int64_t x_205425 = mul64(jump_s_196701, x_205424);\n                            int64_t min_arg_205426 = add64((int64_t) 1,\n                                                           x_205425);\n                            int64_t min_res_205427 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_205426);\n                            \n                            defunc_0_m_fun_res_f_res_205422 = min_res_205427;\n                        }\n                        defunc_0_m_fun_res_205419 =\n                            defunc_0_m_fun_res_f_res_205422;\n                    }\n                    \n                    float defunc_2_reduce_res_205428;\n                    float defunc_2_reduce_res_205429;\n                    float redout_221591;\n                    float redout_221592;\n                    \n                    redout_221591 = 0.0F;\n                    redout_221592 = 0.0F;\n                    for (int64_t i_221593 = 0; i_221593 < q_s_196695;\n                         i_221593++) {\n                        bool cond_205437 = sle64(x_205360, i_221593);\n                        int64_t defunc_0_f_res_205438;\n                        \n                        if (cond_205437) {\n                            defunc_0_f_res_205438 = (int64_t) 0;\n                        } else {\n                            int64_t i_205439 = add64(x_205366, i_221593);\n                            int64_t defunc_0_add_arg_205440;\n                            \n                            defunc_0_add_arg_205440 = ((__global\n                                                        int64_t *) mem_222810)[i_222025 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                ",
                   "                                               i_205439 *\n                                                                               m_196691 +\n                                                                               gtid_205347];\n                            \n                            int64_t defunc_1_add_res_205441 = add64((int64_t) 1,\n                                                                    defunc_0_add_arg_205440);\n                            \n                            defunc_0_f_res_205438 = defunc_1_add_res_205441;\n                        }\n                        \n                        float defunc_0_f_res_205442;\n                        \n                        if (cond_205437) {\n                            defunc_0_f_res_205442 = 0.0F;\n                        } else {\n                            int64_t i_205443 = add64(x_205366, i_221593);\n                            float defunc_0_add_arg_205444;\n                            \n                            defunc_0_add_arg_205444 = ((__global\n                                                        float *) mem_222798)[i_222025 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_205443 *\n                                                                             m_196691 +\n                                                                             gtid_205347];\n                            defunc_0_f_res_205442 = defunc_0_add_arg_205444;\n                        }\n                        \n                        int64_t binop_p_205445 = sub64(defunc_0_f_res_205438,\n                                                       defunc_0_m_fun_res_205419);\n                        float defunc_0_f_res_205446 =\n                              sitofp_i64_f32(binop_p_205445);\n       ",
                   "                 float abs_res_205447 =\n                              (float) fabs(defunc_0_f_res_205446);\n                        float tmp1_205448 = abs_res_205447 / x_205367;\n                        float x_205449 = tmp1_205448 * tmp1_205448;\n                        float y_205450 = tmp1_205448 * x_205449;\n                        float tmp2_205451 = 1.0F - y_205450;\n                        float x_205452 = tmp2_205451 * tmp2_205451;\n                        float tmp3_205453 = tmp2_205451 * x_205452;\n                        float tmp4_205454 = defunc_0_f_res_205442 * tmp3_205453;\n                        float defunc_1_f_res_205455 = defunc_0_f_res_205446 *\n                              tmp4_205454;\n                        float defunc_0_f_res_205456;\n                        \n                        if (cond_205437) {\n                            defunc_0_f_res_205456 = 0.0F;\n                        } else {\n                            int64_t i_205457 = add64(x_205366, i_221593);\n                            float defunc_0_add_arg_205458;\n                            \n                            defunc_0_add_arg_205458 = ((__global\n                                                        float *) mem_222806)[i_222025 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_205457 *\n                                                                             m_196691 +\n                                                                             gtid_205347];\n                            defunc_0_f_res_205456 = defunc_0_add_arg_205458;\n                        }\n                        \n                        float x_205459 = a11_205415 * tmp4_205454;\n                        float y_205460 = b11_205417 * defunc_1_f_res_205455;\n                        float x_",
                   "205461 = x_205459 + y_205460;\n                        float defunc_9_fit_fun_res_205462 =\n                              defunc_0_f_res_205456 * x_205461;\n                        float x_205463 = b11_205417 * tmp4_205454;\n                        float y_205464 = c11_205418 * defunc_1_f_res_205455;\n                        float x_205465 = x_205463 + y_205464;\n                        float defunc_9_slope_fun_res_205466 =\n                              defunc_0_f_res_205456 * x_205465;\n                        float defunc_1_op_res_205432 =\n                              defunc_9_fit_fun_res_205462 + redout_221591;\n                        float defunc_1_op_res_205435 =\n                              defunc_9_slope_fun_res_205466 + redout_221592;\n                        float redout_tmp_226174 = defunc_1_op_res_205432;\n                        float redout_tmp_226175 = defunc_1_op_res_205435;\n                        \n                        redout_221591 = redout_tmp_226174;\n                        redout_221592 = redout_tmp_226175;\n                    }\n                    defunc_2_reduce_res_205428 = redout_221591;\n                    defunc_2_reduce_res_205429 = redout_221592;\n                    ((__global float *) color_225040)[phys_tid_205348 +\n                                                      (i_222025 *\n                                                       (num_threads_225163 *\n                                                        s_n_m_196745) +\n                                                       i_222032 *\n                                                       num_threads_225163)] =\n                        defunc_2_reduce_res_205428;\n                    ((__global float *) color_225039)[phys_tid_205348 +\n                                                      (i_222025 *\n                                                       (num_threads_225163 *\n                                                        s_n_m_196745) +\n                                         ",
                   "              i_222032 *\n                                                       num_threads_225163)] =\n                        defunc_2_reduce_res_205429;\n                }\n            }\n            for (int64_t i_226176 = 0; i_226176 < n_p_196694; i_226176++) {\n                for (int64_t i_226177 = 0; i_226177 < s_n_m_196745;\n                     i_226177++) {\n                    float tmp_226178;\n                    \n                    tmp_226178 = ((__global\n                                   float *) color_225040)[phys_tid_205348 +\n                                                          (i_226176 *\n                                                           (num_threads_225163 *\n                                                            s_n_m_196745) +\n                                                           i_226177 *\n                                                           num_threads_225163)];\n                    ((__global float *) mem_222903)[gtid_205347 + (i_226176 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226177 *\n                                                                   m_196691)] =\n                        tmp_226178;\n                }\n            }\n            for (int64_t i_226179 = 0; i_226179 < n_p_196694; i_226179++) {\n                for (int64_t i_226180 = 0; i_226180 < s_n_m_196745;\n                     i_226180++) {\n                    float tmp_226181;\n                    \n                    tmp_226181 = ((__global\n                                   float *) color_225039)[phys_tid_205348 +\n                                                          (i_226179 *\n                                                           (num_threads_225163 *\n                                                            s_n_m_196745) +\n                         ",
                   "                                  i_226180 *\n                                                           num_threads_225163)];\n                    ((__global float *) mem_222907)[gtid_205347 + (i_226179 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226180 *\n                                                                   m_196691)] =\n                        tmp_226181;\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_205342\n}\n__kernel void mainzisegmap_206802(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_206780,\n                                  int64_t num_threads_225166, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *mem_222911, __global\n                                  unsigned char *mem_222915, __global\n                                  unsigned char *mem_222919, __global\n                                  unsigned char *mem_222923, __global\n                                  unsigned char *mem_222927, __global\n                                  unsigned char *mem_222962, __global\n                                  unsigned char *mem_222966, __global\n                                  unsigned char *color_225041, __global\n                                  unsigned char *color_225042)\n{\n    #define segmap_group_sizze_206",
                   "779 (mainzisegmap_group_sizze_205472)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226182;\n    int32_t local_tid_226183;\n    int64_t group_sizze_226186;\n    int32_t wave_sizze_226185;\n    int32_t group_tid_226184;\n    \n    global_tid_226182 = get_global_id(0);\n    local_tid_226183 = get_local_id(0);\n    group_sizze_226186 = get_local_size(0);\n    wave_sizze_226185 = LOCKSTEP_WIDTH;\n    group_tid_226184 = get_group_id(0);\n    \n    int32_t phys_tid_206802 = global_tid_226182;\n    int32_t phys_group_id_226187;\n    \n    phys_group_id_226187 = get_group_id(0);\n    for (int32_t i_226188 = 0; i_226188 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_206779)) -\n                   phys_group_id_226187, sext_i64_i32(num_groups_206780));\n         i_226188++) {\n        int32_t virt_group_id_226189 = phys_group_id_226187 + i_226188 *\n                sext_i64_i32(num_groups_206780);\n        int64_t global_tid_226190 = sext_i32_i64(virt_group_id_226189) *\n                segmap_group_sizze_206779 + sext_i32_i64(local_tid_226183);\n        int64_t slice_226191 = n_p_196694;\n        int64_t slice_226192 = m_196691 * slice_226191;\n        int64_t gtid_206800 = squot64(global_tid_226190, slice_226191);\n        int64_t remnant_226193 = global_tid_226190 - gtid_206800 * slice_226191;\n        int64_t gtid_206801 = remnant_226193;\n        int64_t remnant_226194 = remnant_226193 - gtid_206801;\n        \n        if (slt64(gtid_206800, m_196691) && slt64(gtid_206801, n_p_196694)) {\n            int64_t x_206806;\n            \n            x_206806 = ((__global int64_t *) ext_mem_222321)[gtid_206800 *\n                                                             n_p_196694 +\n                                                             gtid_206801];\n            for (int64_t i_222039 = 0; i_22203",
                   "9 < s_n_m_196745; i_222039++) {\n                int64_t x_206812;\n                \n                x_206812 = ((__global int64_t *) mem_222911)[i_222039 *\n                                                             (n_p_196694 *\n                                                              m_196691) +\n                                                             gtid_206800 *\n                                                             n_p_196694 +\n                                                             gtid_206801];\n                \n                float x_206813;\n                \n                x_206813 = ((__global float *) mem_222915)[i_222039 *\n                                                           (n_p_196694 *\n                                                            m_196691) +\n                                                           gtid_206800 *\n                                                           n_p_196694 +\n                                                           gtid_206801];\n                \n                bool cond_206814 = i_222039 == (int64_t) 0;\n                int64_t defunc_0_m_fun_res_206815;\n                \n                if (cond_206814) {\n                    defunc_0_m_fun_res_206815 = (int64_t) 0;\n                } else {\n                    int64_t y_206816 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_206817 = i_222039 == y_206816;\n                    int64_t defunc_0_m_fun_res_f_res_206818;\n                    \n                    if (cond_206817) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_206819 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_206818 =\n                            defunc_0_m_fun_res_f_res_t_res_206819;\n                    } else {\n                        int64_t x_206820 = sub64(i_222039, (int64_t) 1);\n                        int64_t x_206821 = mul64(jump_s_",
                   "196701, x_206820);\n                        int64_t min_arg_206822 = add64((int64_t) 1, x_206821);\n                        int64_t min_res_206823 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_206822);\n                        \n                        defunc_0_m_fun_res_f_res_206818 = min_res_206823;\n                    }\n                    defunc_0_m_fun_res_206815 = defunc_0_m_fun_res_f_res_206818;\n                }\n                \n                float defunc_2_reduce_res_206824;\n                float defunc_2_reduce_res_206825;\n                float defunc_2_reduce_res_206826;\n                float redout_221598;\n                float redout_221599;\n                float redout_221600;\n                \n                redout_221598 = 0.0F;\n                redout_221599 = 0.0F;\n                redout_221600 = 0.0F;\n                for (int64_t i_221601 = 0; i_221601 < q_s_196695; i_221601++) {\n                    bool cond_206837 = sle64(x_206806, i_221601);\n                    int64_t defunc_0_f_res_206838;\n                    \n                    if (cond_206837) {\n                        defunc_0_f_res_206838 = (int64_t) 0;\n                    } else {\n                        int64_t i_206839 = add64(x_206812, i_221601);\n                        int64_t defunc_0_add_arg_206840;\n                        \n                        defunc_0_add_arg_206840 = ((__global\n                                                    int64_t *) mem_222919)[i_206839 *\n                                                                           (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_206800 *\n                                                                           n_p_196694 +\n                                                                           gtid_206801];\n                        \n       ",
                   "                 int64_t defunc_1_add_res_206841 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_206840);\n                        \n                        defunc_0_f_res_206838 = defunc_1_add_res_206841;\n                    }\n                    \n                    float defunc_0_f_res_206842;\n                    \n                    if (cond_206837) {\n                        defunc_0_f_res_206842 = 0.0F;\n                    } else {\n                        int64_t i_206843 = add64(x_206812, i_221601);\n                        float defunc_0_add_arg_206844;\n                        \n                        defunc_0_add_arg_206844 = ((__global\n                                                    float *) mem_222923)[i_206843 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_206800 *\n                                                                         n_p_196694 +\n                                                                         gtid_206801];\n                        defunc_0_f_res_206842 = defunc_0_add_arg_206844;\n                    }\n                    \n                    int64_t binop_p_206845 = sub64(defunc_0_f_res_206838,\n                                                   defunc_0_m_fun_res_206815);\n                    float defunc_0_f_res_206846 =\n                          sitofp_i64_f32(binop_p_206845);\n                    float abs_res_206847 = (float) fabs(defunc_0_f_res_206846);\n                    float tmp1_206848 = abs_res_206847 / x_206813;\n                    float x_206849 = tmp1_206848 * tmp1_206848;\n                    float y_206850 = tmp1_206848 * x_206849;\n                    float tmp2_206851 = 1.0F - y_206850;\n                    float x_206852 = tmp2_206851 * tmp2_206851;\n         ",
                   "           float tmp3_206853 = tmp2_206851 * x_206852;\n                    float w_j_206854 = defunc_0_f_res_206842 * tmp3_206853;\n                    float xw_j_206855 = defunc_0_f_res_206846 * w_j_206854;\n                    float x2w_j_206856 = defunc_0_f_res_206846 * xw_j_206855;\n                    float defunc_1_op_res_206829 = w_j_206854 + redout_221598;\n                    float defunc_1_op_res_206832 = xw_j_206855 + redout_221599;\n                    float defunc_1_op_res_206835 = x2w_j_206856 + redout_221600;\n                    float redout_tmp_226197 = defunc_1_op_res_206829;\n                    float redout_tmp_226198 = defunc_1_op_res_206832;\n                    float redout_tmp_226199 = defunc_1_op_res_206835;\n                    \n                    redout_221598 = redout_tmp_226197;\n                    redout_221599 = redout_tmp_226198;\n                    redout_221600 = redout_tmp_226199;\n                }\n                defunc_2_reduce_res_206824 = redout_221598;\n                defunc_2_reduce_res_206825 = redout_221599;\n                defunc_2_reduce_res_206826 = redout_221600;\n                \n                float x_206857 = defunc_2_reduce_res_206824 *\n                      defunc_2_reduce_res_206826;\n                float y_206858 = defunc_2_reduce_res_206825 *\n                      defunc_2_reduce_res_206825;\n                float y_206859 = x_206857 - y_206858;\n                float det1_206860 = 1.0F / y_206859;\n                float a11_206861 = defunc_2_reduce_res_206826 * det1_206860;\n                float x_206862 = 0.0F - defunc_2_reduce_res_206825;\n                float b11_206863 = det1_206860 * x_206862;\n                float c11_206864 = defunc_2_reduce_res_206824 * det1_206860;\n                int64_t defunc_0_m_fun_res_206865;\n                \n                if (cond_206814) {\n                    defunc_0_m_fun_res_206865 = (int64_t) 0;\n                } else {\n                    int64_t y_206866 = sub64(s_n_m_196745, (int",
                   "64_t) 1);\n                    bool cond_206867 = i_222039 == y_206866;\n                    int64_t defunc_0_m_fun_res_f_res_206868;\n                    \n                    if (cond_206867) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_206869 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_206868 =\n                            defunc_0_m_fun_res_f_res_t_res_206869;\n                    } else {\n                        int64_t x_206870 = sub64(i_222039, (int64_t) 1);\n                        int64_t x_206871 = mul64(jump_s_196701, x_206870);\n                        int64_t min_arg_206872 = add64((int64_t) 1, x_206871);\n                        int64_t min_res_206873 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_206872);\n                        \n                        defunc_0_m_fun_res_f_res_206868 = min_res_206873;\n                    }\n                    defunc_0_m_fun_res_206865 = defunc_0_m_fun_res_f_res_206868;\n                }\n                \n                float defunc_2_reduce_res_206874;\n                float defunc_2_reduce_res_206875;\n                float redout_221602;\n                float redout_221603;\n                \n                redout_221602 = 0.0F;\n                redout_221603 = 0.0F;\n                for (int64_t i_221604 = 0; i_221604 < q_s_196695; i_221604++) {\n                    bool cond_206883 = sle64(x_206806, i_221604);\n                    int64_t defunc_0_f_res_206884;\n                    \n                    if (cond_206883) {\n                        defunc_0_f_res_206884 = (int64_t) 0;\n                    } else {\n                        int64_t i_206885 = add64(x_206812, i_221604);\n                        int64_t defunc_0_add_arg_206886;\n                        \n                        defunc_0_add_arg_206886 = ((__global\n                                          ",
                   "          int64_t *) mem_222919)[i_206885 *\n                                                                           (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_206800 *\n                                                                           n_p_196694 +\n                                                                           gtid_206801];\n                        \n                        int64_t defunc_1_add_res_206887 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_206886);\n                        \n                        defunc_0_f_res_206884 = defunc_1_add_res_206887;\n                    }\n                    \n                    float defunc_0_f_res_206888;\n                    \n                    if (cond_206883) {\n                        defunc_0_f_res_206888 = 0.0F;\n                    } else {\n                        int64_t i_206889 = add64(x_206812, i_221604);\n                        float defunc_0_add_arg_206890;\n                        \n                        defunc_0_add_arg_206890 = ((__global\n                                                    float *) mem_222923)[i_206889 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_206800 *\n                                                                         n_p_196694 +\n                                                                         gtid_206801];\n                        defunc_0_f_res_206888 = defunc_0_add_arg_206890;\n                    }\n                    \n                    int64_t binop_p_206891 = sub64(defunc_0_f_res_206884,\n                                                   defunc_0_m_fun_res_",
                   "206865);\n                    float defunc_0_f_res_206892 =\n                          sitofp_i64_f32(binop_p_206891);\n                    float abs_res_206893 = (float) fabs(defunc_0_f_res_206892);\n                    float tmp1_206894 = abs_res_206893 / x_206813;\n                    float x_206895 = tmp1_206894 * tmp1_206894;\n                    float y_206896 = tmp1_206894 * x_206895;\n                    float tmp2_206897 = 1.0F - y_206896;\n                    float x_206898 = tmp2_206897 * tmp2_206897;\n                    float tmp3_206899 = tmp2_206897 * x_206898;\n                    float tmp4_206900 = defunc_0_f_res_206888 * tmp3_206899;\n                    float defunc_1_f_res_206901 = defunc_0_f_res_206892 *\n                          tmp4_206900;\n                    float defunc_0_f_res_206902;\n                    \n                    if (cond_206883) {\n                        defunc_0_f_res_206902 = 0.0F;\n                    } else {\n                        int64_t i_206903 = add64(x_206812, i_221604);\n                        float defunc_0_add_arg_206904;\n                        \n                        defunc_0_add_arg_206904 = ((__global\n                                                    float *) mem_222927)[i_206903 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_206800 *\n                                                                         n_p_196694 +\n                                                                         gtid_206801];\n                        defunc_0_f_res_206902 = defunc_0_add_arg_206904;\n                    }\n                    \n                    float x_206905 = a11_206861 * tmp4_206900;\n                    float y_206906 = b11_206863 * defunc_1_f_res_206901;\n                    float x_206907 = x_206905 + y_206906;\n      ",
                   "              float defunc_9_fit_fun_res_206908 = defunc_0_f_res_206902 *\n                          x_206907;\n                    float x_206909 = b11_206863 * tmp4_206900;\n                    float y_206910 = c11_206864 * defunc_1_f_res_206901;\n                    float x_206911 = x_206909 + y_206910;\n                    float defunc_9_slope_fun_res_206912 =\n                          defunc_0_f_res_206902 * x_206911;\n                    float defunc_1_op_res_206878 = defunc_9_fit_fun_res_206908 +\n                          redout_221602;\n                    float defunc_1_op_res_206881 =\n                          defunc_9_slope_fun_res_206912 + redout_221603;\n                    float redout_tmp_226200 = defunc_1_op_res_206878;\n                    float redout_tmp_226201 = defunc_1_op_res_206881;\n                    \n                    redout_221602 = redout_tmp_226200;\n                    redout_221603 = redout_tmp_226201;\n                }\n                defunc_2_reduce_res_206874 = redout_221602;\n                defunc_2_reduce_res_206875 = redout_221603;\n                ((__global float *) color_225042)[phys_tid_206802 + i_222039 *\n                                                  num_threads_225166] =\n                    defunc_2_reduce_res_206874;\n                ((__global float *) color_225041)[phys_tid_206802 + i_222039 *\n                                                  num_threads_225166] =\n                    defunc_2_reduce_res_206875;\n            }\n            for (int64_t i_226202 = 0; i_226202 < s_n_m_196745; i_226202++) {\n                float tmp_226203;\n                \n                tmp_226203 = ((__global float *) color_225042)[phys_tid_206802 +\n                                                               i_226202 *\n                                                               num_threads_225166];\n                ((__global float *) mem_222962)[gtid_206800 * n_p_196694 +\n                                                gtid_206801 + i_2262",
                   "02 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226203;\n            }\n            for (int64_t i_226204 = 0; i_226204 < s_n_m_196745; i_226204++) {\n                float tmp_226205;\n                \n                tmp_226205 = ((__global float *) color_225041)[phys_tid_206802 +\n                                                               i_226204 *\n                                                               num_threads_225166];\n                ((__global float *) mem_222966)[gtid_206800 * n_p_196694 +\n                                                gtid_206801 + i_226204 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226205;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_206779\n}\n__kernel void mainzisegmap_207077(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *ext_mem_222322, __global\n                                  unsigned char *ext_mem_222419, __global\n                                  unsigned char *ext_mem_222420, __global\n                                  unsigned char *mem_222583, __global\n                                  unsigned char *mem_222588, __global\n                                  unsigned char *mem_223019, __global\n                                  unsigned char *mem_223024)\n{\n    #define segmap_group_sizze_207064 (mainzisegmap_group_sizze_205905)\n    \n    const int block_dim0 = 0;\n    const in",
                   "t block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226288;\n    int32_t local_tid_226289;\n    int64_t group_sizze_226292;\n    int32_t wave_sizze_226291;\n    int32_t group_tid_226290;\n    \n    global_tid_226288 = get_global_id(0);\n    local_tid_226289 = get_local_id(0);\n    group_sizze_226292 = get_local_size(0);\n    wave_sizze_226291 = LOCKSTEP_WIDTH;\n    group_tid_226290 = get_group_id(0);\n    \n    int32_t phys_tid_207077 = global_tid_226288;\n    int64_t global_tid_226293 = sext_i32_i64(group_tid_226290) *\n            segmap_group_sizze_207064 + sext_i32_i64(local_tid_226289);\n    int64_t slice_226294 = s_n_m_196745;\n    int64_t slice_226295 = n_p_196694 * slice_226294;\n    int64_t slice_226296 = m_196691 * slice_226295;\n    int64_t gtid_207074 = squot64(global_tid_226293, slice_226295);\n    int64_t remnant_226297 = global_tid_226293 - gtid_207074 * slice_226295;\n    int64_t gtid_207075 = squot64(remnant_226297, slice_226294);\n    int64_t remnant_226298 = remnant_226297 - gtid_207075 * slice_226294;\n    int64_t gtid_207076 = remnant_226298;\n    int64_t remnant_226299 = remnant_226298 - gtid_207076;\n    \n    if ((slt64(gtid_207074, m_196691) && slt64(gtid_207075, n_p_196694)) &&\n        slt64(gtid_207076, s_n_m_196745)) {\n        int64_t x_207081;\n        \n        x_207081 = ((__global int64_t *) ext_mem_222321)[gtid_207074 *\n                                                         n_p_196694 +\n                                                         gtid_207075];\n        \n        int64_t x_207083;\n        \n        x_207083 = ((__global int64_t *) ext_mem_222420)[gtid_207074 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_207075 *\n                                                         s_n_m_196745 +\n                                 ",
                   "                        gtid_207076];\n        \n        float x_207084;\n        \n        x_207084 = ((__global float *) ext_mem_222419)[gtid_207074 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_207075 *\n                                                       s_n_m_196745 +\n                                                       gtid_207076];\n        \n        bool cond_207085 = gtid_207076 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_207086;\n        \n        if (cond_207085) {\n            defunc_0_m_fun_res_207086 = (int64_t) 0;\n        } else {\n            int64_t y_207087 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_207088 = gtid_207076 == y_207087;\n            int64_t defunc_0_m_fun_res_f_res_207089;\n            \n            if (cond_207088) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_207090 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_207089 =\n                    defunc_0_m_fun_res_f_res_t_res_207090;\n            } else {\n                int64_t x_207091 = sub64(gtid_207076, (int64_t) 1);\n                int64_t x_207092 = mul64(jump_s_196701, x_207091);\n                int64_t min_arg_207093 = add64((int64_t) 1, x_207092);\n                int64_t min_res_207094 = smin64(defunc_0_f_res_196740,\n                                                min_arg_207093);\n                \n                defunc_0_m_fun_res_f_res_207089 = min_res_207094;\n            }\n            defunc_0_m_fun_res_207086 = defunc_0_m_fun_res_f_res_207089;\n        }\n        \n        float defunc_2_reduce_res_207095;\n        float defunc_2_reduce_res_207096;\n        float defunc_2_reduce_res_207097;\n        float redout_221617;\n        float redout_221618;\n        float redout_221619;\n        \n        redout_221617 = 0.0F;\n        redou",
                   "t_221618 = 0.0F;\n        redout_221619 = 0.0F;\n        for (int64_t i_221620 = 0; i_221620 < q_s_196695; i_221620++) {\n            bool cond_207108 = sle64(x_207081, i_221620);\n            int64_t defunc_0_f_res_207109;\n            \n            if (cond_207108) {\n                defunc_0_f_res_207109 = (int64_t) 0;\n            } else {\n                int64_t i_207110 = add64(x_207083, i_221620);\n                int64_t defunc_0_add_arg_207111;\n                \n                defunc_0_add_arg_207111 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_207074 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_207075 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_207110];\n                \n                int64_t defunc_1_add_res_207112 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_207111);\n                \n                defunc_0_f_res_207109 = defunc_1_add_res_207112;\n            }\n            \n            float defunc_0_f_res_207113;\n            \n            if (cond_207108) {\n                defunc_0_f_res_207113 = 0.0F;\n            } else {\n                int64_t i_207114 = add64(x_207083, i_221620);\n                float defunc_0_add_arg_207115;\n                \n                defunc_0_add_arg_207115 = ((__global\n                                            float *) mem_222588)[gtid_207074 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_207075 *\n                ",
                   "                                                 defunc_0_f_res_196740 +\n                                                                 i_207114];\n                defunc_0_f_res_207113 = defunc_0_add_arg_207115;\n            }\n            \n            int64_t binop_p_207116 = sub64(defunc_0_f_res_207109,\n                                           defunc_0_m_fun_res_207086);\n            float defunc_0_f_res_207117 = sitofp_i64_f32(binop_p_207116);\n            float abs_res_207118 = (float) fabs(defunc_0_f_res_207117);\n            float tmp1_207119 = abs_res_207118 / x_207084;\n            float x_207120 = tmp1_207119 * tmp1_207119;\n            float y_207121 = tmp1_207119 * x_207120;\n            float tmp2_207122 = 1.0F - y_207121;\n            float x_207123 = tmp2_207122 * tmp2_207122;\n            float tmp3_207124 = tmp2_207122 * x_207123;\n            float w_j_207125 = defunc_0_f_res_207113 * tmp3_207124;\n            float xw_j_207126 = defunc_0_f_res_207117 * w_j_207125;\n            float x2w_j_207127 = defunc_0_f_res_207117 * xw_j_207126;\n            float defunc_1_op_res_207100 = w_j_207125 + redout_221617;\n            float defunc_1_op_res_207103 = xw_j_207126 + redout_221618;\n            float defunc_1_op_res_207106 = x2w_j_207127 + redout_221619;\n            float redout_tmp_226300 = defunc_1_op_res_207100;\n            float redout_tmp_226301 = defunc_1_op_res_207103;\n            float redout_tmp_226302 = defunc_1_op_res_207106;\n            \n            redout_221617 = redout_tmp_226300;\n            redout_221618 = redout_tmp_226301;\n            redout_221619 = redout_tmp_226302;\n        }\n        defunc_2_reduce_res_207095 = redout_221617;\n        defunc_2_reduce_res_207096 = redout_221618;\n        defunc_2_reduce_res_207097 = redout_221619;\n        \n        float x_207128 = defunc_2_reduce_res_207095 *\n              defunc_2_reduce_res_207097;\n        float y_207129 = defunc_2_reduce_res_207096 *\n              defunc_2_reduce_res_207096;\n        float y_20",
                   "7130 = x_207128 - y_207129;\n        float det1_207131 = 1.0F / y_207130;\n        float a11_207132 = defunc_2_reduce_res_207097 * det1_207131;\n        float x_207133 = 0.0F - defunc_2_reduce_res_207096;\n        float b11_207134 = det1_207131 * x_207133;\n        float c11_207135 = defunc_2_reduce_res_207095 * det1_207131;\n        int64_t defunc_0_m_fun_res_207136;\n        \n        if (cond_207085) {\n            defunc_0_m_fun_res_207136 = (int64_t) 0;\n        } else {\n            int64_t y_207137 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_207138 = gtid_207076 == y_207137;\n            int64_t defunc_0_m_fun_res_f_res_207139;\n            \n            if (cond_207138) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_207140 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_207139 =\n                    defunc_0_m_fun_res_f_res_t_res_207140;\n            } else {\n                int64_t x_207141 = sub64(gtid_207076, (int64_t) 1);\n                int64_t x_207142 = mul64(jump_s_196701, x_207141);\n                int64_t min_arg_207143 = add64((int64_t) 1, x_207142);\n                int64_t min_res_207144 = smin64(defunc_0_f_res_196740,\n                                                min_arg_207143);\n                \n                defunc_0_m_fun_res_f_res_207139 = min_res_207144;\n            }\n            defunc_0_m_fun_res_207136 = defunc_0_m_fun_res_f_res_207139;\n        }\n        \n        float defunc_2_reduce_res_207145;\n        float defunc_2_reduce_res_207146;\n        float redout_221621;\n        float redout_221622;\n        \n        redout_221621 = 0.0F;\n        redout_221622 = 0.0F;\n        for (int64_t i_221623 = 0; i_221623 < q_s_196695; i_221623++) {\n            bool cond_207154 = sle64(x_207081, i_221623);\n            int64_t defunc_0_f_res_207155;\n            \n            if (cond_207154) {\n                defunc_0_f_res_207155 = (int64_t) 0;\n            } else {\n   ",
                   "             int64_t i_207156 = add64(x_207083, i_221623);\n                int64_t defunc_0_add_arg_207157;\n                \n                defunc_0_add_arg_207157 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_207074 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_207075 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_207156];\n                \n                int64_t defunc_1_add_res_207158 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_207157);\n                \n                defunc_0_f_res_207155 = defunc_1_add_res_207158;\n            }\n            \n            float defunc_0_f_res_207159;\n            \n            if (cond_207154) {\n                defunc_0_f_res_207159 = 0.0F;\n            } else {\n                int64_t i_207160 = add64(x_207083, i_221623);\n                float defunc_0_add_arg_207161;\n                \n                defunc_0_add_arg_207161 = ((__global\n                                            float *) mem_222588)[gtid_207074 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_207075 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_207160];\n                defunc_0_f_res_207159 = defunc_0_add_arg_207161;\n            }\n            \n            int64_t binop_p_207162 = sub64(defunc_0_f_res_207155,\n                                  ",
                   "         defunc_0_m_fun_res_207136);\n            float defunc_0_f_res_207163 = sitofp_i64_f32(binop_p_207162);\n            float abs_res_207164 = (float) fabs(defunc_0_f_res_207163);\n            float tmp1_207165 = abs_res_207164 / x_207084;\n            float x_207166 = tmp1_207165 * tmp1_207165;\n            float y_207167 = tmp1_207165 * x_207166;\n            float tmp2_207168 = 1.0F - y_207167;\n            float x_207169 = tmp2_207168 * tmp2_207168;\n            float tmp3_207170 = tmp2_207168 * x_207169;\n            float tmp4_207171 = defunc_0_f_res_207159 * tmp3_207170;\n            float defunc_1_f_res_207172 = defunc_0_f_res_207163 * tmp4_207171;\n            float defunc_0_f_res_207173;\n            \n            if (cond_207154) {\n                defunc_0_f_res_207173 = 0.0F;\n            } else {\n                int64_t i_207174 = add64(x_207083, i_221623);\n                float defunc_0_add_arg_207175;\n                \n                defunc_0_add_arg_207175 = ((__global\n                                            float *) mem_222583)[gtid_207074 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_207075 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_207174];\n                defunc_0_f_res_207173 = defunc_0_add_arg_207175;\n            }\n            \n            float x_207176 = a11_207132 * tmp4_207171;\n            float y_207177 = b11_207134 * defunc_1_f_res_207172;\n            float x_207178 = x_207176 + y_207177;\n            float defunc_9_fit_fun_res_207179 = defunc_0_f_res_207173 *\n                  x_207178;\n            float x_207180 = b11_207134 * tmp4_207171;\n            float y_207181 = c11_207135 * defunc_1_f_res_207172;\n            float x_207182 = x_207",
                   "180 + y_207181;\n            float defunc_9_slope_fun_res_207183 = defunc_0_f_res_207173 *\n                  x_207182;\n            float defunc_1_op_res_207149 = defunc_9_fit_fun_res_207179 +\n                  redout_221621;\n            float defunc_1_op_res_207152 = defunc_9_slope_fun_res_207183 +\n                  redout_221622;\n            float redout_tmp_226303 = defunc_1_op_res_207149;\n            float redout_tmp_226304 = defunc_1_op_res_207152;\n            \n            redout_221621 = redout_tmp_226303;\n            redout_221622 = redout_tmp_226304;\n        }\n        defunc_2_reduce_res_207145 = redout_221621;\n        defunc_2_reduce_res_207146 = redout_221622;\n        ((__global float *) mem_223019)[gtid_207074 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_207075 * s_n_m_196745 +\n                                        gtid_207076] =\n            defunc_2_reduce_res_207145;\n        ((__global float *) mem_223024)[gtid_207074 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_207075 * s_n_m_196745 +\n                                        gtid_207076] =\n            defunc_2_reduce_res_207146;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_207064\n}\n__kernel void mainzisegmap_207194(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_223030, __global\n                                  unsigned char *mem_223034)\n{\n    #define segmap_group_sizze_207187 (mainzisegmap_group_sizze_206240)\n    \n    const int block_dim0 = 0;\n    const int block",
                   "_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226305;\n    int32_t local_tid_226306;\n    int64_t group_sizze_226309;\n    int32_t wave_sizze_226308;\n    int32_t group_tid_226307;\n    \n    global_tid_226305 = get_global_id(0);\n    local_tid_226306 = get_local_id(0);\n    group_sizze_226309 = get_local_size(0);\n    wave_sizze_226308 = LOCKSTEP_WIDTH;\n    group_tid_226307 = get_group_id(0);\n    \n    int32_t phys_tid_207194 = global_tid_226305;\n    int64_t global_tid_226310 = sext_i32_i64(group_tid_226307) *\n            segmap_group_sizze_207187 + sext_i32_i64(local_tid_226306);\n    int64_t slice_226311 = s_n_m_196745;\n    int64_t slice_226312 = n_p_196694 * slice_226311;\n    int64_t slice_226313 = m_196691 * slice_226312;\n    int64_t gtid_207191 = squot64(global_tid_226310, slice_226312);\n    int64_t remnant_226314 = global_tid_226310 - gtid_207191 * slice_226312;\n    int64_t gtid_207192 = squot64(remnant_226314, slice_226311);\n    int64_t remnant_226315 = remnant_226314 - gtid_207192 * slice_226311;\n    int64_t gtid_207193 = remnant_226315;\n    int64_t remnant_226316 = remnant_226315 - gtid_207193;\n    \n    if ((slt64(gtid_207191, m_196691) && slt64(gtid_207192, n_p_196694)) &&\n        slt64(gtid_207193, s_n_m_196745)) {\n        bool cond_207196 = gtid_207193 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_207197;\n        \n        if (cond_207196) {\n            defunc_0_m_fun_res_207197 = (int64_t) 0;\n        } else {\n            int64_t y_207198 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_207199 = gtid_207193 == y_207198;\n            int64_t defunc_0_m_fun_res_f_res_207200;\n            \n            if (cond_207199) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_207201 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_207200 =\n                    defunc_0_m_fun_res_f_res_t_res_207201;\n            } ",
                   "else {\n                int64_t x_207202 = sub64(gtid_207193, (int64_t) 1);\n                int64_t x_207203 = mul64(jump_s_196701, x_207202);\n                int64_t min_arg_207204 = add64((int64_t) 1, x_207203);\n                int64_t min_res_207205 = smin64(defunc_0_f_res_196740,\n                                                min_arg_207204);\n                \n                defunc_0_m_fun_res_f_res_207200 = min_res_207205;\n            }\n            defunc_0_m_fun_res_207197 = defunc_0_m_fun_res_f_res_207200;\n        }\n        ((__global int64_t *) mem_223030)[gtid_207191 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_207192 * s_n_m_196745 +\n                                          gtid_207193] =\n            defunc_0_m_fun_res_207197;\n        ((__global bool *) mem_223034)[gtid_207191 * (s_n_m_196745 *\n                                                      n_p_196694) +\n                                       gtid_207192 * s_n_m_196745 +\n                                       gtid_207193] = cond_207196;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_207187\n}\n__kernel void mainzisegmap_207278(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_223040, __global\n                                  unsigned char *mem_223045, __global\n                                  unsigned char *mem_223050, __global\n                                  unsigned char *mem_223056, __global\n                                  unsigned char *mem_223061, __global\n                                  unsigned char *mem_223066, __global\n           ",
                   "                       unsigned char *mem_223071)\n{\n    #define segmap_group_sizze_207269 (mainzisegmap_group_sizze_206137)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226421;\n    int32_t local_tid_226422;\n    int64_t group_sizze_226425;\n    int32_t wave_sizze_226424;\n    int32_t group_tid_226423;\n    \n    global_tid_226421 = get_global_id(0);\n    local_tid_226422 = get_local_id(0);\n    group_sizze_226425 = get_local_size(0);\n    wave_sizze_226424 = LOCKSTEP_WIDTH;\n    group_tid_226423 = get_group_id(0);\n    \n    int32_t phys_tid_207278 = global_tid_226421;\n    int64_t global_tid_226426 = sext_i32_i64(group_tid_226423) *\n            segmap_group_sizze_207269 + sext_i32_i64(local_tid_226422);\n    int64_t slice_226427 = s_n_m_196745;\n    int64_t slice_226428 = n_p_196694 * slice_226427;\n    int64_t slice_226429 = m_196691 * slice_226428;\n    int64_t gtid_207275 = squot64(global_tid_226426, slice_226428);\n    int64_t remnant_226430 = global_tid_226426 - gtid_207275 * slice_226428;\n    int64_t gtid_207276 = squot64(remnant_226430, slice_226427);\n    int64_t remnant_226431 = remnant_226430 - gtid_207276 * slice_226427;\n    int64_t gtid_207277 = remnant_226431;\n    int64_t remnant_226432 = remnant_226431 - gtid_207277;\n    \n    if ((slt64(gtid_207275, m_196691) && slt64(gtid_207276, n_p_196694)) &&\n        slt64(gtid_207277, s_n_m_196745)) {\n        bool index_primexp_221816 = gtid_207277 == (int64_t) 0;\n        float defunc_2_reduce_res_207281;\n        \n        defunc_2_reduce_res_207281 = ((__global\n                                       float *) mem_223040)[gtid_207275 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207276 *\n                                                  ",
                   "          s_n_m_196745 +\n                                                            gtid_207277];\n        \n        float defunc_2_reduce_res_207282;\n        \n        defunc_2_reduce_res_207282 = ((__global\n                                       float *) mem_223045)[gtid_207275 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207276 *\n                                                            s_n_m_196745 +\n                                                            gtid_207277];\n        \n        float defunc_2_reduce_res_207283;\n        \n        defunc_2_reduce_res_207283 = ((__global\n                                       float *) mem_223050)[gtid_207275 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207276 *\n                                                            s_n_m_196745 +\n                                                            gtid_207277];\n        \n        float x_207284 = defunc_2_reduce_res_207281 *\n              defunc_2_reduce_res_207283;\n        float y_207285 = defunc_2_reduce_res_207282 *\n              defunc_2_reduce_res_207282;\n        float y_207286 = x_207284 - y_207285;\n        float det1_207287 = 1.0F / y_207286;\n        float a11_207288 = defunc_2_reduce_res_207283 * det1_207287;\n        float x_207289 = 0.0F - defunc_2_reduce_res_207282;\n        float b11_207290 = det1_207287 * x_207289;\n        float c11_207291 = defunc_2_reduce_res_207281 * det1_207287;\n        int64_t defunc_0_m_fun_res_207292;\n        \n        if (index_primexp_221816) {\n            defunc_0_m_fun_res_207292 = (int64_t) 0;\n        } else {\n            int64_t y_207293 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_207",
                   "294 = gtid_207277 == y_207293;\n            int64_t defunc_0_m_fun_res_f_res_207295;\n            \n            if (cond_207294) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_207296 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_207295 =\n                    defunc_0_m_fun_res_f_res_t_res_207296;\n            } else {\n                int64_t x_207297 = sub64(gtid_207277, (int64_t) 1);\n                int64_t x_207298 = mul64(jump_s_196701, x_207297);\n                int64_t min_arg_207299 = add64((int64_t) 1, x_207298);\n                int64_t min_res_207300 = smin64(defunc_0_f_res_196740,\n                                                min_arg_207299);\n                \n                defunc_0_m_fun_res_f_res_207295 = min_res_207300;\n            }\n            defunc_0_m_fun_res_207292 = defunc_0_m_fun_res_f_res_207295;\n        }\n        ((__global float *) mem_223056)[gtid_207275 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_207276 * s_n_m_196745 +\n                                        gtid_207277] = a11_207288;\n        ((__global float *) mem_223061)[gtid_207275 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_207276 * s_n_m_196745 +\n                                        gtid_207277] = b11_207290;\n        ((__global float *) mem_223066)[gtid_207275 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_207276 * s_n_m_196745 +\n                                        gtid_207277] = c11_207291;\n        ((__global int64_t *) mem_223071)[gtid_207275 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_207276 * s_n_m_196745 +\n                                    ",
                   "      gtid_207277] =\n            defunc_0_m_fun_res_207292;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_207269\n}\n__kernel void mainzisegmap_207553(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_207548,\n                                  int64_t num_threads_225175, __global\n                                  unsigned char *mem_223118, __global\n                                  unsigned char *mem_223121, __global\n                                  unsigned char *mem_223125, __global\n                                  unsigned char *mem_223129, __global\n                                  unsigned char *mem_223133, __global\n                                  unsigned char *mem_223137, __global\n                                  unsigned char *mem_223230, __global\n                                  unsigned char *mem_223234, __global\n                                  unsigned char *color_225051, __global\n                                  unsigned char *color_225052)\n{\n    #define segmap_group_sizze_207547 (mainzisegmap_group_sizze_207389)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226531;\n    int32_t local_tid_226532;\n    int64_t group_sizze_226535;\n    int32_t wave_sizze_226534;\n    int32_t group_tid_226533;\n    \n    global_tid_226531 = get_global_id(0);\n    local_tid_226532 = get_local_id(0);\n    group_sizze_226535 = get_local_size(0);\n    wave_sizze_226534 = LOCKSTEP_WIDTH;\n    group_tid_226533 = get_group_id(0);\n    \n    int32_t phys_tid_207553 = global_tid_226531;\n",
                   "    int32_t phys_group_id_226536;\n    \n    phys_group_id_226536 = get_group_id(0);\n    for (int32_t i_226537 = 0; i_226537 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_207547)) -\n                   phys_group_id_226536, sext_i64_i32(num_groups_207548));\n         i_226537++) {\n        int32_t virt_group_id_226538 = phys_group_id_226536 + i_226537 *\n                sext_i64_i32(num_groups_207548);\n        int64_t global_tid_226539 = sext_i32_i64(virt_group_id_226538) *\n                segmap_group_sizze_207547 + sext_i32_i64(local_tid_226532);\n        int64_t slice_226540 = m_196691;\n        int64_t gtid_207552 = global_tid_226539;\n        int64_t remnant_226541 = global_tid_226539 - gtid_207552;\n        \n        if (slt64(gtid_207552, m_196691)) {\n            for (int64_t i_222046 = 0; i_222046 < n_p_196694; i_222046++) {\n                int64_t x_207565;\n                \n                x_207565 = ((__global int64_t *) mem_223121)[i_222046 *\n                                                             m_196691 +\n                                                             gtid_207552];\n                for (int64_t i_222053 = 0; i_222053 < s_n_m_196745;\n                     i_222053++) {\n                    int64_t x_207571;\n                    \n                    x_207571 = ((__global int64_t *) mem_223129)[i_222046 *\n                                                                 (m_196691 *\n                                                                  s_n_m_196745) +\n                                                                 i_222053 *\n                                                                 m_196691 +\n                                                                 gtid_207552];\n                    \n                    float x_207572;\n                    \n                    x_207572 = ((__global float *) mem_223118)[i_222046 *\n                                               ",
                   "                (m_196691 *\n                                                                s_n_m_196745) +\n                                                               i_222053 *\n                                                               m_196691 +\n                                                               gtid_207552];\n                    \n                    bool cond_207573 = i_222053 == (int64_t) 0;\n                    int64_t defunc_0_m_fun_res_207574;\n                    \n                    if (cond_207573) {\n                        defunc_0_m_fun_res_207574 = (int64_t) 0;\n                    } else {\n                        int64_t y_207575 = sub64(s_n_m_196745, (int64_t) 1);\n                        bool cond_207576 = i_222053 == y_207575;\n                        int64_t defunc_0_m_fun_res_f_res_207577;\n                        \n                        if (cond_207576) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_207578 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_207577 =\n                                defunc_0_m_fun_res_f_res_t_res_207578;\n                        } else {\n                            int64_t x_207579 = sub64(i_222053, (int64_t) 1);\n                            int64_t x_207580 = mul64(jump_s_196701, x_207579);\n                            int64_t min_arg_207581 = add64((int64_t) 1,\n                                                           x_207580);\n                            int64_t min_res_207582 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_207581);\n                            \n                            defunc_0_m_fun_res_f_res_207577 = min_res_207582;\n                        }\n                        defunc_0_m_fun_res_207574 =\n                            defunc_0_m_fun_res_f_res_207577;\n                    }\n      ",
                   "              \n                    float defunc_2_reduce_res_207583;\n                    float defunc_2_reduce_res_207584;\n                    float defunc_2_reduce_res_207585;\n                    float defunc_2_reduce_res_207586;\n                    float defunc_2_reduce_res_207587;\n                    float redout_221638;\n                    float redout_221639;\n                    float redout_221640;\n                    float redout_221641;\n                    float redout_221642;\n                    \n                    redout_221638 = 0.0F;\n                    redout_221639 = 0.0F;\n                    redout_221640 = 0.0F;\n                    redout_221641 = 0.0F;\n                    redout_221642 = 0.0F;\n                    for (int64_t i_221643 = 0; i_221643 < q_s_196695;\n                         i_221643++) {\n                        bool cond_207604 = sle64(x_207565, i_221643);\n                        int64_t defunc_0_f_res_207605;\n                        \n                        if (cond_207604) {\n                            defunc_0_f_res_207605 = (int64_t) 0;\n                        } else {\n                            int64_t i_207606 = add64(x_207571, i_221643);\n                            int64_t defunc_0_add_arg_207607;\n                            \n                            defunc_0_add_arg_207607 = ((__global\n                                                        int64_t *) mem_223137)[i_222046 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                                                               i_207606 *\n                                                                               m_196691 +\n                                                                               gtid_207552];\n                            \n                            int64_t defunc_1_add_res_207608 = ",
                   "add64((int64_t) 1,\n                                                                    defunc_0_add_arg_207607);\n                            \n                            defunc_0_f_res_207605 = defunc_1_add_res_207608;\n                        }\n                        \n                        float defunc_0_f_res_207609;\n                        \n                        if (cond_207604) {\n                            defunc_0_f_res_207609 = 0.0F;\n                        } else {\n                            int64_t i_207610 = add64(x_207571, i_221643);\n                            float defunc_0_add_arg_207611;\n                            \n                            defunc_0_add_arg_207611 = ((__global\n                                                        float *) mem_223125)[i_222046 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_207610 *\n                                                                             m_196691 +\n                                                                             gtid_207552];\n                            defunc_0_f_res_207609 = defunc_0_add_arg_207611;\n                        }\n                        \n                        int64_t binop_p_207612 = sub64(defunc_0_f_res_207605,\n                                                       defunc_0_m_fun_res_207574);\n                        float defunc_0_f_res_207613 =\n                              sitofp_i64_f32(binop_p_207612);\n                        float abs_res_207614 =\n                              (float) fabs(defunc_0_f_res_207613);\n                        float tmp1_207615 = abs_res_207614 / x_207572;\n                        float x_207616 = tmp1_207615 * tmp1_207615;\n                        float y_207617 = tmp1_207615 * x_207616;\n                     ",
                   "   float tmp2_207618 = 1.0F - y_207617;\n                        float x_207619 = tmp2_207618 * tmp2_207618;\n                        float tmp3_207620 = tmp2_207618 * x_207619;\n                        float w_j_207621 = defunc_0_f_res_207609 * tmp3_207620;\n                        float xw_j_207622 = defunc_0_f_res_207613 * w_j_207621;\n                        float x2w_j_207623 = defunc_0_f_res_207613 *\n                              xw_j_207622;\n                        float x3w_j_207624 = defunc_0_f_res_207613 *\n                              x2w_j_207623;\n                        float x4w_j_207625 = defunc_0_f_res_207613 *\n                              x3w_j_207624;\n                        float defunc_1_op_res_207590 = w_j_207621 +\n                              redout_221638;\n                        float defunc_1_op_res_207593 = xw_j_207622 +\n                              redout_221639;\n                        float defunc_1_op_res_207596 = x2w_j_207623 +\n                              redout_221640;\n                        float defunc_1_op_res_207599 = x3w_j_207624 +\n                              redout_221641;\n                        float defunc_1_op_res_207602 = x4w_j_207625 +\n                              redout_221642;\n                        float redout_tmp_226546 = defunc_1_op_res_207590;\n                        float redout_tmp_226547 = defunc_1_op_res_207593;\n                        float redout_tmp_226548 = defunc_1_op_res_207596;\n                        float redout_tmp_226549 = defunc_1_op_res_207599;\n                        float redout_tmp_226550 = defunc_1_op_res_207602;\n                        \n                        redout_221638 = redout_tmp_226546;\n                        redout_221639 = redout_tmp_226547;\n                        redout_221640 = redout_tmp_226548;\n                        redout_221641 = redout_tmp_226549;\n                        redout_221642 = redout_tmp_226550;\n                    }\n                    defunc_2_reduce_res_20",
                   "7583 = redout_221638;\n                    defunc_2_reduce_res_207584 = redout_221639;\n                    defunc_2_reduce_res_207585 = redout_221640;\n                    defunc_2_reduce_res_207586 = redout_221641;\n                    defunc_2_reduce_res_207587 = redout_221642;\n                    \n                    float x_207626 = defunc_2_reduce_res_207585 *\n                          defunc_2_reduce_res_207587;\n                    float y_207627 = defunc_2_reduce_res_207586 *\n                          defunc_2_reduce_res_207586;\n                    float a12_207628 = x_207626 - y_207627;\n                    float x_207629 = defunc_2_reduce_res_207585 *\n                          defunc_2_reduce_res_207586;\n                    float y_207630 = defunc_2_reduce_res_207584 *\n                          defunc_2_reduce_res_207587;\n                    float b12_207631 = x_207629 - y_207630;\n                    float x_207632 = defunc_2_reduce_res_207584 *\n                          defunc_2_reduce_res_207586;\n                    float y_207633 = defunc_2_reduce_res_207585 *\n                          defunc_2_reduce_res_207585;\n                    float c12_207634 = x_207632 - y_207633;\n                    float x_207635 = defunc_2_reduce_res_207583 *\n                          defunc_2_reduce_res_207587;\n                    float b2_207636 = x_207635 - y_207633;\n                    float x_207637 = defunc_2_reduce_res_207584 *\n                          defunc_2_reduce_res_207585;\n                    float y_207638 = defunc_2_reduce_res_207583 *\n                          defunc_2_reduce_res_207586;\n                    float c2_207639 = x_207637 - y_207638;\n                    float x_207640 = defunc_2_reduce_res_207583 * a12_207628;\n                    float y_207641 = defunc_2_reduce_res_207584 * b12_207631;\n                    float x_207642 = x_207640 + y_207641;\n                    float y_207643 = defunc_2_reduce_res_207585 * c12_207634;\n                    float y_207",
                   "644 = x_207642 + y_207643;\n                    float det_207645 = 1.0F / y_207644;\n                    float a12_207646 = a12_207628 * det_207645;\n                    float b12_207647 = b12_207631 * det_207645;\n                    float c12_207648 = c12_207634 * det_207645;\n                    float b2_207649 = b2_207636 * det_207645;\n                    float c2_207650 = c2_207639 * det_207645;\n                    int64_t defunc_0_m_fun_res_207651;\n                    \n                    if (cond_207573) {\n                        defunc_0_m_fun_res_207651 = (int64_t) 0;\n                    } else {\n                        int64_t y_207652 = sub64(s_n_m_196745, (int64_t) 1);\n                        bool cond_207653 = i_222053 == y_207652;\n                        int64_t defunc_0_m_fun_res_f_res_207654;\n                        \n                        if (cond_207653) {\n                            int64_t defunc_0_m_fun_res_f_res_t_res_207655 =\n                                    sub64(pad_css_len_196741, (int64_t) 1);\n                            \n                            defunc_0_m_fun_res_f_res_207654 =\n                                defunc_0_m_fun_res_f_res_t_res_207655;\n                        } else {\n                            int64_t x_207656 = sub64(i_222053, (int64_t) 1);\n                            int64_t x_207657 = mul64(jump_s_196701, x_207656);\n                            int64_t min_arg_207658 = add64((int64_t) 1,\n                                                           x_207657);\n                            int64_t min_res_207659 =\n                                    smin64(defunc_0_f_res_196740,\n                                           min_arg_207658);\n                            \n                            defunc_0_m_fun_res_f_res_207654 = min_res_207659;\n                        }\n                        defunc_0_m_fun_res_207651 =\n                            defunc_0_m_fun_res_f_res_207654;\n                    }\n                    \n    ",
                   "                float defunc_2_reduce_res_207660;\n                    float defunc_2_reduce_res_207661;\n                    float redout_221644;\n                    float redout_221645;\n                    \n                    redout_221644 = 0.0F;\n                    redout_221645 = 0.0F;\n                    for (int64_t i_221646 = 0; i_221646 < q_s_196695;\n                         i_221646++) {\n                        bool cond_207669 = sle64(x_207565, i_221646);\n                        int64_t defunc_0_f_res_207670;\n                        \n                        if (cond_207669) {\n                            defunc_0_f_res_207670 = (int64_t) 0;\n                        } else {\n                            int64_t i_207671 = add64(x_207571, i_221646);\n                            int64_t defunc_0_add_arg_207672;\n                            \n                            defunc_0_add_arg_207672 = ((__global\n                                                        int64_t *) mem_223137)[i_222046 *\n                                                                               (m_196691 *\n                                                                                defunc_0_f_res_196740) +\n                                                                               i_207671 *\n                                                                               m_196691 +\n                                                                               gtid_207552];\n                            \n                            int64_t defunc_1_add_res_207673 = add64((int64_t) 1,\n                                                                    defunc_0_add_arg_207672);\n                            \n                            defunc_0_f_res_207670 = defunc_1_add_res_207673;\n                        }\n                        \n                        float defunc_0_f_res_207674;\n                        \n                        if (cond_207669) {\n                            defunc_0_f_",
                   "res_207674 = 0.0F;\n                        } else {\n                            int64_t i_207675 = add64(x_207571, i_221646);\n                            float defunc_0_add_arg_207676;\n                            \n                            defunc_0_add_arg_207676 = ((__global\n                                                        float *) mem_223125)[i_222046 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_207675 *\n                                                                             m_196691 +\n                                                                             gtid_207552];\n                            defunc_0_f_res_207674 = defunc_0_add_arg_207676;\n                        }\n                        \n                        int64_t binop_p_207677 = sub64(defunc_0_f_res_207670,\n                                                       defunc_0_m_fun_res_207651);\n                        float defunc_0_f_res_207678 =\n                              sitofp_i64_f32(binop_p_207677);\n                        float abs_res_207679 =\n                              (float) fabs(defunc_0_f_res_207678);\n                        float tmp1_207680 = abs_res_207679 / x_207572;\n                        float x_207681 = tmp1_207680 * tmp1_207680;\n                        float y_207682 = tmp1_207680 * x_207681;\n                        float tmp2_207683 = 1.0F - y_207682;\n                        float x_207684 = tmp2_207683 * tmp2_207683;\n                        float tmp3_207685 = tmp2_207683 * x_207684;\n                        float tmp4_207686 = defunc_0_f_res_207674 * tmp3_207685;\n                        float defunc_1_f_res_207687 = defunc_0_f_res_207678 *\n                              tmp4_207686;\n                        float defunc_1_f_res_207688 ",
                   "= defunc_0_f_res_207678 *\n                              defunc_1_f_res_207687;\n                        float defunc_0_f_res_207689;\n                        \n                        if (cond_207669) {\n                            defunc_0_f_res_207689 = 0.0F;\n                        } else {\n                            int64_t i_207690 = add64(x_207571, i_221646);\n                            float defunc_0_add_arg_207691;\n                            \n                            defunc_0_add_arg_207691 = ((__global\n                                                        float *) mem_223133)[i_222046 *\n                                                                             (m_196691 *\n                                                                              defunc_0_f_res_196740) +\n                                                                             i_207690 *\n                                                                             m_196691 +\n                                                                             gtid_207552];\n                            defunc_0_f_res_207689 = defunc_0_add_arg_207691;\n                        }\n                        \n                        float x_207692 = a12_207646 * tmp4_207686;\n                        float y_207693 = b12_207647 * defunc_1_f_res_207687;\n                        float x_207694 = x_207692 + y_207693;\n                        float y_207695 = c12_207648 * defunc_1_f_res_207688;\n                        float x_207696 = x_207694 + y_207695;\n                        float defunc_9_fit_fun_res_207697 =\n                              defunc_0_f_res_207689 * x_207696;\n                        float x_207698 = b12_207647 * tmp4_207686;\n                        float y_207699 = b2_207649 * defunc_1_f_res_207687;\n                        float x_207700 = x_207698 + y_207699;\n                        float y_207701 = c2_207650 * defunc_1_f_res_207688;\n                        float x_207702 = x_207700 + y_207",
                   "701;\n                        float defunc_9_slope_fun_res_207703 =\n                              defunc_0_f_res_207689 * x_207702;\n                        float defunc_1_op_res_207664 =\n                              defunc_9_fit_fun_res_207697 + redout_221644;\n                        float defunc_1_op_res_207667 =\n                              defunc_9_slope_fun_res_207703 + redout_221645;\n                        float redout_tmp_226551 = defunc_1_op_res_207664;\n                        float redout_tmp_226552 = defunc_1_op_res_207667;\n                        \n                        redout_221644 = redout_tmp_226551;\n                        redout_221645 = redout_tmp_226552;\n                    }\n                    defunc_2_reduce_res_207660 = redout_221644;\n                    defunc_2_reduce_res_207661 = redout_221645;\n                    ((__global float *) color_225052)[phys_tid_207553 +\n                                                      (i_222046 *\n                                                       (num_threads_225175 *\n                                                        s_n_m_196745) +\n                                                       i_222053 *\n                                                       num_threads_225175)] =\n                        defunc_2_reduce_res_207660;\n                    ((__global float *) color_225051)[phys_tid_207553 +\n                                                      (i_222046 *\n                                                       (num_threads_225175 *\n                                                        s_n_m_196745) +\n                                                       i_222053 *\n                                                       num_threads_225175)] =\n                        defunc_2_reduce_res_207661;\n                }\n            }\n            for (int64_t i_226553 = 0; i_226553 < n_p_196694; i_226553++) {\n                for (int64_t i_226554 = 0; i_226554 < s_n_m_196745;\n                     i_2",
                   "26554++) {\n                    float tmp_226555;\n                    \n                    tmp_226555 = ((__global\n                                   float *) color_225052)[phys_tid_207553 +\n                                                          (i_226553 *\n                                                           (num_threads_225175 *\n                                                            s_n_m_196745) +\n                                                           i_226554 *\n                                                           num_threads_225175)];\n                    ((__global float *) mem_223230)[gtid_207552 + (i_226553 *\n                                                                   (m_196691 *\n                                                                    s_n_m_196745) +\n                                                                   i_226554 *\n                                                                   m_196691)] =\n                        tmp_226555;\n                }\n            }\n            for (int64_t i_226556 = 0; i_226556 < n_p_196694; i_226556++) {\n                for (int64_t i_226557 = 0; i_226557 < s_n_m_196745;\n                     i_226557++) {\n                    float tmp_226558;\n                    \n                    tmp_226558 = ((__global\n                                   float *) color_225051)[phys_tid_207553 +\n                                                          (i_226556 *\n                                                           (num_threads_225175 *\n                                                            s_n_m_196745) +\n                                                           i_226557 *\n                                                           num_threads_225175)];\n                    ((__global float *) mem_223234)[gtid_207552 + (i_226556 *\n                                                                   (m_196691 *\n                                                                    s_n_",
                   "m_196745) +\n                                                                   i_226557 *\n                                                                   m_196691)] =\n                        tmp_226558;\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_207547\n}\n__kernel void mainzisegmap_209345(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745,\n                                  int64_t num_groups_209323,\n                                  int64_t num_threads_225178, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *mem_223238, __global\n                                  unsigned char *mem_223242, __global\n                                  unsigned char *mem_223246, __global\n                                  unsigned char *mem_223250, __global\n                                  unsigned char *mem_223254, __global\n                                  unsigned char *mem_223289, __global\n                                  unsigned char *mem_223293, __global\n                                  unsigned char *color_225053, __global\n                                  unsigned char *color_225054)\n{\n    #define segmap_group_sizze_209322 (mainzisegmap_group_sizze_207709)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226559;\n    int32_t local_tid_226560;\n    int64_t group_sizze_226563;\n    int32_t wave_sizze_226562;\n    int32_t group_tid_226561;\n    \n    glo",
                   "bal_tid_226559 = get_global_id(0);\n    local_tid_226560 = get_local_id(0);\n    group_sizze_226563 = get_local_size(0);\n    wave_sizze_226562 = LOCKSTEP_WIDTH;\n    group_tid_226561 = get_group_id(0);\n    \n    int32_t phys_tid_209345 = global_tid_226559;\n    int32_t phys_group_id_226564;\n    \n    phys_group_id_226564 = get_group_id(0);\n    for (int32_t i_226565 = 0; i_226565 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694,\n                                          segmap_group_sizze_209322)) -\n                   phys_group_id_226564, sext_i64_i32(num_groups_209323));\n         i_226565++) {\n        int32_t virt_group_id_226566 = phys_group_id_226564 + i_226565 *\n                sext_i64_i32(num_groups_209323);\n        int64_t global_tid_226567 = sext_i32_i64(virt_group_id_226566) *\n                segmap_group_sizze_209322 + sext_i32_i64(local_tid_226560);\n        int64_t slice_226568 = n_p_196694;\n        int64_t slice_226569 = m_196691 * slice_226568;\n        int64_t gtid_209343 = squot64(global_tid_226567, slice_226568);\n        int64_t remnant_226570 = global_tid_226567 - gtid_209343 * slice_226568;\n        int64_t gtid_209344 = remnant_226570;\n        int64_t remnant_226571 = remnant_226570 - gtid_209344;\n        \n        if (slt64(gtid_209343, m_196691) && slt64(gtid_209344, n_p_196694)) {\n            int64_t x_209349;\n            \n            x_209349 = ((__global int64_t *) ext_mem_222321)[gtid_209343 *\n                                                             n_p_196694 +\n                                                             gtid_209344];\n            for (int64_t i_222060 = 0; i_222060 < s_n_m_196745; i_222060++) {\n                int64_t x_209355;\n                \n                x_209355 = ((__global int64_t *) mem_223238)[i_222060 *\n                                                             (n_p_196694 *\n                                                              m_196691) +\n                                                   ",
                   "          gtid_209343 *\n                                                             n_p_196694 +\n                                                             gtid_209344];\n                \n                float x_209356;\n                \n                x_209356 = ((__global float *) mem_223242)[i_222060 *\n                                                           (n_p_196694 *\n                                                            m_196691) +\n                                                           gtid_209343 *\n                                                           n_p_196694 +\n                                                           gtid_209344];\n                \n                bool cond_209357 = i_222060 == (int64_t) 0;\n                int64_t defunc_0_m_fun_res_209358;\n                \n                if (cond_209357) {\n                    defunc_0_m_fun_res_209358 = (int64_t) 0;\n                } else {\n                    int64_t y_209359 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_209360 = i_222060 == y_209359;\n                    int64_t defunc_0_m_fun_res_f_res_209361;\n                    \n                    if (cond_209360) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_209362 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_209361 =\n                            defunc_0_m_fun_res_f_res_t_res_209362;\n                    } else {\n                        int64_t x_209363 = sub64(i_222060, (int64_t) 1);\n                        int64_t x_209364 = mul64(jump_s_196701, x_209363);\n                        int64_t min_arg_209365 = add64((int64_t) 1, x_209364);\n                        int64_t min_res_209366 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_209365);\n                        \n                        defunc_0_m_fun_res_f_res_209361 = min_res_209366;\n      ",
                   "              }\n                    defunc_0_m_fun_res_209358 = defunc_0_m_fun_res_f_res_209361;\n                }\n                \n                float defunc_2_reduce_res_209367;\n                float defunc_2_reduce_res_209368;\n                float defunc_2_reduce_res_209369;\n                float defunc_2_reduce_res_209370;\n                float defunc_2_reduce_res_209371;\n                float redout_221651;\n                float redout_221652;\n                float redout_221653;\n                float redout_221654;\n                float redout_221655;\n                \n                redout_221651 = 0.0F;\n                redout_221652 = 0.0F;\n                redout_221653 = 0.0F;\n                redout_221654 = 0.0F;\n                redout_221655 = 0.0F;\n                for (int64_t i_221656 = 0; i_221656 < q_s_196695; i_221656++) {\n                    bool cond_209388 = sle64(x_209349, i_221656);\n                    int64_t defunc_0_f_res_209389;\n                    \n                    if (cond_209388) {\n                        defunc_0_f_res_209389 = (int64_t) 0;\n                    } else {\n                        int64_t i_209390 = add64(x_209355, i_221656);\n                        int64_t defunc_0_add_arg_209391;\n                        \n                        defunc_0_add_arg_209391 = ((__global\n                                                    int64_t *) mem_223246)[i_209390 *\n                                                                           (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_209343 *\n                                                                           n_p_196694 +\n                                                                           gtid_209344];\n                        \n                        int64_t defunc_1_add_res_209392 = add64((int64_t) 1,\n                                   ",
                   "                             defunc_0_add_arg_209391);\n                        \n                        defunc_0_f_res_209389 = defunc_1_add_res_209392;\n                    }\n                    \n                    float defunc_0_f_res_209393;\n                    \n                    if (cond_209388) {\n                        defunc_0_f_res_209393 = 0.0F;\n                    } else {\n                        int64_t i_209394 = add64(x_209355, i_221656);\n                        float defunc_0_add_arg_209395;\n                        \n                        defunc_0_add_arg_209395 = ((__global\n                                                    float *) mem_223250)[i_209394 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_209343 *\n                                                                         n_p_196694 +\n                                                                         gtid_209344];\n                        defunc_0_f_res_209393 = defunc_0_add_arg_209395;\n                    }\n                    \n                    int64_t binop_p_209396 = sub64(defunc_0_f_res_209389,\n                                                   defunc_0_m_fun_res_209358);\n                    float defunc_0_f_res_209397 =\n                          sitofp_i64_f32(binop_p_209396);\n                    float abs_res_209398 = (float) fabs(defunc_0_f_res_209397);\n                    float tmp1_209399 = abs_res_209398 / x_209356;\n                    float x_209400 = tmp1_209399 * tmp1_209399;\n                    float y_209401 = tmp1_209399 * x_209400;\n                    float tmp2_209402 = 1.0F - y_209401;\n                    float x_209403 = tmp2_209402 * tmp2_209402;\n                    float tmp3_209404 = tmp2_209402 * x_209403;\n                    float w_j_209405 = defunc_0_f_",
                   "res_209393 * tmp3_209404;\n                    float xw_j_209406 = defunc_0_f_res_209397 * w_j_209405;\n                    float x2w_j_209407 = defunc_0_f_res_209397 * xw_j_209406;\n                    float x3w_j_209408 = defunc_0_f_res_209397 * x2w_j_209407;\n                    float x4w_j_209409 = defunc_0_f_res_209397 * x3w_j_209408;\n                    float defunc_1_op_res_209374 = w_j_209405 + redout_221651;\n                    float defunc_1_op_res_209377 = xw_j_209406 + redout_221652;\n                    float defunc_1_op_res_209380 = x2w_j_209407 + redout_221653;\n                    float defunc_1_op_res_209383 = x3w_j_209408 + redout_221654;\n                    float defunc_1_op_res_209386 = x4w_j_209409 + redout_221655;\n                    float redout_tmp_226574 = defunc_1_op_res_209374;\n                    float redout_tmp_226575 = defunc_1_op_res_209377;\n                    float redout_tmp_226576 = defunc_1_op_res_209380;\n                    float redout_tmp_226577 = defunc_1_op_res_209383;\n                    float redout_tmp_226578 = defunc_1_op_res_209386;\n                    \n                    redout_221651 = redout_tmp_226574;\n                    redout_221652 = redout_tmp_226575;\n                    redout_221653 = redout_tmp_226576;\n                    redout_221654 = redout_tmp_226577;\n                    redout_221655 = redout_tmp_226578;\n                }\n                defunc_2_reduce_res_209367 = redout_221651;\n                defunc_2_reduce_res_209368 = redout_221652;\n                defunc_2_reduce_res_209369 = redout_221653;\n                defunc_2_reduce_res_209370 = redout_221654;\n                defunc_2_reduce_res_209371 = redout_221655;\n                \n                float x_209410 = defunc_2_reduce_res_209369 *\n                      defunc_2_reduce_res_209371;\n                float y_209411 = defunc_2_reduce_res_209370 *\n                      defunc_2_reduce_res_209370;\n                float a12_209412 = x_209410 - y_209411;",
                   "\n                float x_209413 = defunc_2_reduce_res_209369 *\n                      defunc_2_reduce_res_209370;\n                float y_209414 = defunc_2_reduce_res_209368 *\n                      defunc_2_reduce_res_209371;\n                float b12_209415 = x_209413 - y_209414;\n                float x_209416 = defunc_2_reduce_res_209368 *\n                      defunc_2_reduce_res_209370;\n                float y_209417 = defunc_2_reduce_res_209369 *\n                      defunc_2_reduce_res_209369;\n                float c12_209418 = x_209416 - y_209417;\n                float x_209419 = defunc_2_reduce_res_209367 *\n                      defunc_2_reduce_res_209371;\n                float b2_209420 = x_209419 - y_209417;\n                float x_209421 = defunc_2_reduce_res_209368 *\n                      defunc_2_reduce_res_209369;\n                float y_209422 = defunc_2_reduce_res_209367 *\n                      defunc_2_reduce_res_209370;\n                float c2_209423 = x_209421 - y_209422;\n                float x_209424 = defunc_2_reduce_res_209367 * a12_209412;\n                float y_209425 = defunc_2_reduce_res_209368 * b12_209415;\n                float x_209426 = x_209424 + y_209425;\n                float y_209427 = defunc_2_reduce_res_209369 * c12_209418;\n                float y_209428 = x_209426 + y_209427;\n                float det_209429 = 1.0F / y_209428;\n                float a12_209430 = a12_209412 * det_209429;\n                float b12_209431 = b12_209415 * det_209429;\n                float c12_209432 = c12_209418 * det_209429;\n                float b2_209433 = b2_209420 * det_209429;\n                float c2_209434 = c2_209423 * det_209429;\n                int64_t defunc_0_m_fun_res_209435;\n                \n                if (cond_209357) {\n                    defunc_0_m_fun_res_209435 = (int64_t) 0;\n                } else {\n                    int64_t y_209436 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_209437 = i_222060 == y_",
                   "209436;\n                    int64_t defunc_0_m_fun_res_f_res_209438;\n                    \n                    if (cond_209437) {\n                        int64_t defunc_0_m_fun_res_f_res_t_res_209439 =\n                                sub64(pad_css_len_196741, (int64_t) 1);\n                        \n                        defunc_0_m_fun_res_f_res_209438 =\n                            defunc_0_m_fun_res_f_res_t_res_209439;\n                    } else {\n                        int64_t x_209440 = sub64(i_222060, (int64_t) 1);\n                        int64_t x_209441 = mul64(jump_s_196701, x_209440);\n                        int64_t min_arg_209442 = add64((int64_t) 1, x_209441);\n                        int64_t min_res_209443 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_209442);\n                        \n                        defunc_0_m_fun_res_f_res_209438 = min_res_209443;\n                    }\n                    defunc_0_m_fun_res_209435 = defunc_0_m_fun_res_f_res_209438;\n                }\n                \n                float defunc_2_reduce_res_209444;\n                float defunc_2_reduce_res_209445;\n                float redout_221657;\n                float redout_221658;\n                \n                redout_221657 = 0.0F;\n                redout_221658 = 0.0F;\n                for (int64_t i_221659 = 0; i_221659 < q_s_196695; i_221659++) {\n                    bool cond_209453 = sle64(x_209349, i_221659);\n                    int64_t defunc_0_f_res_209454;\n                    \n                    if (cond_209453) {\n                        defunc_0_f_res_209454 = (int64_t) 0;\n                    } else {\n                        int64_t i_209455 = add64(x_209355, i_221659);\n                        int64_t defunc_0_add_arg_209456;\n                        \n                        defunc_0_add_arg_209456 = ((__global\n                                                    int64_t *) mem_223246)[i_209455 *\n                   ",
                   "                                                        (n_p_196694 *\n                                                                            m_196691) +\n                                                                           gtid_209343 *\n                                                                           n_p_196694 +\n                                                                           gtid_209344];\n                        \n                        int64_t defunc_1_add_res_209457 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_209456);\n                        \n                        defunc_0_f_res_209454 = defunc_1_add_res_209457;\n                    }\n                    \n                    float defunc_0_f_res_209458;\n                    \n                    if (cond_209453) {\n                        defunc_0_f_res_209458 = 0.0F;\n                    } else {\n                        int64_t i_209459 = add64(x_209355, i_221659);\n                        float defunc_0_add_arg_209460;\n                        \n                        defunc_0_add_arg_209460 = ((__global\n                                                    float *) mem_223250)[i_209459 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_209343 *\n                                                                         n_p_196694 +\n                                                                         gtid_209344];\n                        defunc_0_f_res_209458 = defunc_0_add_arg_209460;\n                    }\n                    \n                    int64_t binop_p_209461 = sub64(defunc_0_f_res_209454,\n                                                   defunc_0_m_fun_res_209435);\n                    float defunc_0_f_res_209462 =\n    ",
                   "                      sitofp_i64_f32(binop_p_209461);\n                    float abs_res_209463 = (float) fabs(defunc_0_f_res_209462);\n                    float tmp1_209464 = abs_res_209463 / x_209356;\n                    float x_209465 = tmp1_209464 * tmp1_209464;\n                    float y_209466 = tmp1_209464 * x_209465;\n                    float tmp2_209467 = 1.0F - y_209466;\n                    float x_209468 = tmp2_209467 * tmp2_209467;\n                    float tmp3_209469 = tmp2_209467 * x_209468;\n                    float tmp4_209470 = defunc_0_f_res_209458 * tmp3_209469;\n                    float defunc_1_f_res_209471 = defunc_0_f_res_209462 *\n                          tmp4_209470;\n                    float defunc_1_f_res_209472 = defunc_0_f_res_209462 *\n                          defunc_1_f_res_209471;\n                    float defunc_0_f_res_209473;\n                    \n                    if (cond_209453) {\n                        defunc_0_f_res_209473 = 0.0F;\n                    } else {\n                        int64_t i_209474 = add64(x_209355, i_221659);\n                        float defunc_0_add_arg_209475;\n                        \n                        defunc_0_add_arg_209475 = ((__global\n                                                    float *) mem_223254)[i_209474 *\n                                                                         (n_p_196694 *\n                                                                          m_196691) +\n                                                                         gtid_209343 *\n                                                                         n_p_196694 +\n                                                                         gtid_209344];\n                        defunc_0_f_res_209473 = defunc_0_add_arg_209475;\n                    }\n                    \n                    float x_209476 = a12_209430 * tmp4_209470;\n                    float y_209477 = b12_209431 * defunc_1_f_res_209471;\n    ",
                   "                float x_209478 = x_209476 + y_209477;\n                    float y_209479 = c12_209432 * defunc_1_f_res_209472;\n                    float x_209480 = x_209478 + y_209479;\n                    float defunc_9_fit_fun_res_209481 = defunc_0_f_res_209473 *\n                          x_209480;\n                    float x_209482 = b12_209431 * tmp4_209470;\n                    float y_209483 = b2_209433 * defunc_1_f_res_209471;\n                    float x_209484 = x_209482 + y_209483;\n                    float y_209485 = c2_209434 * defunc_1_f_res_209472;\n                    float x_209486 = x_209484 + y_209485;\n                    float defunc_9_slope_fun_res_209487 =\n                          defunc_0_f_res_209473 * x_209486;\n                    float defunc_1_op_res_209448 = defunc_9_fit_fun_res_209481 +\n                          redout_221657;\n                    float defunc_1_op_res_209451 =\n                          defunc_9_slope_fun_res_209487 + redout_221658;\n                    float redout_tmp_226579 = defunc_1_op_res_209448;\n                    float redout_tmp_226580 = defunc_1_op_res_209451;\n                    \n                    redout_221657 = redout_tmp_226579;\n                    redout_221658 = redout_tmp_226580;\n                }\n                defunc_2_reduce_res_209444 = redout_221657;\n                defunc_2_reduce_res_209445 = redout_221658;\n                ((__global float *) color_225054)[phys_tid_209345 + i_222060 *\n                                                  num_threads_225178] =\n                    defunc_2_reduce_res_209444;\n                ((__global float *) color_225053)[phys_tid_209345 + i_222060 *\n                                                  num_threads_225178] =\n                    defunc_2_reduce_res_209445;\n            }\n            for (int64_t i_226581 = 0; i_226581 < s_n_m_196745; i_226581++) {\n                float tmp_226582;\n                \n                tmp_226582 = ((__global float *) color_225054)",
                   "[phys_tid_209345 +\n                                                               i_226581 *\n                                                               num_threads_225178];\n                ((__global float *) mem_223289)[gtid_209343 * n_p_196694 +\n                                                gtid_209344 + i_226581 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226582;\n            }\n            for (int64_t i_226583 = 0; i_226583 < s_n_m_196745; i_226583++) {\n                float tmp_226584;\n                \n                tmp_226584 = ((__global float *) color_225053)[phys_tid_209345 +\n                                                               i_226583 *\n                                                               num_threads_225178];\n                ((__global float *) mem_223293)[gtid_209343 * n_p_196694 +\n                                                gtid_209344 + i_226583 *\n                                                (n_p_196694 * m_196691)] =\n                    tmp_226584;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_209322\n}\n__kernel void mainzisegmap_209690(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t q_s_196695, int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *ext_mem_222321, __global\n                                  unsigned char *ext_mem_222322, __global\n                                  unsigned char *ext_mem_222419, __global\n                                  unsigned char *ext_mem_222420, __global\n                                  unsigned char *mem_222583, __global\n  ",
                   "                                unsigned char *mem_222588, __global\n                                  unsigned char *mem_223358, __global\n                                  unsigned char *mem_223363)\n{\n    #define segmap_group_sizze_209677 (mainzisegmap_group_sizze_208250)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226683;\n    int32_t local_tid_226684;\n    int64_t group_sizze_226687;\n    int32_t wave_sizze_226686;\n    int32_t group_tid_226685;\n    \n    global_tid_226683 = get_global_id(0);\n    local_tid_226684 = get_local_id(0);\n    group_sizze_226687 = get_local_size(0);\n    wave_sizze_226686 = LOCKSTEP_WIDTH;\n    group_tid_226685 = get_group_id(0);\n    \n    int32_t phys_tid_209690 = global_tid_226683;\n    int64_t global_tid_226688 = sext_i32_i64(group_tid_226685) *\n            segmap_group_sizze_209677 + sext_i32_i64(local_tid_226684);\n    int64_t slice_226689 = s_n_m_196745;\n    int64_t slice_226690 = n_p_196694 * slice_226689;\n    int64_t slice_226691 = m_196691 * slice_226690;\n    int64_t gtid_209687 = squot64(global_tid_226688, slice_226690);\n    int64_t remnant_226692 = global_tid_226688 - gtid_209687 * slice_226690;\n    int64_t gtid_209688 = squot64(remnant_226692, slice_226689);\n    int64_t remnant_226693 = remnant_226692 - gtid_209688 * slice_226689;\n    int64_t gtid_209689 = remnant_226693;\n    int64_t remnant_226694 = remnant_226693 - gtid_209689;\n    \n    if ((slt64(gtid_209687, m_196691) && slt64(gtid_209688, n_p_196694)) &&\n        slt64(gtid_209689, s_n_m_196745)) {\n        int64_t x_209694;\n        \n        x_209694 = ((__global int64_t *) ext_mem_222321)[gtid_209687 *\n                                                         n_p_196694 +\n                                                         gtid_209688];\n        \n        int64_t x_209696;\n        \n        x_209696 = ((__global int64_t *) ext_mem_222420)[gtid_209687 *\n ",
                   "                                                        (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_209688 *\n                                                         s_n_m_196745 +\n                                                         gtid_209689];\n        \n        float x_209697;\n        \n        x_209697 = ((__global float *) ext_mem_222419)[gtid_209687 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_209688 *\n                                                       s_n_m_196745 +\n                                                       gtid_209689];\n        \n        bool cond_209698 = gtid_209689 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_209699;\n        \n        if (cond_209698) {\n            defunc_0_m_fun_res_209699 = (int64_t) 0;\n        } else {\n            int64_t y_209700 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_209701 = gtid_209689 == y_209700;\n            int64_t defunc_0_m_fun_res_f_res_209702;\n            \n            if (cond_209701) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209703 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209702 =\n                    defunc_0_m_fun_res_f_res_t_res_209703;\n            } else {\n                int64_t x_209704 = sub64(gtid_209689, (int64_t) 1);\n                int64_t x_209705 = mul64(jump_s_196701, x_209704);\n                int64_t min_arg_209706 = add64((int64_t) 1, x_209705);\n                int64_t min_res_209707 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209706);\n                \n                defunc_0_m_fun_res_f_res_209702 = min_res_209707;\n            }\n            defunc_0_m_fun_res_209699",
                   " = defunc_0_m_fun_res_f_res_209702;\n        }\n        \n        float defunc_2_reduce_res_209708;\n        float defunc_2_reduce_res_209709;\n        float defunc_2_reduce_res_209710;\n        float defunc_2_reduce_res_209711;\n        float defunc_2_reduce_res_209712;\n        float redout_221672;\n        float redout_221673;\n        float redout_221674;\n        float redout_221675;\n        float redout_221676;\n        \n        redout_221672 = 0.0F;\n        redout_221673 = 0.0F;\n        redout_221674 = 0.0F;\n        redout_221675 = 0.0F;\n        redout_221676 = 0.0F;\n        for (int64_t i_221677 = 0; i_221677 < q_s_196695; i_221677++) {\n            bool cond_209729 = sle64(x_209694, i_221677);\n            int64_t defunc_0_f_res_209730;\n            \n            if (cond_209729) {\n                defunc_0_f_res_209730 = (int64_t) 0;\n            } else {\n                int64_t i_209731 = add64(x_209696, i_221677);\n                int64_t defunc_0_add_arg_209732;\n                \n                defunc_0_add_arg_209732 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_209687 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_209688 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_209731];\n                \n                int64_t defunc_1_add_res_209733 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_209732);\n                \n                defunc_0_f_res_209730 = defunc_1_add_res_209733;\n            }\n            \n            float defunc_0_f_res_209734;\n            \n            if (cond_209729) {\n                defunc_0_f_res_209734 = 0.0F;\n            } else {\n ",
                   "               int64_t i_209735 = add64(x_209696, i_221677);\n                float defunc_0_add_arg_209736;\n                \n                defunc_0_add_arg_209736 = ((__global\n                                            float *) mem_222588)[gtid_209687 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_209688 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_209735];\n                defunc_0_f_res_209734 = defunc_0_add_arg_209736;\n            }\n            \n            int64_t binop_p_209737 = sub64(defunc_0_f_res_209730,\n                                           defunc_0_m_fun_res_209699);\n            float defunc_0_f_res_209738 = sitofp_i64_f32(binop_p_209737);\n            float abs_res_209739 = (float) fabs(defunc_0_f_res_209738);\n            float tmp1_209740 = abs_res_209739 / x_209697;\n            float x_209741 = tmp1_209740 * tmp1_209740;\n            float y_209742 = tmp1_209740 * x_209741;\n            float tmp2_209743 = 1.0F - y_209742;\n            float x_209744 = tmp2_209743 * tmp2_209743;\n            float tmp3_209745 = tmp2_209743 * x_209744;\n            float w_j_209746 = defunc_0_f_res_209734 * tmp3_209745;\n            float xw_j_209747 = defunc_0_f_res_209738 * w_j_209746;\n            float x2w_j_209748 = defunc_0_f_res_209738 * xw_j_209747;\n            float x3w_j_209749 = defunc_0_f_res_209738 * x2w_j_209748;\n            float x4w_j_209750 = defunc_0_f_res_209738 * x3w_j_209749;\n            float defunc_1_op_res_209715 = w_j_209746 + redout_221672;\n            float defunc_1_op_res_209718 = xw_j_209747 + redout_221673;\n            float defunc_1_op_res_209721 = x2w_j_209748 + redout_221674;\n            float defunc_1_op_res_209724 = x3w_j_209749 + red",
                   "out_221675;\n            float defunc_1_op_res_209727 = x4w_j_209750 + redout_221676;\n            float redout_tmp_226695 = defunc_1_op_res_209715;\n            float redout_tmp_226696 = defunc_1_op_res_209718;\n            float redout_tmp_226697 = defunc_1_op_res_209721;\n            float redout_tmp_226698 = defunc_1_op_res_209724;\n            float redout_tmp_226699 = defunc_1_op_res_209727;\n            \n            redout_221672 = redout_tmp_226695;\n            redout_221673 = redout_tmp_226696;\n            redout_221674 = redout_tmp_226697;\n            redout_221675 = redout_tmp_226698;\n            redout_221676 = redout_tmp_226699;\n        }\n        defunc_2_reduce_res_209708 = redout_221672;\n        defunc_2_reduce_res_209709 = redout_221673;\n        defunc_2_reduce_res_209710 = redout_221674;\n        defunc_2_reduce_res_209711 = redout_221675;\n        defunc_2_reduce_res_209712 = redout_221676;\n        \n        float x_209751 = defunc_2_reduce_res_209710 *\n              defunc_2_reduce_res_209712;\n        float y_209752 = defunc_2_reduce_res_209711 *\n              defunc_2_reduce_res_209711;\n        float a12_209753 = x_209751 - y_209752;\n        float x_209754 = defunc_2_reduce_res_209710 *\n              defunc_2_reduce_res_209711;\n        float y_209755 = defunc_2_reduce_res_209709 *\n              defunc_2_reduce_res_209712;\n        float b12_209756 = x_209754 - y_209755;\n        float x_209757 = defunc_2_reduce_res_209709 *\n              defunc_2_reduce_res_209711;\n        float y_209758 = defunc_2_reduce_res_209710 *\n              defunc_2_reduce_res_209710;\n        float c12_209759 = x_209757 - y_209758;\n        float x_209760 = defunc_2_reduce_res_209708 *\n              defunc_2_reduce_res_209712;\n        float b2_209761 = x_209760 - y_209758;\n        float x_209762 = defunc_2_reduce_res_209709 *\n              defunc_2_reduce_res_209710;\n        float y_209763 = defunc_2_reduce_res_209708 *\n              defunc_2_reduce_res_209711;\n        float c2_209764",
                   " = x_209762 - y_209763;\n        float x_209765 = defunc_2_reduce_res_209708 * a12_209753;\n        float y_209766 = defunc_2_reduce_res_209709 * b12_209756;\n        float x_209767 = x_209765 + y_209766;\n        float y_209768 = defunc_2_reduce_res_209710 * c12_209759;\n        float y_209769 = x_209767 + y_209768;\n        float det_209770 = 1.0F / y_209769;\n        float a12_209771 = a12_209753 * det_209770;\n        float b12_209772 = b12_209756 * det_209770;\n        float c12_209773 = c12_209759 * det_209770;\n        float b2_209774 = b2_209761 * det_209770;\n        float c2_209775 = c2_209764 * det_209770;\n        int64_t defunc_0_m_fun_res_209776;\n        \n        if (cond_209698) {\n            defunc_0_m_fun_res_209776 = (int64_t) 0;\n        } else {\n            int64_t y_209777 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_209778 = gtid_209689 == y_209777;\n            int64_t defunc_0_m_fun_res_f_res_209779;\n            \n            if (cond_209778) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209780 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209779 =\n                    defunc_0_m_fun_res_f_res_t_res_209780;\n            } else {\n                int64_t x_209781 = sub64(gtid_209689, (int64_t) 1);\n                int64_t x_209782 = mul64(jump_s_196701, x_209781);\n                int64_t min_arg_209783 = add64((int64_t) 1, x_209782);\n                int64_t min_res_209784 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209783);\n                \n                defunc_0_m_fun_res_f_res_209779 = min_res_209784;\n            }\n            defunc_0_m_fun_res_209776 = defunc_0_m_fun_res_f_res_209779;\n        }\n        \n        float defunc_2_reduce_res_209785;\n        float defunc_2_reduce_res_209786;\n        float redout_221678;\n        float redout_221679;\n        \n        redout_221678 = 0.0F;\n        redout_221679 = 0.0F;\n  ",
                   "      for (int64_t i_221680 = 0; i_221680 < q_s_196695; i_221680++) {\n            bool cond_209794 = sle64(x_209694, i_221680);\n            int64_t defunc_0_f_res_209795;\n            \n            if (cond_209794) {\n                defunc_0_f_res_209795 = (int64_t) 0;\n            } else {\n                int64_t i_209796 = add64(x_209696, i_221680);\n                int64_t defunc_0_add_arg_209797;\n                \n                defunc_0_add_arg_209797 = ((__global\n                                            int64_t *) ext_mem_222322)[gtid_209687 *\n                                                                       (defunc_0_f_res_196740 *\n                                                                        n_p_196694) +\n                                                                       gtid_209688 *\n                                                                       defunc_0_f_res_196740 +\n                                                                       i_209796];\n                \n                int64_t defunc_1_add_res_209798 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_209797);\n                \n                defunc_0_f_res_209795 = defunc_1_add_res_209798;\n            }\n            \n            float defunc_0_f_res_209799;\n            \n            if (cond_209794) {\n                defunc_0_f_res_209799 = 0.0F;\n            } else {\n                int64_t i_209800 = add64(x_209696, i_221680);\n                float defunc_0_add_arg_209801;\n                \n                defunc_0_add_arg_209801 = ((__global\n                                            float *) mem_222588)[gtid_209687 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_209688 *\n                                                                 ",
                   "defunc_0_f_res_196740 +\n                                                                 i_209800];\n                defunc_0_f_res_209799 = defunc_0_add_arg_209801;\n            }\n            \n            int64_t binop_p_209802 = sub64(defunc_0_f_res_209795,\n                                           defunc_0_m_fun_res_209776);\n            float defunc_0_f_res_209803 = sitofp_i64_f32(binop_p_209802);\n            float abs_res_209804 = (float) fabs(defunc_0_f_res_209803);\n            float tmp1_209805 = abs_res_209804 / x_209697;\n            float x_209806 = tmp1_209805 * tmp1_209805;\n            float y_209807 = tmp1_209805 * x_209806;\n            float tmp2_209808 = 1.0F - y_209807;\n            float x_209809 = tmp2_209808 * tmp2_209808;\n            float tmp3_209810 = tmp2_209808 * x_209809;\n            float tmp4_209811 = defunc_0_f_res_209799 * tmp3_209810;\n            float defunc_1_f_res_209812 = defunc_0_f_res_209803 * tmp4_209811;\n            float defunc_1_f_res_209813 = defunc_0_f_res_209803 *\n                  defunc_1_f_res_209812;\n            float defunc_0_f_res_209814;\n            \n            if (cond_209794) {\n                defunc_0_f_res_209814 = 0.0F;\n            } else {\n                int64_t i_209815 = add64(x_209696, i_221680);\n                float defunc_0_add_arg_209816;\n                \n                defunc_0_add_arg_209816 = ((__global\n                                            float *) mem_222583)[gtid_209687 *\n                                                                 (defunc_0_f_res_196740 *\n                                                                  n_p_196694) +\n                                                                 gtid_209688 *\n                                                                 defunc_0_f_res_196740 +\n                                                                 i_209815];\n                defunc_0_f_res_209814 = defunc_0_add_arg_209816;\n            }\n            \n            float x_20981",
                   "7 = a12_209771 * tmp4_209811;\n            float y_209818 = b12_209772 * defunc_1_f_res_209812;\n            float x_209819 = x_209817 + y_209818;\n            float y_209820 = c12_209773 * defunc_1_f_res_209813;\n            float x_209821 = x_209819 + y_209820;\n            float defunc_9_fit_fun_res_209822 = defunc_0_f_res_209814 *\n                  x_209821;\n            float x_209823 = b12_209772 * tmp4_209811;\n            float y_209824 = b2_209774 * defunc_1_f_res_209812;\n            float x_209825 = x_209823 + y_209824;\n            float y_209826 = c2_209775 * defunc_1_f_res_209813;\n            float x_209827 = x_209825 + y_209826;\n            float defunc_9_slope_fun_res_209828 = defunc_0_f_res_209814 *\n                  x_209827;\n            float defunc_1_op_res_209789 = defunc_9_fit_fun_res_209822 +\n                  redout_221678;\n            float defunc_1_op_res_209792 = defunc_9_slope_fun_res_209828 +\n                  redout_221679;\n            float redout_tmp_226700 = defunc_1_op_res_209789;\n            float redout_tmp_226701 = defunc_1_op_res_209792;\n            \n            redout_221678 = redout_tmp_226700;\n            redout_221679 = redout_tmp_226701;\n        }\n        defunc_2_reduce_res_209785 = redout_221678;\n        defunc_2_reduce_res_209786 = redout_221679;\n        ((__global float *) mem_223358)[gtid_209687 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209688 * s_n_m_196745 +\n                                        gtid_209689] =\n            defunc_2_reduce_res_209785;\n        ((__global float *) mem_223363)[gtid_209687 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209688 * s_n_m_196745 +\n                                        gtid_209689] =\n            defunc_2_reduce_res_209786;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_209677\n}\n__kernel void mai",
                   "nzisegmap_209839(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_223369, __global\n                                  unsigned char *mem_223373)\n{\n    #define segmap_group_sizze_209832 (mainzisegmap_group_sizze_208667)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226702;\n    int32_t local_tid_226703;\n    int64_t group_sizze_226706;\n    int32_t wave_sizze_226705;\n    int32_t group_tid_226704;\n    \n    global_tid_226702 = get_global_id(0);\n    local_tid_226703 = get_local_id(0);\n    group_sizze_226706 = get_local_size(0);\n    wave_sizze_226705 = LOCKSTEP_WIDTH;\n    group_tid_226704 = get_group_id(0);\n    \n    int32_t phys_tid_209839 = global_tid_226702;\n    int64_t global_tid_226707 = sext_i32_i64(group_tid_226704) *\n            segmap_group_sizze_209832 + sext_i32_i64(local_tid_226703);\n    int64_t slice_226708 = s_n_m_196745;\n    int64_t slice_226709 = n_p_196694 * slice_226708;\n    int64_t slice_226710 = m_196691 * slice_226709;\n    int64_t gtid_209836 = squot64(global_tid_226707, slice_226709);\n    int64_t remnant_226711 = global_tid_226707 - gtid_209836 * slice_226709;\n    int64_t gtid_209837 = squot64(remnant_226711, slice_226708);\n    int64_t remnant_226712 = remnant_226711 - gtid_209837 * slice_226708;\n    int64_t gtid_209838 = remnant_226712;\n    int64_t remnant_226713 = remnant_226712 - gtid_209838;\n    \n    if ((slt64(gtid_209836, m_196691) && slt64(gtid_209837, n_p_196694)) &&\n        slt64(gtid_209838, s_n_m_196745)) {\n        bool cond_209841 = gtid_209838 == (int64_t) 0;\n        ",
                   "int64_t defunc_0_m_fun_res_209842;\n        \n        if (cond_209841) {\n            defunc_0_m_fun_res_209842 = (int64_t) 0;\n        } else {\n            int64_t y_209843 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_209844 = gtid_209838 == y_209843;\n            int64_t defunc_0_m_fun_res_f_res_209845;\n            \n            if (cond_209844) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209846 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209845 =\n                    defunc_0_m_fun_res_f_res_t_res_209846;\n            } else {\n                int64_t x_209847 = sub64(gtid_209838, (int64_t) 1);\n                int64_t x_209848 = mul64(jump_s_196701, x_209847);\n                int64_t min_arg_209849 = add64((int64_t) 1, x_209848);\n                int64_t min_res_209850 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209849);\n                \n                defunc_0_m_fun_res_f_res_209845 = min_res_209850;\n            }\n            defunc_0_m_fun_res_209842 = defunc_0_m_fun_res_f_res_209845;\n        }\n        ((__global int64_t *) mem_223369)[gtid_209836 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_209837 * s_n_m_196745 +\n                                          gtid_209838] =\n            defunc_0_m_fun_res_209842;\n        ((__global bool *) mem_223373)[gtid_209836 * (s_n_m_196745 *\n                                                      n_p_196694) +\n                                       gtid_209837 * s_n_m_196745 +\n                                       gtid_209838] = cond_209841;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_209832\n}\n__kernel void mainzisegmap_209935(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_1967",
                   "01,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *mem_223379, __global\n                                  unsigned char *mem_223384, __global\n                                  unsigned char *mem_223389, __global\n                                  unsigned char *mem_223394, __global\n                                  unsigned char *mem_223399, __global\n                                  unsigned char *mem_223405, __global\n                                  unsigned char *mem_223410, __global\n                                  unsigned char *mem_223415, __global\n                                  unsigned char *mem_223420, __global\n                                  unsigned char *mem_223425, __global\n                                  unsigned char *mem_223430)\n{\n    #define segmap_group_sizze_209924 (mainzisegmap_group_sizze_208537)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226846;\n    int32_t local_tid_226847;\n    int64_t group_sizze_226850;\n    int32_t wave_sizze_226849;\n    int32_t group_tid_226848;\n    \n    global_tid_226846 = get_global_id(0);\n    local_tid_226847 = get_local_id(0);\n    group_sizze_226850 = get_local_size(0);\n    wave_sizze_226849 = LOCKSTEP_WIDTH;\n    group_tid_226848 = get_group_id(0);\n    \n    int32_t phys_tid_209935 = global_tid_226846;\n    int64_t global_tid_226851 = sext_i32_i64(group_tid_226848) *\n            segmap_group_sizze_209924 + sext_i32_i64(local_tid_226847);\n    int64_t slice_226852 = s_n_m_196745;\n    int64_t slice_226853 = n_p_196694 * slice_226852;\n    int64_t slice_226854 = m_196691 * slice_226853;\n    int64_t gtid_209932 = squot64(global_tid_226851, slice_226853);\n    int64_t remnant_226855 = global_tid_226851 ",
                   "- gtid_209932 * slice_226853;\n    int64_t gtid_209933 = squot64(remnant_226855, slice_226852);\n    int64_t remnant_226856 = remnant_226855 - gtid_209933 * slice_226852;\n    int64_t gtid_209934 = remnant_226856;\n    int64_t remnant_226857 = remnant_226856 - gtid_209934;\n    \n    if ((slt64(gtid_209932, m_196691) && slt64(gtid_209933, n_p_196694)) &&\n        slt64(gtid_209934, s_n_m_196745)) {\n        bool index_primexp_221822 = gtid_209934 == (int64_t) 0;\n        float defunc_2_reduce_res_209938;\n        \n        defunc_2_reduce_res_209938 = ((__global\n                                       float *) mem_223379)[gtid_209932 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209933 *\n                                                            s_n_m_196745 +\n                                                            gtid_209934];\n        \n        float defunc_2_reduce_res_209939;\n        \n        defunc_2_reduce_res_209939 = ((__global\n                                       float *) mem_223384)[gtid_209932 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209933 *\n                                                            s_n_m_196745 +\n                                                            gtid_209934];\n        \n        float defunc_2_reduce_res_209940;\n        \n        defunc_2_reduce_res_209940 = ((__global\n                                       float *) mem_223389)[gtid_209932 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209933 *\n                               ",
                   "                             s_n_m_196745 +\n                                                            gtid_209934];\n        \n        float defunc_2_reduce_res_209941;\n        \n        defunc_2_reduce_res_209941 = ((__global\n                                       float *) mem_223394)[gtid_209932 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209933 *\n                                                            s_n_m_196745 +\n                                                            gtid_209934];\n        \n        float defunc_2_reduce_res_209942;\n        \n        defunc_2_reduce_res_209942 = ((__global\n                                       float *) mem_223399)[gtid_209932 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209933 *\n                                                            s_n_m_196745 +\n                                                            gtid_209934];\n        \n        float x_209943 = defunc_2_reduce_res_209940 *\n              defunc_2_reduce_res_209942;\n        float y_209944 = defunc_2_reduce_res_209941 *\n              defunc_2_reduce_res_209941;\n        float a12_209945 = x_209943 - y_209944;\n        float x_209946 = defunc_2_reduce_res_209940 *\n              defunc_2_reduce_res_209941;\n        float y_209947 = defunc_2_reduce_res_209939 *\n              defunc_2_reduce_res_209942;\n        float b12_209948 = x_209946 - y_209947;\n        float x_209949 = defunc_2_reduce_res_209939 *\n              defunc_2_reduce_res_209941;\n        float y_209950 = defunc_2_reduce_res_209940 *\n              defunc_2_reduce_res_209940;\n        float c12_209951 = x_209949 - y_209950;\n        float x_209952 = defunc_2_reduce_",
                   "res_209938 *\n              defunc_2_reduce_res_209942;\n        float b2_209953 = x_209952 - y_209950;\n        float x_209954 = defunc_2_reduce_res_209939 *\n              defunc_2_reduce_res_209940;\n        float y_209955 = defunc_2_reduce_res_209938 *\n              defunc_2_reduce_res_209941;\n        float c2_209956 = x_209954 - y_209955;\n        float x_209957 = defunc_2_reduce_res_209938 * a12_209945;\n        float y_209958 = defunc_2_reduce_res_209939 * b12_209948;\n        float x_209959 = x_209957 + y_209958;\n        float y_209960 = defunc_2_reduce_res_209940 * c12_209951;\n        float y_209961 = x_209959 + y_209960;\n        float det_209962 = 1.0F / y_209961;\n        float a12_209963 = a12_209945 * det_209962;\n        float b12_209964 = b12_209948 * det_209962;\n        float c12_209965 = c12_209951 * det_209962;\n        float b2_209966 = b2_209953 * det_209962;\n        float c2_209967 = c2_209956 * det_209962;\n        int64_t defunc_0_m_fun_res_209968;\n        \n        if (index_primexp_221822) {\n            defunc_0_m_fun_res_209968 = (int64_t) 0;\n        } else {\n            int64_t y_209969 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_209970 = gtid_209934 == y_209969;\n            int64_t defunc_0_m_fun_res_f_res_209971;\n            \n            if (cond_209970) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209972 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209971 =\n                    defunc_0_m_fun_res_f_res_t_res_209972;\n            } else {\n                int64_t x_209973 = sub64(gtid_209934, (int64_t) 1);\n                int64_t x_209974 = mul64(jump_s_196701, x_209973);\n                int64_t min_arg_209975 = add64((int64_t) 1, x_209974);\n                int64_t min_res_209976 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209975);\n                \n                defunc_0_m_fun_res_f_res_209971 = min_res_2",
                   "09976;\n            }\n            defunc_0_m_fun_res_209968 = defunc_0_m_fun_res_f_res_209971;\n        }\n        ((__global float *) mem_223405)[gtid_209932 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209933 * s_n_m_196745 +\n                                        gtid_209934] = a12_209963;\n        ((__global float *) mem_223410)[gtid_209932 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209933 * s_n_m_196745 +\n                                        gtid_209934] = b12_209964;\n        ((__global float *) mem_223415)[gtid_209932 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209933 * s_n_m_196745 +\n                                        gtid_209934] = c12_209965;\n        ((__global float *) mem_223420)[gtid_209932 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209933 * s_n_m_196745 +\n                                        gtid_209934] = b2_209966;\n        ((__global float *) mem_223425)[gtid_209932 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209933 * s_n_m_196745 +\n                                        gtid_209934] = c2_209967;\n        ((__global int64_t *) mem_223430)[gtid_209932 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_209933 * s_n_m_196745 +\n                                          gtid_209934] =\n            defunc_0_m_fun_res_209968;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_209924\n}\n__kernel void mainzisegmap_211496(__global int *global_failure,\n                                  int failure_is_an_option, __global\n       ",
                   "                           int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t jump_s_196701,\n                                  int64_t defunc_0_f_res_196740,\n                                  int64_t pad_css_len_196741,\n                                  int64_t s_n_m_196745, __global\n                                  unsigned char *ext_mem_223543, __global\n                                  unsigned char *ext_mem_223544, __global\n                                  unsigned char *mem_223550)\n{\n    #define segmap_group_sizze_211490 (mainzisegmap_group_sizze_211198)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227034;\n    int32_t local_tid_227035;\n    int64_t group_sizze_227038;\n    int32_t wave_sizze_227037;\n    int32_t group_tid_227036;\n    \n    global_tid_227034 = get_global_id(0);\n    local_tid_227035 = get_local_id(0);\n    group_sizze_227038 = get_local_size(0);\n    wave_sizze_227037 = LOCKSTEP_WIDTH;\n    group_tid_227036 = get_group_id(0);\n    \n    int32_t phys_tid_211496 = global_tid_227034;\n    int64_t global_tid_227039 = sext_i32_i64(group_tid_227036) *\n            segmap_group_sizze_211490 + sext_i32_i64(local_tid_227035);\n    int64_t slice_227040 = pad_css_len_196741;\n    int64_t slice_227041 = n_p_196694 * slice_227040;\n    int64_t slice_227042 = m_196691 * slice_227041;\n    int64_t gtid_211493 = squot64(global_tid_227039, slice_227041);\n    int64_t remnant_227043 = global_tid_227039 - gtid_211493 * slice_227041;\n    int64_t gtid_211494 = squot64(remnant_227043, slice_227040);\n    int64_t remnant_227044 = remnant_227043 - gtid_211494 * slice_227040;\n    int64_t gtid_211495 = remnant_227044;\n    int64_t remnant_227045 = remnant_227044 - gtid_211495;\n    \n    if ((slt64(gtid_211493, m_196691) && slt64(gtid_211494, n_p_196694)) &&\n        slt64",
                   "(gtid_211495, pad_css_len_196741)) {\n        bool cond_211500 = gtid_211495 == (int64_t) 0;\n        float defunc_0_f_res_211501;\n        \n        if (cond_211500) {\n            bool y_211502 = slt64((int64_t) 0, s_n_m_196745);\n            bool index_certs_211503;\n            \n            if (!y_211502) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 37) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) (int64_t) 0;\n                        global_failure_args[1] = (int64_t) s_n_m_196745;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float head_res_211504;\n            \n            head_res_211504 = ((__global float *) ext_mem_223544)[gtid_211493 *\n                                                                  (s_n_m_196745 *\n                                                                   n_p_196694) +\n                                                                  gtid_211494 *\n                                                                  s_n_m_196745];\n            defunc_0_f_res_211501 = head_res_211504;\n        } else {\n            int64_t y_211505 = sub64(pad_css_len_196741, (int64_t) 1);\n            bool cond_211506 = gtid_211495 == y_211505;\n            float defunc_0_f_res_f_res_211507;\n            \n            if (cond_211506) {\n                int64_t i_211508 = sub64(s_n_m_196745, (int64_t) 1);\n                bool x_211509 = sle64((int64_t) 0, i_211508);\n                bool y_211510 = slt64(i_211508, s_n_m_196745);\n                bool bounds_check_211511 = x_211509 && y_211510;\n                bool index_certs_211512;\n                \n                if (!bounds_check_211511) {\n                    {\n                        if (atomic_cmpxchg_i32_global(global_failure, -1, 38) ==\n                            -1) {\n                            global_failure_args[0] = (int64_t) i_",
                   "211508;\n                            global_failure_args[1] = (int64_t) s_n_m_196745;\n                            ;\n                        }\n                        return;\n                    }\n                }\n                \n                float last_res_211513;\n                \n                last_res_211513 = ((__global\n                                    float *) ext_mem_223544)[gtid_211493 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_211494 *\n                                                             s_n_m_196745 +\n                                                             i_211508];\n                defunc_0_f_res_f_res_211507 = last_res_211513;\n            } else {\n                int64_t x_211514 = sub64(gtid_211495, (int64_t) 1);\n                bool zzero_211515 = jump_s_196701 == (int64_t) 0;\n                bool nonzzero_211516 = !zzero_211515;\n                bool nonzzero_cert_211517;\n                \n                if (!nonzzero_211516) {\n                    {\n                        if (atomic_cmpxchg_i32_global(global_failure, -1, 39) ==\n                            -1) {\n                            ;\n                        }\n                        return;\n                    }\n                }\n                \n                int64_t x_211518 = sdiv64(x_211514, jump_s_196701);\n                int64_t m_v_211519 = add64((int64_t) 1, x_211518);\n                int64_t j_211520;\n                \n                if (cond_211500) {\n                    j_211520 = (int64_t) 0;\n                } else {\n                    int64_t y_211521 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_211522 = m_v_211519 == y_211521;\n                    int64_t j_f_res_211523;\n                    \n                    if (cond_211522) {\n                        j_f_res_21",
                   "1523 = x_211518;\n                    } else {\n                        j_f_res_211523 = m_v_211519;\n                    }\n                    j_211520 = j_f_res_211523;\n                }\n                \n                bool cond_211524 = j_211520 == (int64_t) 0;\n                int64_t defunc_0_m_fun_res_211525;\n                \n                if (cond_211524) {\n                    defunc_0_m_fun_res_211525 = (int64_t) 0;\n                } else {\n                    int64_t y_211526 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_211527 = j_211520 == y_211526;\n                    int64_t defunc_0_m_fun_res_f_res_211528;\n                    \n                    if (cond_211527) {\n                        defunc_0_m_fun_res_f_res_211528 = y_211505;\n                    } else {\n                        int64_t x_211529 = sub64(j_211520, (int64_t) 1);\n                        int64_t x_211530 = mul64(jump_s_196701, x_211529);\n                        int64_t min_arg_211531 = add64((int64_t) 1, x_211530);\n                        int64_t min_res_211532 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_211531);\n                        \n                        defunc_0_m_fun_res_f_res_211528 = min_res_211532;\n                    }\n                    defunc_0_m_fun_res_211525 = defunc_0_m_fun_res_f_res_211528;\n                }\n                \n                int64_t defunc_0_m_fun_arg_211533 = add64((int64_t) 1,\n                                                          j_211520);\n                bool cond_211534 = defunc_0_m_fun_arg_211533 == (int64_t) 0;\n                int64_t defunc_0_m_fun_res_211535;\n                \n                if (cond_211534) {\n                    defunc_0_m_fun_res_211535 = (int64_t) 0;\n                } else {\n                    int64_t y_211536 = sub64(s_n_m_196745, (int64_t) 1);\n                    bool cond_211537 = defunc_0_m_fun_arg_211533 == y_211536;\n                    int",
                   "64_t defunc_0_m_fun_res_f_res_211538;\n                    \n                    if (cond_211537) {\n                        defunc_0_m_fun_res_f_res_211538 = y_211505;\n                    } else {\n                        int64_t x_211539 = mul64(jump_s_196701, j_211520);\n                        int64_t min_arg_211540 = add64((int64_t) 1, x_211539);\n                        int64_t min_res_211541 = smin64(defunc_0_f_res_196740,\n                                                        min_arg_211540);\n                        \n                        defunc_0_m_fun_res_f_res_211538 = min_res_211541;\n                    }\n                    defunc_0_m_fun_res_211535 = defunc_0_m_fun_res_f_res_211538;\n                }\n                \n                int64_t i64_arg_211542 = sub64(defunc_0_m_fun_res_211535,\n                                               defunc_0_m_fun_res_211525);\n                float i64_res_211543 = sitofp_i64_f32(i64_arg_211542);\n                int64_t i64_arg_211544 = sub64(gtid_211495,\n                                               defunc_0_m_fun_res_211525);\n                float i64_res_211545 = sitofp_i64_f32(i64_arg_211544);\n                float u_211546 = i64_res_211545 / i64_res_211543;\n                float u2_211547 = u_211546 * u_211546;\n                float u3_211548 = u_211546 * u2_211547;\n                float x_211549 = 2.0F * u3_211548;\n                float y_211550 = 3.0F * u2_211547;\n                float x_211551 = x_211549 - y_211550;\n                float x_211552 = 1.0F + x_211551;\n                bool x_211553 = sle64((int64_t) 0, j_211520);\n                bool y_211554 = slt64(j_211520, s_n_m_196745);\n                bool bounds_check_211555 = x_211553 && y_211554;\n                bool index_certs_211556;\n                \n                if (!bounds_check_211555) {\n                    {\n                        if (atomic_cmpxchg_i32_global(global_failure, -1, 40) ==\n                            -1) {\n                        ",
                   "    global_failure_args[0] = (int64_t) j_211520;\n                            global_failure_args[1] = (int64_t) s_n_m_196745;\n                            ;\n                        }\n                        return;\n                    }\n                }\n                \n                float y_211557;\n                \n                y_211557 = ((__global float *) ext_mem_223544)[gtid_211493 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_211494 *\n                                                               s_n_m_196745 +\n                                                               j_211520];\n                \n                float x_211558 = x_211552 * y_211557;\n                float x_211559 = y_211550 - x_211549;\n                bool x_211560 = sle64((int64_t) 0, defunc_0_m_fun_arg_211533);\n                bool y_211561 = slt64(defunc_0_m_fun_arg_211533, s_n_m_196745);\n                bool bounds_check_211562 = x_211560 && y_211561;\n                bool index_certs_211563;\n                \n                if (!bounds_check_211562) {\n                    {\n                        if (atomic_cmpxchg_i32_global(global_failure, -1, 41) ==\n                            -1) {\n                            global_failure_args[0] =\n                                (int64_t) defunc_0_m_fun_arg_211533;\n                            global_failure_args[1] = (int64_t) s_n_m_196745;\n                            ;\n                        }\n                        return;\n                    }\n                }\n                \n                float y_211564;\n                \n                y_211564 = ((__global float *) ext_mem_223544)[gtid_211493 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n  ",
                   "                                                             gtid_211494 *\n                                                               s_n_m_196745 +\n                                                               defunc_0_m_fun_arg_211533];\n                \n                float y_211565 = x_211559 * y_211564;\n                float x_211566 = x_211558 + y_211565;\n                float y_211567 = 2.0F * u2_211547;\n                float x_211568 = u3_211548 - y_211567;\n                float x_211569 = u_211546 + x_211568;\n                float y_211570;\n                \n                y_211570 = ((__global float *) ext_mem_223543)[gtid_211493 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_211494 *\n                                                               s_n_m_196745 +\n                                                               j_211520];\n                \n                float x_211571 = x_211569 * y_211570;\n                float y_211572 = i64_res_211543 * x_211571;\n                float x_211573 = x_211566 + y_211572;\n                float x_211574 = u3_211548 - u2_211547;\n                float y_211575;\n                \n                y_211575 = ((__global float *) ext_mem_223543)[gtid_211493 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_211494 *\n                                                               s_n_m_196745 +\n                                                               defunc_0_m_fun_arg_211533];\n                \n                float x_211576 = x_211574 * y_211575;\n                float y_211577 = i64_res_211543 * x_211576;\n                float defunc_4_interpolate_proc_res_211578",
                   " = x_211573 +\n                      y_211577;\n                \n                defunc_0_f_res_f_res_211507 =\n                    defunc_4_interpolate_proc_res_211578;\n            }\n            defunc_0_f_res_211501 = defunc_0_f_res_f_res_211507;\n        }\n        ((__global float *) mem_223550)[gtid_211493 * (pad_css_len_196741 *\n                                                       n_p_196694) +\n                                        gtid_211494 * pad_css_len_196741 +\n                                        gtid_211495] = defunc_0_f_res_211501;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_211490\n}\n__kernel void mainzisegmap_211645(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_p_196694,\n                                  int64_t C_len_196743,\n                                  int64_t css_results_l_197223, __global\n                                  unsigned char *ext_mem_223551, __global\n                                  unsigned char *mem_223557)\n{\n    #define segmap_group_sizze_211640 (mainzisegmap_group_sizze_211594)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227046;\n    int32_t local_tid_227047;\n    int64_t group_sizze_227050;\n    int32_t wave_sizze_227049;\n    int32_t group_tid_227048;\n    \n    global_tid_227046 = get_global_id(0);\n    local_tid_227047 = get_local_id(0);\n    group_sizze_227050 = get_local_size(0);\n    wave_sizze_227049 = LOCKSTEP_WIDTH;\n    group_tid_227048 = get_group_id(0);\n    \n    int32_t phys_tid_211645 = global_tid_227046;\n    int64_t global_tid_227051 = sext_i32_i64(group_tid_227048) *\n            segmap_group_sizze_211640 + sext_i32_i64(local_tid_227047);\n    int64_t slice_227052 = C_len_196743;\n    int64_t slice_",
                   "227053 = m_196691 * slice_227052;\n    int64_t gtid_211643 = squot64(global_tid_227051, slice_227052);\n    int64_t remnant_227054 = global_tid_227051 - gtid_211643 * slice_227052;\n    int64_t gtid_211644 = remnant_227054;\n    int64_t remnant_227055 = remnant_227054 - gtid_211644;\n    \n    if (slt64(gtid_211643, m_196691) && slt64(gtid_211644, C_len_196743)) {\n        int64_t i_211648 = smod64(gtid_211644, n_p_196694);\n        bool x_211649 = sle64((int64_t) 0, i_211648);\n        bool y_211650 = slt64(i_211648, n_p_196694);\n        bool bounds_check_211651 = x_211649 && y_211650;\n        int64_t i_211652 = sdiv64(gtid_211644, n_p_196694);\n        bool x_211653 = sle64((int64_t) 0, i_211652);\n        bool y_211654 = slt64(i_211652, css_results_l_197223);\n        bool bounds_check_211655 = x_211653 && y_211654;\n        bool index_ok_211656 = bounds_check_211651 && bounds_check_211655;\n        bool index_certs_211657;\n        \n        if (!index_ok_211656) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 42) == -1) {\n                    global_failure_args[0] = (int64_t) i_211648;\n                    global_failure_args[1] = (int64_t) i_211652;\n                    global_failure_args[2] = (int64_t) n_p_196694;\n                    global_failure_args[3] = (int64_t) css_results_l_197223;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        float defunc_0_f_res_211658;\n        \n        defunc_0_f_res_211658 = ((__global\n                                  float *) ext_mem_223551)[gtid_211643 *\n                                                           (css_results_l_197223 *\n                                                            n_p_196694) +\n                                                           i_211648 *\n                                                           css_results_l_197223 +\n                                                           i_211652];\n        ((__global float *)",
                   " mem_223557)[gtid_211643 * C_len_196743 +\n                                        gtid_211644] = defunc_0_f_res_211658;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_211640\n}\n__kernel void mainzisegmap_211681(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694, __global\n                                  unsigned char *mem_223560, __global\n                                  unsigned char *mem_223564)\n{\n    #define segmap_group_sizze_211677 (mainzisegmap_group_sizze_211665)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227056;\n    int32_t local_tid_227057;\n    int64_t group_sizze_227060;\n    int32_t wave_sizze_227059;\n    int32_t group_tid_227058;\n    \n    global_tid_227056 = get_global_id(0);\n    local_tid_227057 = get_local_id(0);\n    group_sizze_227060 = get_local_size(0);\n    wave_sizze_227059 = LOCKSTEP_WIDTH;\n    group_tid_227058 = get_group_id(0);\n    \n    int32_t phys_tid_211681 = global_tid_227056;\n    int64_t global_tid_227061 = sext_i32_i64(group_tid_227058) *\n            segmap_group_sizze_211677 + sext_i32_i64(local_tid_227057);\n    int64_t slice_227062 = m_196691;\n    int64_t gtid_211680 = global_tid_227061;\n    int64_t remnant_227063 = global_tid_227061 - gtid_211680;\n    \n    if (slt64(gtid_211680, m_196691)) {\n        float defunc_2_reduce_res_211683;\n        float redout_222063 = 0.0F;\n        \n        for (int64_t i_222064 = 0; i_222064 < n_p_196694; i_222064++) {\n            float x_211687;\n            \n            x_211687 = ((__global float *) mem_223560)[i_222064 * m_196691 +\n                                                       gtid_211680];\n            \n            float defunc_1_op_res_211686 = x_211687 + redout_222063;\n            float redout_tmp_227064 = defunc_1_op_res_211686;\n            \n            redout_222063 = redout_tmp_227064;\n        }\n ",
                   "       defunc_2_reduce_res_211683 = redout_222063;\n        ((__global float *) mem_223564)[gtid_211680] =\n            defunc_2_reduce_res_211683;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_211677\n}\n__kernel void mainzisegmap_211812(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_p_196694, __global\n                                  unsigned char *mem_223577, __global\n                                  unsigned char *mem_223581)\n{\n    #define segmap_group_sizze_211808 (mainzisegmap_group_sizze_211796)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227199;\n    int32_t local_tid_227200;\n    int64_t group_sizze_227203;\n    int32_t wave_sizze_227202;\n    int32_t group_tid_227201;\n    \n    global_tid_227199 = get_global_id(0);\n    local_tid_227200 = get_local_id(0);\n    group_sizze_227203 = get_local_size(0);\n    wave_sizze_227202 = LOCKSTEP_WIDTH;\n    group_tid_227201 = get_group_id(0);\n    \n    int32_t phys_tid_211812 = global_tid_227199;\n    int64_t global_tid_227204 = sext_i32_i64(group_tid_227201) *\n            segmap_group_sizze_211808 + sext_i32_i64(local_tid_227200);\n    int64_t slice_227205 = m_196691;\n    int64_t gtid_211811 = global_tid_227204;\n    int64_t remnant_227206 = global_tid_227204 - gtid_211811;\n    \n    if (slt64(gtid_211811, m_196691)) {\n        float defunc_2_reduce_res_211814;\n        float redout_222065 = 0.0F;\n        \n        for (int64_t i_222066 = 0; i_222066 < n_p_196694; i_222066++) {\n            float x_211818;\n            \n            x_211818 = ((__global float *) mem_223577)[i_222066 * m_196691 +\n                                                       gtid_211811];\n            \n            float defunc_1_op_res_211817 = x_211818 + redout_222065;\n            float redout_tmp_227207 = defunc_1_op_res_211817;\n            \n            redout_222065 = redo",
                   "ut_tmp_227207;\n        }\n        defunc_2_reduce_res_211814 = redout_222065;\n        ((__global float *) mem_223581)[gtid_211811] =\n            defunc_2_reduce_res_211814;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_211808\n}\n__kernel void mainzisegmap_211943(__global int *global_failure,\n                                  int64_t m_196691, __global\n                                  unsigned char *mem_223594, __global\n                                  unsigned char *mem_223598)\n{\n    #define segmap_group_sizze_211939 (mainzisegmap_group_sizze_211927)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227342;\n    int32_t local_tid_227343;\n    int64_t group_sizze_227346;\n    int32_t wave_sizze_227345;\n    int32_t group_tid_227344;\n    \n    global_tid_227342 = get_global_id(0);\n    local_tid_227343 = get_local_id(0);\n    group_sizze_227346 = get_local_size(0);\n    wave_sizze_227345 = LOCKSTEP_WIDTH;\n    group_tid_227344 = get_group_id(0);\n    \n    int32_t phys_tid_211943 = global_tid_227342;\n    int64_t global_tid_227347 = sext_i32_i64(group_tid_227344) *\n            segmap_group_sizze_211939 + sext_i32_i64(local_tid_227343);\n    int64_t slice_227348 = m_196691;\n    int64_t gtid_211942 = global_tid_227347;\n    int64_t remnant_227349 = global_tid_227347 - gtid_211942;\n    \n    if (slt64(gtid_211942, m_196691)) {\n        float defunc_2_reduce_res_211945;\n        float redout_222067 = 0.0F;\n        \n        for (int32_t i_222187 = 0; i_222187 < 3; i_222187++) {\n            int64_t i_222068 = sext_i32_i64(i_222187);\n            float x_211949;\n            \n            x_211949 = ((__global float *) mem_223594)[i_222068 * m_196691 +\n                                                       gtid_211942];\n            \n            float defunc_1_op_res_211948 = x_211949 + redout_222067;\n            float redout_tmp_227350 = defunc_1_op_res_2",
                   "11948;\n            \n            redout_222067 = redout_tmp_227350;\n        }\n        defunc_2_reduce_res_211945 = redout_222067;\n        ((__global float *) mem_223598)[gtid_211942] =\n            defunc_2_reduce_res_211945;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_211939\n}\n__kernel void mainzisegmap_212132(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                                  int64_t num_groups_212128,\n                                  int64_t num_threads_225201, __global\n                                  unsigned char *mem_223615, __global\n                                  unsigned char *mem_223618, __global\n                                  unsigned char *mem_223621, __global\n                                  unsigned char *mem_223624, __global\n                                  unsigned char *mem_223643, __global\n                                  unsigned char *color_225074)\n{\n    #define segmap_group_sizze_212127 (mainzisegmap_group_sizze_212058)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227500;\n    int32_t local_tid_227501;\n    int64_t group_sizze_227504;\n    int32_t wave_sizze_227503;\n    int32_t group_tid_227502;\n    \n    global_tid_227500 = get_global_id(0);\n    local_tid_227501 = get_local_id(0);\n    group_sizze_227504 = get_local_size(0);\n    wave_sizze_227503 = LOCKSTEP_WIDTH;\n    group_tid_227502 = get_group_id(0);\n    \n    int32_t phys_tid_212132 = global_tid_227500;\n    int32_t phys_group_id_227505;\n    \n    phys_group_id_227505 = get_group_id(0);\n    for (int32_t i_227506 = 0; i_227506 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_gro",
                   "up_sizze_212127)) -\n                   phys_group_id_227505, sext_i64_i32(num_groups_212128));\n         i_227506++) {\n        int32_t virt_group_id_227507 = phys_group_id_227505 + i_227506 *\n                sext_i64_i32(num_groups_212128);\n        int64_t global_tid_227508 = sext_i32_i64(virt_group_id_227507) *\n                segmap_group_sizze_212127 + sext_i32_i64(local_tid_227501);\n        int64_t slice_227509 = m_196691;\n        int64_t gtid_212131 = global_tid_227508;\n        int64_t remnant_227510 = global_tid_227508 - gtid_212131;\n        \n        if (slt64(gtid_212131, m_196691)) {\n            for (int64_t i_222071 = 0; i_222071 < l_n_m_196752; i_222071++) {\n                int64_t x_212139;\n                \n                x_212139 = ((__global int64_t *) mem_223615)[i_222071 *\n                                                             m_196691 +\n                                                             gtid_212131];\n                \n                float x_212140;\n                \n                x_212140 = ((__global float *) mem_223618)[i_222071 * m_196691 +\n                                                           gtid_212131];\n                \n                int64_t min_arg_212141 = mul64(jump_t_196702, i_222071);\n                int64_t min_res_212142 = smin64(i_196779, min_arg_212141);\n                int64_t defunc_0_g_res_212143 = add64((int64_t) 1,\n                                                      min_res_212142);\n                float defunc_2_reduce_res_212144;\n                float redout_221429 = 0.0F;\n                \n                for (int64_t i_221430 = 0; i_221430 < q_l_196697; i_221430++) {\n                    bool cond_212149 = sle64(n_196692, i_221430);\n                    int64_t defunc_0_f_res_212150;\n                    \n                    if (cond_212149) {\n                        defunc_0_f_res_212150 = (int64_t) 0;\n                    } else {\n                        int64_t i_212151 = add64(x_212139, i_221430);\n   ",
                   "                     int64_t defunc_1_add_res_212152 = add64((int64_t) 1,\n                                                                i_212151);\n                        \n                        defunc_0_f_res_212150 = defunc_1_add_res_212152;\n                    }\n                    \n                    float defunc_0_f_res_212153;\n                    \n                    if (cond_212149) {\n                        defunc_0_f_res_212153 = 0.0F;\n                    } else {\n                        int64_t i_212154 = add64(x_212139, i_221430);\n                        float defunc_0_add_arg_212155;\n                        \n                        defunc_0_add_arg_212155 = ((__global\n                                                    float *) mem_223621)[i_212154 *\n                                                                         m_196691 +\n                                                                         gtid_212131];\n                        defunc_0_f_res_212153 = defunc_0_add_arg_212155;\n                    }\n                    \n                    int64_t binop_p_212156 = sub64(defunc_0_f_res_212150,\n                                                   defunc_0_g_res_212143);\n                    float defunc_0_f_res_212157 =\n                          sitofp_i64_f32(binop_p_212156);\n                    float abs_res_212158 = (float) fabs(defunc_0_f_res_212157);\n                    float tmp1_212159 = abs_res_212158 / x_212140;\n                    float x_212160 = tmp1_212159 * tmp1_212159;\n                    float y_212161 = tmp1_212159 * x_212160;\n                    float tmp2_212162 = 1.0F - y_212161;\n                    float x_212163 = tmp2_212162 * tmp2_212162;\n                    float tmp3_212164 = tmp2_212162 * x_212163;\n                    float w_j_212165 = defunc_0_f_res_212153 * tmp3_212164;\n                    float defunc_1_op_res_212147 = w_j_212165 + redout_221429;\n                    float redout_tmp_227512 = defunc_1_op_res_21214",
                   "7;\n                    \n                    redout_221429 = redout_tmp_227512;\n                }\n                defunc_2_reduce_res_212144 = redout_221429;\n                \n                float a0_212166 = 1.0F / defunc_2_reduce_res_212144;\n                float defunc_2_reduce_res_212167;\n                float redout_221431 = 0.0F;\n                \n                for (int64_t i_221432 = 0; i_221432 < q_l_196697; i_221432++) {\n                    bool cond_212172 = sle64(n_196692, i_221432);\n                    int64_t defunc_0_f_res_212173;\n                    \n                    if (cond_212172) {\n                        defunc_0_f_res_212173 = (int64_t) 0;\n                    } else {\n                        int64_t i_212174 = add64(x_212139, i_221432);\n                        int64_t defunc_1_add_res_212175 = add64((int64_t) 1,\n                                                                i_212174);\n                        \n                        defunc_0_f_res_212173 = defunc_1_add_res_212175;\n                    }\n                    \n                    float defunc_0_f_res_212176;\n                    \n                    if (cond_212172) {\n                        defunc_0_f_res_212176 = 0.0F;\n                    } else {\n                        int64_t i_212177 = add64(x_212139, i_221432);\n                        float defunc_0_add_arg_212178;\n                        \n                        defunc_0_add_arg_212178 = ((__global\n                                                    float *) mem_223621)[i_212177 *\n                                                                         m_196691 +\n                                                                         gtid_212131];\n                        defunc_0_f_res_212176 = defunc_0_add_arg_212178;\n                    }\n                    \n                    int64_t binop_p_212179 = sub64(defunc_0_f_res_212173,\n                                                   defunc_0_g_res_212143);\n             ",
                   "       float defunc_0_f_res_212180 =\n                          sitofp_i64_f32(binop_p_212179);\n                    float abs_res_212181 = (float) fabs(defunc_0_f_res_212180);\n                    float tmp1_212182 = abs_res_212181 / x_212140;\n                    float x_212183 = tmp1_212182 * tmp1_212182;\n                    float y_212184 = tmp1_212182 * x_212183;\n                    float tmp2_212185 = 1.0F - y_212184;\n                    float x_212186 = tmp2_212185 * tmp2_212185;\n                    float tmp3_212187 = tmp2_212185 * x_212186;\n                    float tmp4_212188 = defunc_0_f_res_212176 * tmp3_212187;\n                    float defunc_0_f_res_212189;\n                    \n                    if (cond_212172) {\n                        defunc_0_f_res_212189 = 0.0F;\n                    } else {\n                        int64_t i_212190 = add64(x_212139, i_221432);\n                        float defunc_0_add_arg_212191;\n                        \n                        defunc_0_add_arg_212191 = ((__global\n                                                    float *) mem_223624)[i_212190 *\n                                                                         m_196691 +\n                                                                         gtid_212131];\n                        defunc_0_f_res_212189 = defunc_0_add_arg_212191;\n                    }\n                    \n                    float x_212192 = a0_212166 * tmp4_212188;\n                    float defunc_9_fit_fun_res_212193 = defunc_0_f_res_212189 *\n                          x_212192;\n                    float defunc_1_op_res_212170 = defunc_9_fit_fun_res_212193 +\n                          redout_221431;\n                    float redout_tmp_227513 = defunc_1_op_res_212170;\n                    \n                    redout_221431 = redout_tmp_227513;\n                }\n                defunc_2_reduce_res_212167 = redout_221431;\n                ((__global float *) color_225074)[phys_tid_212132 + i_222",
                   "071 *\n                                                  num_threads_225201] =\n                    defunc_2_reduce_res_212167;\n            }\n            for (int64_t i_227514 = 0; i_227514 < l_n_m_196752; i_227514++) {\n                float tmp_227515;\n                \n                tmp_227515 = ((__global float *) color_225074)[phys_tid_212132 +\n                                                               i_227514 *\n                                                               num_threads_225201];\n                ((__global float *) mem_223643)[gtid_212131 + i_227514 *\n                                                m_196691] = tmp_227515;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_212127\n}\n__kernel void mainzisegmap_212517(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222468, __global\n                                  unsigned char *ext_mem_222469, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_223608, __global\n                                  unsigned char *mem_223648)\n{\n    #define segmap_group_sizze_212508 (mainzisegmap_group_sizze_212199)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227516;\n    int32_t local_tid_227517;\n    int64_t group_sizze_227520;\n    int32_t wave_sizze_227519;",
                   "\n    int32_t group_tid_227518;\n    \n    global_tid_227516 = get_global_id(0);\n    local_tid_227517 = get_local_id(0);\n    group_sizze_227520 = get_local_size(0);\n    wave_sizze_227519 = LOCKSTEP_WIDTH;\n    group_tid_227518 = get_group_id(0);\n    \n    int32_t phys_tid_212517 = global_tid_227516;\n    int64_t global_tid_227521 = sext_i32_i64(group_tid_227518) *\n            segmap_group_sizze_212508 + sext_i32_i64(local_tid_227517);\n    int64_t slice_227522 = l_n_m_196752;\n    int64_t slice_227523 = m_196691 * slice_227522;\n    int64_t gtid_212515 = squot64(global_tid_227521, slice_227522);\n    int64_t remnant_227524 = global_tid_227521 - gtid_212515 * slice_227522;\n    int64_t gtid_212516 = remnant_227524;\n    int64_t remnant_227525 = remnant_227524 - gtid_212516;\n    \n    if (slt64(gtid_212515, m_196691) && slt64(gtid_212516, l_n_m_196752)) {\n        int64_t x_212521;\n        \n        x_212521 = ((__global int64_t *) ext_mem_222469)[gtid_212515 *\n                                                         l_n_m_196752 +\n                                                         gtid_212516];\n        \n        float x_212522;\n        \n        x_212522 = ((__global float *) ext_mem_222468)[gtid_212515 *\n                                                       l_n_m_196752 +\n                                                       gtid_212516];\n        \n        int64_t min_arg_212523 = mul64(jump_t_196702, gtid_212516);\n        int64_t min_res_212524 = smin64(i_196779, min_arg_212523);\n        int64_t defunc_0_g_res_212525 = add64((int64_t) 1, min_res_212524);\n        float defunc_2_reduce_res_212526;\n        float redout_221437 = 0.0F;\n        \n        for (int64_t i_221438 = 0; i_221438 < q_l_196697; i_221438++) {\n            bool cond_212531 = sle64(n_196692, i_221438);\n            int64_t defunc_0_f_res_212532;\n            \n            if (cond_212531) {\n                defunc_0_f_res_212532 = (int64_t) 0;\n            } else {\n                int64_t i_212533 = add64(x_212521,",
                   " i_221438);\n                int64_t defunc_1_add_res_212534 = add64((int64_t) 1, i_212533);\n                \n                defunc_0_f_res_212532 = defunc_1_add_res_212534;\n            }\n            \n            float defunc_0_f_res_212535;\n            \n            if (cond_212531) {\n                defunc_0_f_res_212535 = 0.0F;\n            } else {\n                int64_t i_212536 = add64(x_212521, i_221438);\n                float defunc_0_add_arg_212537;\n                \n                defunc_0_add_arg_212537 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_212515 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_212536 *\n                                                                        ctx_param_ext_222548)];\n                defunc_0_f_res_212535 = defunc_0_add_arg_212537;\n            }\n            \n            int64_t binop_p_212538 = sub64(defunc_0_f_res_212532,\n                                           defunc_0_g_res_212525);\n            float defunc_0_f_res_212539 = sitofp_i64_f32(binop_p_212538);\n            float abs_res_212540 = (float) fabs(defunc_0_f_res_212539);\n            float tmp1_212541 = abs_res_212540 / x_212522;\n            float x_212542 = tmp1_212541 * tmp1_212541;\n            float y_212543 = tmp1_212541 * x_212542;\n            float tmp2_212544 = 1.0F - y_212543;\n            float x_212545 = tmp2_212544 * tmp2_212544;\n            float tmp3_212546 = tmp2_212544 * x_212545;\n            float w_j_212547 = defunc_0_f_res_212535 * tmp3_212546;\n            float defunc_1_op_res_212529 = w_j_212547 + redout_221437;\n            float redout_tmp_227526 = defunc_1_op_res_212529;\n            \n            redout_221437 = redout_tmp_227526;\n        }\n        defunc_2_reduce_res_212526 = redout",
                   "_221437;\n        \n        float a0_212548 = 1.0F / defunc_2_reduce_res_212526;\n        float defunc_2_reduce_res_212549;\n        float redout_221439 = 0.0F;\n        \n        for (int64_t i_221440 = 0; i_221440 < q_l_196697; i_221440++) {\n            bool cond_212554 = sle64(n_196692, i_221440);\n            int64_t defunc_0_f_res_212555;\n            \n            if (cond_212554) {\n                defunc_0_f_res_212555 = (int64_t) 0;\n            } else {\n                int64_t i_212556 = add64(x_212521, i_221440);\n                int64_t defunc_1_add_res_212557 = add64((int64_t) 1, i_212556);\n                \n                defunc_0_f_res_212555 = defunc_1_add_res_212557;\n            }\n            \n            float defunc_0_f_res_212558;\n            \n            if (cond_212554) {\n                defunc_0_f_res_212558 = 0.0F;\n            } else {\n                int64_t i_212559 = add64(x_212521, i_221440);\n                float defunc_0_add_arg_212560;\n                \n                defunc_0_add_arg_212560 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_212515 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_212559 *\n                                                                        ctx_param_ext_222548)];\n                defunc_0_f_res_212558 = defunc_0_add_arg_212560;\n            }\n            \n            int64_t binop_p_212561 = sub64(defunc_0_f_res_212555,\n                                           defunc_0_g_res_212525);\n            float defunc_0_f_res_212562 = sitofp_i64_f32(binop_p_212561);\n            float abs_res_212563 = (float) fabs(defunc_0_f_res_212562);\n            float tmp1_212564 = abs_res_212563 / x_212522;\n            float x_212565 = tmp1_212564 * tmp1_212564;\n            float y_2",
                   "12566 = tmp1_212564 * x_212565;\n            float tmp2_212567 = 1.0F - y_212566;\n            float x_212568 = tmp2_212567 * tmp2_212567;\n            float tmp3_212569 = tmp2_212567 * x_212568;\n            float tmp4_212570 = defunc_0_f_res_212558 * tmp3_212569;\n            float defunc_0_f_res_212571;\n            \n            if (cond_212554) {\n                defunc_0_f_res_212571 = 0.0F;\n            } else {\n                int64_t i_212572 = add64(x_212521, i_221440);\n                float defunc_0_add_arg_212573;\n                \n                defunc_0_add_arg_212573 = ((__global\n                                            float *) mem_223608)[gtid_212515 *\n                                                                 n_196692 +\n                                                                 i_212572];\n                defunc_0_f_res_212571 = defunc_0_add_arg_212573;\n            }\n            \n            float x_212574 = a0_212548 * tmp4_212570;\n            float defunc_9_fit_fun_res_212575 = defunc_0_f_res_212571 *\n                  x_212574;\n            float defunc_1_op_res_212552 = defunc_9_fit_fun_res_212575 +\n                  redout_221439;\n            float redout_tmp_227527 = defunc_1_op_res_212552;\n            \n            redout_221439 = redout_tmp_227527;\n        }\n        defunc_2_reduce_res_212549 = redout_221439;\n        ((__global float *) mem_223648)[gtid_212515 * l_n_m_196752 +\n                                        gtid_212516] =\n            defunc_2_reduce_res_212549;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_212508\n}\n__kernel void mainzisegmap_212634(__global int *global_failure,\n                                  int64_t m_196691, int64_t l_n_m_196752,\n                                  __global unsigned char *mem_223653, __global\n                                  unsigned char *mem_223658)\n{\n    #define segmap_group_sizze_212629 (mainzisegmap_group_sizze_212330)\n    \n    const int block_dim0 = 0;\n    const int bl",
                   "ock_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227600;\n    int32_t local_tid_227601;\n    int64_t group_sizze_227604;\n    int32_t wave_sizze_227603;\n    int32_t group_tid_227602;\n    \n    global_tid_227600 = get_global_id(0);\n    local_tid_227601 = get_local_id(0);\n    group_sizze_227604 = get_local_size(0);\n    wave_sizze_227603 = LOCKSTEP_WIDTH;\n    group_tid_227602 = get_group_id(0);\n    \n    int32_t phys_tid_212634 = global_tid_227600;\n    int64_t global_tid_227605 = sext_i32_i64(group_tid_227602) *\n            segmap_group_sizze_212629 + sext_i32_i64(local_tid_227601);\n    int64_t slice_227606 = l_n_m_196752;\n    int64_t slice_227607 = m_196691 * slice_227606;\n    int64_t gtid_212632 = squot64(global_tid_227605, slice_227606);\n    int64_t remnant_227608 = global_tid_227605 - gtid_212632 * slice_227606;\n    int64_t gtid_212633 = remnant_227608;\n    int64_t remnant_227609 = remnant_227608 - gtid_212633;\n    \n    if (slt64(gtid_212632, m_196691) && slt64(gtid_212633, l_n_m_196752)) {\n        float defunc_2_reduce_res_212635;\n        \n        defunc_2_reduce_res_212635 = ((__global\n                                       float *) mem_223653)[gtid_212632 *\n                                                            l_n_m_196752 +\n                                                            gtid_212633];\n        \n        float a0_212636 = 1.0F / defunc_2_reduce_res_212635;\n        \n        ((__global float *) mem_223658)[gtid_212632 * l_n_m_196752 +\n                                        gtid_212633] = a0_212636;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_212629\n}\n__kernel void mainzisegmap_212795(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                              ",
                   "    int64_t num_groups_212790,\n                                  int64_t num_threads_225207, __global\n                                  unsigned char *mem_223673, __global\n                                  unsigned char *mem_223676, __global\n                                  unsigned char *mem_223679, __global\n                                  unsigned char *mem_223682, __global\n                                  unsigned char *mem_223716, __global\n                                  unsigned char *mem_223719, __global\n                                  unsigned char *color_225075, __global\n                                  unsigned char *color_225076)\n{\n    #define segmap_group_sizze_212789 (mainzisegmap_group_sizze_212691)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227699;\n    int32_t local_tid_227700;\n    int64_t group_sizze_227703;\n    int32_t wave_sizze_227702;\n    int32_t group_tid_227701;\n    \n    global_tid_227699 = get_global_id(0);\n    local_tid_227700 = get_local_id(0);\n    group_sizze_227703 = get_local_size(0);\n    wave_sizze_227702 = LOCKSTEP_WIDTH;\n    group_tid_227701 = get_group_id(0);\n    \n    int32_t phys_tid_212795 = global_tid_227699;\n    int32_t phys_group_id_227704;\n    \n    phys_group_id_227704 = get_group_id(0);\n    for (int32_t i_227705 = 0; i_227705 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_212789)) -\n                   phys_group_id_227704, sext_i64_i32(num_groups_212790));\n         i_227705++) {\n        int32_t virt_group_id_227706 = phys_group_id_227704 + i_227705 *\n                sext_i64_i32(num_groups_212790);\n        int64_t global_tid_227707 = sext_i32_i64(virt_group_id_227706) *\n                segmap_group_sizze_212789 + sext_i32_i64(local_tid_227700);\n        int64_t slice_227708 = m_196691;\n        int64_t gtid_212794 = global_tid",
                   "_227707;\n        int64_t remnant_227709 = global_tid_227707 - gtid_212794;\n        \n        if (slt64(gtid_212794, m_196691)) {\n            for (int64_t i_222077 = 0; i_222077 < l_n_m_196752; i_222077++) {\n                int64_t x_212803;\n                \n                x_212803 = ((__global int64_t *) mem_223673)[i_222077 *\n                                                             m_196691 +\n                                                             gtid_212794];\n                \n                float x_212804;\n                \n                x_212804 = ((__global float *) mem_223676)[i_222077 * m_196691 +\n                                                           gtid_212794];\n                \n                int64_t min_arg_212805 = mul64(jump_t_196702, i_222077);\n                int64_t min_res_212806 = smin64(i_196779, min_arg_212805);\n                int64_t defunc_0_g_res_212807 = add64((int64_t) 1,\n                                                      min_res_212806);\n                float defunc_2_reduce_res_212808;\n                float defunc_2_reduce_res_212809;\n                float defunc_2_reduce_res_212810;\n                float redout_221453;\n                float redout_221454;\n                float redout_221455;\n                \n                redout_221453 = 0.0F;\n                redout_221454 = 0.0F;\n                redout_221455 = 0.0F;\n                for (int64_t i_221456 = 0; i_221456 < q_l_196697; i_221456++) {\n                    bool cond_212821 = sle64(n_196692, i_221456);\n                    int64_t defunc_0_f_res_212822;\n                    \n                    if (cond_212821) {\n                        defunc_0_f_res_212822 = (int64_t) 0;\n                    } else {\n                        int64_t i_212823 = add64(x_212803, i_221456);\n                        int64_t defunc_1_add_res_212824 = add64((int64_t) 1,\n                                                                i_212823);\n                        \n               ",
                   "         defunc_0_f_res_212822 = defunc_1_add_res_212824;\n                    }\n                    \n                    float defunc_0_f_res_212825;\n                    \n                    if (cond_212821) {\n                        defunc_0_f_res_212825 = 0.0F;\n                    } else {\n                        int64_t i_212826 = add64(x_212803, i_221456);\n                        float defunc_0_add_arg_212827;\n                        \n                        defunc_0_add_arg_212827 = ((__global\n                                                    float *) mem_223679)[i_212826 *\n                                                                         m_196691 +\n                                                                         gtid_212794];\n                        defunc_0_f_res_212825 = defunc_0_add_arg_212827;\n                    }\n                    \n                    int64_t binop_p_212828 = sub64(defunc_0_f_res_212822,\n                                                   defunc_0_g_res_212807);\n                    float defunc_0_f_res_212829 =\n                          sitofp_i64_f32(binop_p_212828);\n                    float abs_res_212830 = (float) fabs(defunc_0_f_res_212829);\n                    float tmp1_212831 = abs_res_212830 / x_212804;\n                    float x_212832 = tmp1_212831 * tmp1_212831;\n                    float y_212833 = tmp1_212831 * x_212832;\n                    float tmp2_212834 = 1.0F - y_212833;\n                    float x_212835 = tmp2_212834 * tmp2_212834;\n                    float tmp3_212836 = tmp2_212834 * x_212835;\n                    float w_j_212837 = defunc_0_f_res_212825 * tmp3_212836;\n                    float xw_j_212838 = defunc_0_f_res_212829 * w_j_212837;\n                    float x2w_j_212839 = defunc_0_f_res_212829 * xw_j_212838;\n                    float defunc_1_op_res_212813 = w_j_212837 + redout_221453;\n                    float defunc_1_op_res_212816 = xw_j_212838 + redout_221454;\n                    fl",
                   "oat defunc_1_op_res_212819 = x2w_j_212839 + redout_221455;\n                    float redout_tmp_227712 = defunc_1_op_res_212813;\n                    float redout_tmp_227713 = defunc_1_op_res_212816;\n                    float redout_tmp_227714 = defunc_1_op_res_212819;\n                    \n                    redout_221453 = redout_tmp_227712;\n                    redout_221454 = redout_tmp_227713;\n                    redout_221455 = redout_tmp_227714;\n                }\n                defunc_2_reduce_res_212808 = redout_221453;\n                defunc_2_reduce_res_212809 = redout_221454;\n                defunc_2_reduce_res_212810 = redout_221455;\n                \n                float x_212840 = defunc_2_reduce_res_212808 *\n                      defunc_2_reduce_res_212810;\n                float y_212841 = defunc_2_reduce_res_212809 *\n                      defunc_2_reduce_res_212809;\n                float y_212842 = x_212840 - y_212841;\n                float det1_212843 = 1.0F / y_212842;\n                float a11_212844 = defunc_2_reduce_res_212810 * det1_212843;\n                float x_212845 = 0.0F - defunc_2_reduce_res_212809;\n                float b11_212846 = det1_212843 * x_212845;\n                float c11_212847 = defunc_2_reduce_res_212808 * det1_212843;\n                float defunc_2_reduce_res_212848;\n                float defunc_2_reduce_res_212849;\n                float redout_221457;\n                float redout_221458;\n                \n                redout_221457 = 0.0F;\n                redout_221458 = 0.0F;\n                for (int64_t i_221459 = 0; i_221459 < q_l_196697; i_221459++) {\n                    bool cond_212857 = sle64(n_196692, i_221459);\n                    int64_t defunc_0_f_res_212858;\n                    \n                    if (cond_212857) {\n                        defunc_0_f_res_212858 = (int64_t) 0;\n                    } else {\n                        int64_t i_212859 = add64(x_212803, i_221459);\n                        int64_t de",
                   "func_1_add_res_212860 = add64((int64_t) 1,\n                                                                i_212859);\n                        \n                        defunc_0_f_res_212858 = defunc_1_add_res_212860;\n                    }\n                    \n                    float defunc_0_f_res_212861;\n                    \n                    if (cond_212857) {\n                        defunc_0_f_res_212861 = 0.0F;\n                    } else {\n                        int64_t i_212862 = add64(x_212803, i_221459);\n                        float defunc_0_add_arg_212863;\n                        \n                        defunc_0_add_arg_212863 = ((__global\n                                                    float *) mem_223679)[i_212862 *\n                                                                         m_196691 +\n                                                                         gtid_212794];\n                        defunc_0_f_res_212861 = defunc_0_add_arg_212863;\n                    }\n                    \n                    int64_t binop_p_212864 = sub64(defunc_0_f_res_212858,\n                                                   defunc_0_g_res_212807);\n                    float defunc_0_f_res_212865 =\n                          sitofp_i64_f32(binop_p_212864);\n                    float abs_res_212866 = (float) fabs(defunc_0_f_res_212865);\n                    float tmp1_212867 = abs_res_212866 / x_212804;\n                    float x_212868 = tmp1_212867 * tmp1_212867;\n                    float y_212869 = tmp1_212867 * x_212868;\n                    float tmp2_212870 = 1.0F - y_212869;\n                    float x_212871 = tmp2_212870 * tmp2_212870;\n                    float tmp3_212872 = tmp2_212870 * x_212871;\n                    float tmp4_212873 = defunc_0_f_res_212861 * tmp3_212872;\n                    float defunc_1_f_res_212874 = defunc_0_f_res_212865 *\n                          tmp4_212873;\n                    float defunc_0_f_res_212875;\n              ",
                   "      \n                    if (cond_212857) {\n                        defunc_0_f_res_212875 = 0.0F;\n                    } else {\n                        int64_t i_212876 = add64(x_212803, i_221459);\n                        float defunc_0_add_arg_212877;\n                        \n                        defunc_0_add_arg_212877 = ((__global\n                                                    float *) mem_223682)[i_212876 *\n                                                                         m_196691 +\n                                                                         gtid_212794];\n                        defunc_0_f_res_212875 = defunc_0_add_arg_212877;\n                    }\n                    \n                    float x_212878 = a11_212844 * tmp4_212873;\n                    float y_212879 = b11_212846 * defunc_1_f_res_212874;\n                    float x_212880 = x_212878 + y_212879;\n                    float defunc_9_fit_fun_res_212881 = defunc_0_f_res_212875 *\n                          x_212880;\n                    float x_212882 = b11_212846 * tmp4_212873;\n                    float y_212883 = c11_212847 * defunc_1_f_res_212874;\n                    float x_212884 = x_212882 + y_212883;\n                    float defunc_9_slope_fun_res_212885 =\n                          defunc_0_f_res_212875 * x_212884;\n                    float defunc_1_op_res_212852 = defunc_9_fit_fun_res_212881 +\n                          redout_221457;\n                    float defunc_1_op_res_212855 =\n                          defunc_9_slope_fun_res_212885 + redout_221458;\n                    float redout_tmp_227715 = defunc_1_op_res_212852;\n                    float redout_tmp_227716 = defunc_1_op_res_212855;\n                    \n                    redout_221457 = redout_tmp_227715;\n                    redout_221458 = redout_tmp_227716;\n                }\n                defunc_2_reduce_res_212848 = redout_221457;\n                defunc_2_reduce_res_212849 = redout_221458;\n            ",
                   "    ((__global float *) color_225076)[phys_tid_212795 + i_222077 *\n                                                  num_threads_225207] =\n                    defunc_2_reduce_res_212848;\n                ((__global float *) color_225075)[phys_tid_212795 + i_222077 *\n                                                  num_threads_225207] =\n                    defunc_2_reduce_res_212849;\n            }\n            for (int64_t i_227717 = 0; i_227717 < l_n_m_196752; i_227717++) {\n                float tmp_227718;\n                \n                tmp_227718 = ((__global float *) color_225076)[phys_tid_212795 +\n                                                               i_227717 *\n                                                               num_threads_225207];\n                ((__global float *) mem_223716)[gtid_212794 + i_227717 *\n                                                m_196691] = tmp_227718;\n            }\n            for (int64_t i_227719 = 0; i_227719 < l_n_m_196752; i_227719++) {\n                float tmp_227720;\n                \n                tmp_227720 = ((__global float *) color_225075)[phys_tid_212795 +\n                                                               i_227719 *\n                                                               num_threads_225207];\n                ((__global float *) mem_223719)[gtid_212794 + i_227719 *\n                                                m_196691] = tmp_227720;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_212789\n}\n__kernel void mainzisegmap_213316(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_e",
                   "xt_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222468, __global\n                                  unsigned char *ext_mem_222469, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_223608, __global\n                                  unsigned char *mem_223724, __global\n                                  unsigned char *mem_223728)\n{\n    #define segmap_group_sizze_213305 (mainzisegmap_group_sizze_212891)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227721;\n    int32_t local_tid_227722;\n    int64_t group_sizze_227725;\n    int32_t wave_sizze_227724;\n    int32_t group_tid_227723;\n    \n    global_tid_227721 = get_global_id(0);\n    local_tid_227722 = get_local_id(0);\n    group_sizze_227725 = get_local_size(0);\n    wave_sizze_227724 = LOCKSTEP_WIDTH;\n    group_tid_227723 = get_group_id(0);\n    \n    int32_t phys_tid_213316 = global_tid_227721;\n    int64_t global_tid_227726 = sext_i32_i64(group_tid_227723) *\n            segmap_group_sizze_213305 + sext_i32_i64(local_tid_227722);\n    int64_t slice_227727 = l_n_m_196752;\n    int64_t slice_227728 = m_196691 * slice_227727;\n    int64_t gtid_213314 = squot64(global_tid_227726, slice_227727);\n    int64_t remnant_227729 = global_tid_227726 - gtid_213314 * slice_227727;\n    int64_t gtid_213315 = remnant_227729;\n    int64_t remnant_227730 = remnant_227729 - gtid_213315;\n    \n    if (slt64(gtid_213314, m_196691) && slt64(gtid_213315, l_n_m_196752)) {\n        int64_t x_213320;\n        \n        x_213320 = ((__global int64_t *) ext_mem_222469)[gtid_213314 *\n                                                         l_n_m_196752 +\n                                                         gtid_213315];\n        \n        float x_213321;\n        ",
                   "\n        x_213321 = ((__global float *) ext_mem_222468)[gtid_213314 *\n                                                       l_n_m_196752 +\n                                                       gtid_213315];\n        \n        int64_t min_arg_213322 = mul64(jump_t_196702, gtid_213315);\n        int64_t min_res_213323 = smin64(i_196779, min_arg_213322);\n        int64_t defunc_0_g_res_213324 = add64((int64_t) 1, min_res_213323);\n        float defunc_2_reduce_res_213325;\n        float defunc_2_reduce_res_213326;\n        float defunc_2_reduce_res_213327;\n        float redout_221464;\n        float redout_221465;\n        float redout_221466;\n        \n        redout_221464 = 0.0F;\n        redout_221465 = 0.0F;\n        redout_221466 = 0.0F;\n        for (int64_t i_221467 = 0; i_221467 < q_l_196697; i_221467++) {\n            bool cond_213338 = sle64(n_196692, i_221467);\n            int64_t defunc_0_f_res_213339;\n            \n            if (cond_213338) {\n                defunc_0_f_res_213339 = (int64_t) 0;\n            } else {\n                int64_t i_213340 = add64(x_213320, i_221467);\n                int64_t defunc_1_add_res_213341 = add64((int64_t) 1, i_213340);\n                \n                defunc_0_f_res_213339 = defunc_1_add_res_213341;\n            }\n            \n            float defunc_0_f_res_213342;\n            \n            if (cond_213338) {\n                defunc_0_f_res_213342 = 0.0F;\n            } else {\n                int64_t i_213343 = add64(x_213320, i_221467);\n                float defunc_0_add_arg_213344;\n                \n                defunc_0_add_arg_213344 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_213314 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_213343 *\n                            ",
                   "                                            ctx_param_ext_222548)];\n                defunc_0_f_res_213342 = defunc_0_add_arg_213344;\n            }\n            \n            int64_t binop_p_213345 = sub64(defunc_0_f_res_213339,\n                                           defunc_0_g_res_213324);\n            float defunc_0_f_res_213346 = sitofp_i64_f32(binop_p_213345);\n            float abs_res_213347 = (float) fabs(defunc_0_f_res_213346);\n            float tmp1_213348 = abs_res_213347 / x_213321;\n            float x_213349 = tmp1_213348 * tmp1_213348;\n            float y_213350 = tmp1_213348 * x_213349;\n            float tmp2_213351 = 1.0F - y_213350;\n            float x_213352 = tmp2_213351 * tmp2_213351;\n            float tmp3_213353 = tmp2_213351 * x_213352;\n            float w_j_213354 = defunc_0_f_res_213342 * tmp3_213353;\n            float xw_j_213355 = defunc_0_f_res_213346 * w_j_213354;\n            float x2w_j_213356 = defunc_0_f_res_213346 * xw_j_213355;\n            float defunc_1_op_res_213330 = w_j_213354 + redout_221464;\n            float defunc_1_op_res_213333 = xw_j_213355 + redout_221465;\n            float defunc_1_op_res_213336 = x2w_j_213356 + redout_221466;\n            float redout_tmp_227731 = defunc_1_op_res_213330;\n            float redout_tmp_227732 = defunc_1_op_res_213333;\n            float redout_tmp_227733 = defunc_1_op_res_213336;\n            \n            redout_221464 = redout_tmp_227731;\n            redout_221465 = redout_tmp_227732;\n            redout_221466 = redout_tmp_227733;\n        }\n        defunc_2_reduce_res_213325 = redout_221464;\n        defunc_2_reduce_res_213326 = redout_221465;\n        defunc_2_reduce_res_213327 = redout_221466;\n        \n        float x_213357 = defunc_2_reduce_res_213325 *\n              defunc_2_reduce_res_213327;\n        float y_213358 = defunc_2_reduce_res_213326 *\n              defunc_2_reduce_res_213326;\n        float y_213359 = x_213357 - y_213358;\n        float det1_213360 = 1.0F / y_213359;\n        floa",
                   "t a11_213361 = defunc_2_reduce_res_213327 * det1_213360;\n        float x_213362 = 0.0F - defunc_2_reduce_res_213326;\n        float b11_213363 = det1_213360 * x_213362;\n        float c11_213364 = defunc_2_reduce_res_213325 * det1_213360;\n        float defunc_2_reduce_res_213365;\n        float defunc_2_reduce_res_213366;\n        float redout_221468;\n        float redout_221469;\n        \n        redout_221468 = 0.0F;\n        redout_221469 = 0.0F;\n        for (int64_t i_221470 = 0; i_221470 < q_l_196697; i_221470++) {\n            bool cond_213374 = sle64(n_196692, i_221470);\n            int64_t defunc_0_f_res_213375;\n            \n            if (cond_213374) {\n                defunc_0_f_res_213375 = (int64_t) 0;\n            } else {\n                int64_t i_213376 = add64(x_213320, i_221470);\n                int64_t defunc_1_add_res_213377 = add64((int64_t) 1, i_213376);\n                \n                defunc_0_f_res_213375 = defunc_1_add_res_213377;\n            }\n            \n            float defunc_0_f_res_213378;\n            \n            if (cond_213374) {\n                defunc_0_f_res_213378 = 0.0F;\n            } else {\n                int64_t i_213379 = add64(x_213320, i_221470);\n                float defunc_0_add_arg_213380;\n                \n                defunc_0_add_arg_213380 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_213314 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_213379 *\n                                                                        ctx_param_ext_222548)];\n                defunc_0_f_res_213378 = defunc_0_add_arg_213380;\n            }\n            \n            int64_t binop_p_213381 = sub64(defunc_0_f_res_213375,\n                                           defunc_0_g_res_213324);\n",
                   "            float defunc_0_f_res_213382 = sitofp_i64_f32(binop_p_213381);\n            float abs_res_213383 = (float) fabs(defunc_0_f_res_213382);\n            float tmp1_213384 = abs_res_213383 / x_213321;\n            float x_213385 = tmp1_213384 * tmp1_213384;\n            float y_213386 = tmp1_213384 * x_213385;\n            float tmp2_213387 = 1.0F - y_213386;\n            float x_213388 = tmp2_213387 * tmp2_213387;\n            float tmp3_213389 = tmp2_213387 * x_213388;\n            float tmp4_213390 = defunc_0_f_res_213378 * tmp3_213389;\n            float defunc_1_f_res_213391 = defunc_0_f_res_213382 * tmp4_213390;\n            float defunc_0_f_res_213392;\n            \n            if (cond_213374) {\n                defunc_0_f_res_213392 = 0.0F;\n            } else {\n                int64_t i_213393 = add64(x_213320, i_221470);\n                float defunc_0_add_arg_213394;\n                \n                defunc_0_add_arg_213394 = ((__global\n                                            float *) mem_223608)[gtid_213314 *\n                                                                 n_196692 +\n                                                                 i_213393];\n                defunc_0_f_res_213392 = defunc_0_add_arg_213394;\n            }\n            \n            float x_213395 = a11_213361 * tmp4_213390;\n            float y_213396 = b11_213363 * defunc_1_f_res_213391;\n            float x_213397 = x_213395 + y_213396;\n            float defunc_9_fit_fun_res_213398 = defunc_0_f_res_213392 *\n                  x_213397;\n            float x_213399 = b11_213363 * tmp4_213390;\n            float y_213400 = c11_213364 * defunc_1_f_res_213391;\n            float x_213401 = x_213399 + y_213400;\n            float defunc_9_slope_fun_res_213402 = defunc_0_f_res_213392 *\n                  x_213401;\n            float defunc_1_op_res_213369 = defunc_9_fit_fun_res_213398 +\n                  redout_221468;\n            float defunc_1_op_res_213372 = defunc_9_slope_fun_res_213402 +\n",
                   "                  redout_221469;\n            float redout_tmp_227734 = defunc_1_op_res_213369;\n            float redout_tmp_227735 = defunc_1_op_res_213372;\n            \n            redout_221468 = redout_tmp_227734;\n            redout_221469 = redout_tmp_227735;\n        }\n        defunc_2_reduce_res_213365 = redout_221468;\n        defunc_2_reduce_res_213366 = redout_221469;\n        ((__global float *) mem_223724)[gtid_213314 * l_n_m_196752 +\n                                        gtid_213315] =\n            defunc_2_reduce_res_213365;\n        ((__global float *) mem_223728)[gtid_213314 * l_n_m_196752 +\n                                        gtid_213315] =\n            defunc_2_reduce_res_213366;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_213305\n}\n__kernel void mainzisegmap_213473(__global int *global_failure,\n                                  int64_t m_196691, int64_t l_n_m_196752,\n                                  __global unsigned char *mem_223733, __global\n                                  unsigned char *mem_223737, __global\n                                  unsigned char *mem_223741, __global\n                                  unsigned char *mem_223746, __global\n                                  unsigned char *mem_223750, __global\n                                  unsigned char *mem_223754)\n{\n    #define segmap_group_sizze_213466 (mainzisegmap_group_sizze_213073)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227836;\n    int32_t local_tid_227837;\n    int64_t group_sizze_227840;\n    int32_t wave_sizze_227839;\n    int32_t group_tid_227838;\n    \n    global_tid_227836 = get_global_id(0);\n    local_tid_227837 = get_local_id(0);\n    group_sizze_227840 = get_local_size(0);\n    wave_sizze_227839 = LOCKSTEP_WIDTH;\n    group_tid_227838 = get_group_id(0);\n    \n    int32_t phys_tid_213473 = global_tid_227836;\n    int64_t global_",
                   "tid_227841 = sext_i32_i64(group_tid_227838) *\n            segmap_group_sizze_213466 + sext_i32_i64(local_tid_227837);\n    int64_t slice_227842 = l_n_m_196752;\n    int64_t slice_227843 = m_196691 * slice_227842;\n    int64_t gtid_213471 = squot64(global_tid_227841, slice_227842);\n    int64_t remnant_227844 = global_tid_227841 - gtid_213471 * slice_227842;\n    int64_t gtid_213472 = remnant_227844;\n    int64_t remnant_227845 = remnant_227844 - gtid_213472;\n    \n    if (slt64(gtid_213471, m_196691) && slt64(gtid_213472, l_n_m_196752)) {\n        float defunc_2_reduce_res_213474;\n        \n        defunc_2_reduce_res_213474 = ((__global\n                                       float *) mem_223733)[gtid_213471 *\n                                                            l_n_m_196752 +\n                                                            gtid_213472];\n        \n        float defunc_2_reduce_res_213475;\n        \n        defunc_2_reduce_res_213475 = ((__global\n                                       float *) mem_223737)[gtid_213471 *\n                                                            l_n_m_196752 +\n                                                            gtid_213472];\n        \n        float defunc_2_reduce_res_213476;\n        \n        defunc_2_reduce_res_213476 = ((__global\n                                       float *) mem_223741)[gtid_213471 *\n                                                            l_n_m_196752 +\n                                                            gtid_213472];\n        \n        float x_213477 = defunc_2_reduce_res_213474 *\n              defunc_2_reduce_res_213476;\n        float y_213478 = defunc_2_reduce_res_213475 *\n              defunc_2_reduce_res_213475;\n        float y_213479 = x_213477 - y_213478;\n        float det1_213480 = 1.0F / y_213479;\n        float a11_213481 = defunc_2_reduce_res_213476 * det1_213480;\n        float x_213482 = 0.0F - defunc_2_reduce_res_213475;\n        float b11_213483 = det1_213480 * x_213482;\n      ",
                   "  float c11_213484 = defunc_2_reduce_res_213474 * det1_213480;\n        \n        ((__global float *) mem_223746)[gtid_213471 * l_n_m_196752 +\n                                        gtid_213472] = a11_213481;\n        ((__global float *) mem_223750)[gtid_213471 * l_n_m_196752 +\n                                        gtid_213472] = b11_213483;\n        ((__global float *) mem_223754)[gtid_213471 * l_n_m_196752 +\n                                        gtid_213472] = c11_213484;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_213466\n}\n__kernel void mainzisegmap_213692(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                                  int64_t num_groups_213687,\n                                  int64_t num_threads_225214, __global\n                                  unsigned char *mem_223780, __global\n                                  unsigned char *mem_223783, __global\n                                  unsigned char *mem_223786, __global\n                                  unsigned char *mem_223789, __global\n                                  unsigned char *mem_223823, __global\n                                  unsigned char *mem_223826, __global\n                                  unsigned char *color_225077, __global\n                                  unsigned char *color_225078)\n{\n    #define segmap_group_sizze_213686 (mainzisegmap_group_sizze_213556)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227949;\n    int32_t local_tid_227950;\n    int64_t group_sizze_227953;\n    int32_t wave_sizze_227952;\n    int32_t group_tid_227951;\n    \n    global_tid_227949 = get_global_id(0);\n    local_tid_227950 = get_local_id(0);\n    group",
                   "_sizze_227953 = get_local_size(0);\n    wave_sizze_227952 = LOCKSTEP_WIDTH;\n    group_tid_227951 = get_group_id(0);\n    \n    int32_t phys_tid_213692 = global_tid_227949;\n    int32_t phys_group_id_227954;\n    \n    phys_group_id_227954 = get_group_id(0);\n    for (int32_t i_227955 = 0; i_227955 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_213686)) -\n                   phys_group_id_227954, sext_i64_i32(num_groups_213687));\n         i_227955++) {\n        int32_t virt_group_id_227956 = phys_group_id_227954 + i_227955 *\n                sext_i64_i32(num_groups_213687);\n        int64_t global_tid_227957 = sext_i32_i64(virt_group_id_227956) *\n                segmap_group_sizze_213686 + sext_i32_i64(local_tid_227950);\n        int64_t slice_227958 = m_196691;\n        int64_t gtid_213691 = global_tid_227957;\n        int64_t remnant_227959 = global_tid_227957 - gtid_213691;\n        \n        if (slt64(gtid_213691, m_196691)) {\n            for (int64_t i_222084 = 0; i_222084 < l_n_m_196752; i_222084++) {\n                int64_t x_213700;\n                \n                x_213700 = ((__global int64_t *) mem_223780)[i_222084 *\n                                                             m_196691 +\n                                                             gtid_213691];\n                \n                float x_213701;\n                \n                x_213701 = ((__global float *) mem_223783)[i_222084 * m_196691 +\n                                                           gtid_213691];\n                \n                int64_t min_arg_213702 = mul64(jump_t_196702, i_222084);\n                int64_t min_res_213703 = smin64(i_196779, min_arg_213702);\n                int64_t defunc_0_g_res_213704 = add64((int64_t) 1,\n                                                      min_res_213703);\n                float defunc_2_reduce_res_213705;\n                float defunc_2_reduce_res_213706;\n                float defunc_2_re",
                   "duce_res_213707;\n                float defunc_2_reduce_res_213708;\n                float defunc_2_reduce_res_213709;\n                float redout_221483;\n                float redout_221484;\n                float redout_221485;\n                float redout_221486;\n                float redout_221487;\n                \n                redout_221483 = 0.0F;\n                redout_221484 = 0.0F;\n                redout_221485 = 0.0F;\n                redout_221486 = 0.0F;\n                redout_221487 = 0.0F;\n                for (int64_t i_221488 = 0; i_221488 < q_l_196697; i_221488++) {\n                    bool cond_213726 = sle64(n_196692, i_221488);\n                    int64_t defunc_0_f_res_213727;\n                    \n                    if (cond_213726) {\n                        defunc_0_f_res_213727 = (int64_t) 0;\n                    } else {\n                        int64_t i_213728 = add64(x_213700, i_221488);\n                        int64_t defunc_1_add_res_213729 = add64((int64_t) 1,\n                                                                i_213728);\n                        \n                        defunc_0_f_res_213727 = defunc_1_add_res_213729;\n                    }\n                    \n                    float defunc_0_f_res_213730;\n                    \n                    if (cond_213726) {\n                        defunc_0_f_res_213730 = 0.0F;\n                    } else {\n                        int64_t i_213731 = add64(x_213700, i_221488);\n                        float defunc_0_add_arg_213732;\n                        \n                        defunc_0_add_arg_213732 = ((__global\n                                                    float *) mem_223786)[i_213731 *\n                                                                         m_196691 +\n                                                                         gtid_213691];\n                        defunc_0_f_res_213730 = defunc_0_add_arg_213732;\n                    }\n                    \n       ",
                   "             int64_t binop_p_213733 = sub64(defunc_0_f_res_213727,\n                                                   defunc_0_g_res_213704);\n                    float defunc_0_f_res_213734 =\n                          sitofp_i64_f32(binop_p_213733);\n                    float abs_res_213735 = (float) fabs(defunc_0_f_res_213734);\n                    float tmp1_213736 = abs_res_213735 / x_213701;\n                    float x_213737 = tmp1_213736 * tmp1_213736;\n                    float y_213738 = tmp1_213736 * x_213737;\n                    float tmp2_213739 = 1.0F - y_213738;\n                    float x_213740 = tmp2_213739 * tmp2_213739;\n                    float tmp3_213741 = tmp2_213739 * x_213740;\n                    float w_j_213742 = defunc_0_f_res_213730 * tmp3_213741;\n                    float xw_j_213743 = defunc_0_f_res_213734 * w_j_213742;\n                    float x2w_j_213744 = defunc_0_f_res_213734 * xw_j_213743;\n                    float x3w_j_213745 = defunc_0_f_res_213734 * x2w_j_213744;\n                    float x4w_j_213746 = defunc_0_f_res_213734 * x3w_j_213745;\n                    float defunc_1_op_res_213712 = w_j_213742 + redout_221483;\n                    float defunc_1_op_res_213715 = xw_j_213743 + redout_221484;\n                    float defunc_1_op_res_213718 = x2w_j_213744 + redout_221485;\n                    float defunc_1_op_res_213721 = x3w_j_213745 + redout_221486;\n                    float defunc_1_op_res_213724 = x4w_j_213746 + redout_221487;\n                    float redout_tmp_227962 = defunc_1_op_res_213712;\n                    float redout_tmp_227963 = defunc_1_op_res_213715;\n                    float redout_tmp_227964 = defunc_1_op_res_213718;\n                    float redout_tmp_227965 = defunc_1_op_res_213721;\n                    float redout_tmp_227966 = defunc_1_op_res_213724;\n                    \n                    redout_221483 = redout_tmp_227962;\n                    redout_221484 = redout_tmp_227963;\n                    re",
                   "dout_221485 = redout_tmp_227964;\n                    redout_221486 = redout_tmp_227965;\n                    redout_221487 = redout_tmp_227966;\n                }\n                defunc_2_reduce_res_213705 = redout_221483;\n                defunc_2_reduce_res_213706 = redout_221484;\n                defunc_2_reduce_res_213707 = redout_221485;\n                defunc_2_reduce_res_213708 = redout_221486;\n                defunc_2_reduce_res_213709 = redout_221487;\n                \n                float x_213747 = defunc_2_reduce_res_213707 *\n                      defunc_2_reduce_res_213709;\n                float y_213748 = defunc_2_reduce_res_213708 *\n                      defunc_2_reduce_res_213708;\n                float a12_213749 = x_213747 - y_213748;\n                float x_213750 = defunc_2_reduce_res_213707 *\n                      defunc_2_reduce_res_213708;\n                float y_213751 = defunc_2_reduce_res_213706 *\n                      defunc_2_reduce_res_213709;\n                float b12_213752 = x_213750 - y_213751;\n                float x_213753 = defunc_2_reduce_res_213706 *\n                      defunc_2_reduce_res_213708;\n                float y_213754 = defunc_2_reduce_res_213707 *\n                      defunc_2_reduce_res_213707;\n                float c12_213755 = x_213753 - y_213754;\n                float x_213756 = defunc_2_reduce_res_213705 *\n                      defunc_2_reduce_res_213709;\n                float b2_213757 = x_213756 - y_213754;\n                float x_213758 = defunc_2_reduce_res_213706 *\n                      defunc_2_reduce_res_213707;\n                float y_213759 = defunc_2_reduce_res_213705 *\n                      defunc_2_reduce_res_213708;\n                float c2_213760 = x_213758 - y_213759;\n                float x_213761 = defunc_2_reduce_res_213705 * a12_213749;\n                float y_213762 = defunc_2_reduce_res_213706 * b12_213752;\n                float x_213763 = x_213761 + y_213762;\n                float y_213764 = d",
                   "efunc_2_reduce_res_213707 * c12_213755;\n                float y_213765 = x_213763 + y_213764;\n                float det_213766 = 1.0F / y_213765;\n                float a12_213767 = a12_213749 * det_213766;\n                float b12_213768 = b12_213752 * det_213766;\n                float c12_213769 = c12_213755 * det_213766;\n                float b2_213770 = b2_213757 * det_213766;\n                float c2_213771 = c2_213760 * det_213766;\n                float defunc_2_reduce_res_213772;\n                float defunc_2_reduce_res_213773;\n                float redout_221489;\n                float redout_221490;\n                \n                redout_221489 = 0.0F;\n                redout_221490 = 0.0F;\n                for (int64_t i_221491 = 0; i_221491 < q_l_196697; i_221491++) {\n                    bool cond_213781 = sle64(n_196692, i_221491);\n                    int64_t defunc_0_f_res_213782;\n                    \n                    if (cond_213781) {\n                        defunc_0_f_res_213782 = (int64_t) 0;\n                    } else {\n                        int64_t i_213783 = add64(x_213700, i_221491);\n                        int64_t defunc_1_add_res_213784 = add64((int64_t) 1,\n                                                                i_213783);\n                        \n                        defunc_0_f_res_213782 = defunc_1_add_res_213784;\n                    }\n                    \n                    float defunc_0_f_res_213785;\n                    \n                    if (cond_213781) {\n                        defunc_0_f_res_213785 = 0.0F;\n                    } else {\n                        int64_t i_213786 = add64(x_213700, i_221491);\n                        float defunc_0_add_arg_213787;\n                        \n                        defunc_0_add_arg_213787 = ((__global\n                                                    float *) mem_223786)[i_213786 *\n                                                                         m_196691 +\n          ",
                   "                                                               gtid_213691];\n                        defunc_0_f_res_213785 = defunc_0_add_arg_213787;\n                    }\n                    \n                    int64_t binop_p_213788 = sub64(defunc_0_f_res_213782,\n                                                   defunc_0_g_res_213704);\n                    float defunc_0_f_res_213789 =\n                          sitofp_i64_f32(binop_p_213788);\n                    float abs_res_213790 = (float) fabs(defunc_0_f_res_213789);\n                    float tmp1_213791 = abs_res_213790 / x_213701;\n                    float x_213792 = tmp1_213791 * tmp1_213791;\n                    float y_213793 = tmp1_213791 * x_213792;\n                    float tmp2_213794 = 1.0F - y_213793;\n                    float x_213795 = tmp2_213794 * tmp2_213794;\n                    float tmp3_213796 = tmp2_213794 * x_213795;\n                    float tmp4_213797 = defunc_0_f_res_213785 * tmp3_213796;\n                    float defunc_1_f_res_213798 = defunc_0_f_res_213789 *\n                          tmp4_213797;\n                    float defunc_1_f_res_213799 = defunc_0_f_res_213789 *\n                          defunc_1_f_res_213798;\n                    float defunc_0_f_res_213800;\n                    \n                    if (cond_213781) {\n                        defunc_0_f_res_213800 = 0.0F;\n                    } else {\n                        int64_t i_213801 = add64(x_213700, i_221491);\n                        float defunc_0_add_arg_213802;\n                        \n                        defunc_0_add_arg_213802 = ((__global\n                                                    float *) mem_223789)[i_213801 *\n                                                                         m_196691 +\n                                                                         gtid_213691];\n                        defunc_0_f_res_213800 = defunc_0_add_arg_213802;\n                    }\n                    \n      ",
                   "              float x_213803 = a12_213767 * tmp4_213797;\n                    float y_213804 = b12_213768 * defunc_1_f_res_213798;\n                    float x_213805 = x_213803 + y_213804;\n                    float y_213806 = c12_213769 * defunc_1_f_res_213799;\n                    float x_213807 = x_213805 + y_213806;\n                    float defunc_9_fit_fun_res_213808 = defunc_0_f_res_213800 *\n                          x_213807;\n                    float x_213809 = b12_213768 * tmp4_213797;\n                    float y_213810 = b2_213770 * defunc_1_f_res_213798;\n                    float x_213811 = x_213809 + y_213810;\n                    float y_213812 = c2_213771 * defunc_1_f_res_213799;\n                    float x_213813 = x_213811 + y_213812;\n                    float defunc_9_slope_fun_res_213814 =\n                          defunc_0_f_res_213800 * x_213813;\n                    float defunc_1_op_res_213776 = defunc_9_fit_fun_res_213808 +\n                          redout_221489;\n                    float defunc_1_op_res_213779 =\n                          defunc_9_slope_fun_res_213814 + redout_221490;\n                    float redout_tmp_227967 = defunc_1_op_res_213776;\n                    float redout_tmp_227968 = defunc_1_op_res_213779;\n                    \n                    redout_221489 = redout_tmp_227967;\n                    redout_221490 = redout_tmp_227968;\n                }\n                defunc_2_reduce_res_213772 = redout_221489;\n                defunc_2_reduce_res_213773 = redout_221490;\n                ((__global float *) color_225078)[phys_tid_213692 + i_222084 *\n                                                  num_threads_225214] =\n                    defunc_2_reduce_res_213772;\n                ((__global float *) color_225077)[phys_tid_213692 + i_222084 *\n                                                  num_threads_225214] =\n                    defunc_2_reduce_res_213773;\n            }\n            for (int64_t i_227969 = 0; i_227969 < l_n_m_1",
                   "96752; i_227969++) {\n                float tmp_227970;\n                \n                tmp_227970 = ((__global float *) color_225078)[phys_tid_213692 +\n                                                               i_227969 *\n                                                               num_threads_225214];\n                ((__global float *) mem_223823)[gtid_213691 + i_227969 *\n                                                m_196691] = tmp_227970;\n            }\n            for (int64_t i_227971 = 0; i_227971 < l_n_m_196752; i_227971++) {\n                float tmp_227972;\n                \n                tmp_227972 = ((__global float *) color_225077)[phys_tid_213692 +\n                                                               i_227971 *\n                                                               num_threads_225214];\n                ((__global float *) mem_223826)[gtid_213691 + i_227971 *\n                                                m_196691] = tmp_227972;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_213686\n}\n__kernel void mainzisegmap_214361(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_l_196697, int64_t jump_t_196702,\n                                  int64_t l_n_m_196752, int64_t i_196779,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222468, __global\n                                  unsigned char *ext_mem_222469, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_223608, __global\n                                  unsigned char *mem_223831, __global\n         ",
                   "                         unsigned char *mem_223835)\n{\n    #define segmap_group_sizze_214350 (mainzisegmap_group_sizze_213820)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227973;\n    int32_t local_tid_227974;\n    int64_t group_sizze_227977;\n    int32_t wave_sizze_227976;\n    int32_t group_tid_227975;\n    \n    global_tid_227973 = get_global_id(0);\n    local_tid_227974 = get_local_id(0);\n    group_sizze_227977 = get_local_size(0);\n    wave_sizze_227976 = LOCKSTEP_WIDTH;\n    group_tid_227975 = get_group_id(0);\n    \n    int32_t phys_tid_214361 = global_tid_227973;\n    int64_t global_tid_227978 = sext_i32_i64(group_tid_227975) *\n            segmap_group_sizze_214350 + sext_i32_i64(local_tid_227974);\n    int64_t slice_227979 = l_n_m_196752;\n    int64_t slice_227980 = m_196691 * slice_227979;\n    int64_t gtid_214359 = squot64(global_tid_227978, slice_227979);\n    int64_t remnant_227981 = global_tid_227978 - gtid_214359 * slice_227979;\n    int64_t gtid_214360 = remnant_227981;\n    int64_t remnant_227982 = remnant_227981 - gtid_214360;\n    \n    if (slt64(gtid_214359, m_196691) && slt64(gtid_214360, l_n_m_196752)) {\n        int64_t x_214365;\n        \n        x_214365 = ((__global int64_t *) ext_mem_222469)[gtid_214359 *\n                                                         l_n_m_196752 +\n                                                         gtid_214360];\n        \n        float x_214366;\n        \n        x_214366 = ((__global float *) ext_mem_222468)[gtid_214359 *\n                                                       l_n_m_196752 +\n                                                       gtid_214360];\n        \n        int64_t min_arg_214367 = mul64(jump_t_196702, gtid_214360);\n        int64_t min_res_214368 = smin64(i_196779, min_arg_214367);\n        int64_t defunc_0_g_res_214369 = add64((int64_t) 1, min_res_214368);\n        float defunc_2_reduc",
                   "e_res_214370;\n        float defunc_2_reduce_res_214371;\n        float defunc_2_reduce_res_214372;\n        float defunc_2_reduce_res_214373;\n        float defunc_2_reduce_res_214374;\n        float redout_221496;\n        float redout_221497;\n        float redout_221498;\n        float redout_221499;\n        float redout_221500;\n        \n        redout_221496 = 0.0F;\n        redout_221497 = 0.0F;\n        redout_221498 = 0.0F;\n        redout_221499 = 0.0F;\n        redout_221500 = 0.0F;\n        for (int64_t i_221501 = 0; i_221501 < q_l_196697; i_221501++) {\n            bool cond_214391 = sle64(n_196692, i_221501);\n            int64_t defunc_0_f_res_214392;\n            \n            if (cond_214391) {\n                defunc_0_f_res_214392 = (int64_t) 0;\n            } else {\n                int64_t i_214393 = add64(x_214365, i_221501);\n                int64_t defunc_1_add_res_214394 = add64((int64_t) 1, i_214393);\n                \n                defunc_0_f_res_214392 = defunc_1_add_res_214394;\n            }\n            \n            float defunc_0_f_res_214395;\n            \n            if (cond_214391) {\n                defunc_0_f_res_214395 = 0.0F;\n            } else {\n                int64_t i_214396 = add64(x_214365, i_221501);\n                float defunc_0_add_arg_214397;\n                \n                defunc_0_add_arg_214397 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_214359 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_214396 *\n                                                                        ctx_param_ext_222548)];\n                defunc_0_f_res_214395 = defunc_0_add_arg_214397;\n            }\n            \n            int64_t binop_p_214398 = sub64(defunc_0_f_res_214392,\n                             ",
                   "              defunc_0_g_res_214369);\n            float defunc_0_f_res_214399 = sitofp_i64_f32(binop_p_214398);\n            float abs_res_214400 = (float) fabs(defunc_0_f_res_214399);\n            float tmp1_214401 = abs_res_214400 / x_214366;\n            float x_214402 = tmp1_214401 * tmp1_214401;\n            float y_214403 = tmp1_214401 * x_214402;\n            float tmp2_214404 = 1.0F - y_214403;\n            float x_214405 = tmp2_214404 * tmp2_214404;\n            float tmp3_214406 = tmp2_214404 * x_214405;\n            float w_j_214407 = defunc_0_f_res_214395 * tmp3_214406;\n            float xw_j_214408 = defunc_0_f_res_214399 * w_j_214407;\n            float x2w_j_214409 = defunc_0_f_res_214399 * xw_j_214408;\n            float x3w_j_214410 = defunc_0_f_res_214399 * x2w_j_214409;\n            float x4w_j_214411 = defunc_0_f_res_214399 * x3w_j_214410;\n            float defunc_1_op_res_214377 = w_j_214407 + redout_221496;\n            float defunc_1_op_res_214380 = xw_j_214408 + redout_221497;\n            float defunc_1_op_res_214383 = x2w_j_214409 + redout_221498;\n            float defunc_1_op_res_214386 = x3w_j_214410 + redout_221499;\n            float defunc_1_op_res_214389 = x4w_j_214411 + redout_221500;\n            float redout_tmp_227983 = defunc_1_op_res_214377;\n            float redout_tmp_227984 = defunc_1_op_res_214380;\n            float redout_tmp_227985 = defunc_1_op_res_214383;\n            float redout_tmp_227986 = defunc_1_op_res_214386;\n            float redout_tmp_227987 = defunc_1_op_res_214389;\n            \n            redout_221496 = redout_tmp_227983;\n            redout_221497 = redout_tmp_227984;\n            redout_221498 = redout_tmp_227985;\n            redout_221499 = redout_tmp_227986;\n            redout_221500 = redout_tmp_227987;\n        }\n        defunc_2_reduce_res_214370 = redout_221496;\n        defunc_2_reduce_res_214371 = redout_221497;\n        defunc_2_reduce_res_214372 = redout_221498;\n        defunc_2_reduce_res_214373 = redout_221499;\n ",
                   "       defunc_2_reduce_res_214374 = redout_221500;\n        \n        float x_214412 = defunc_2_reduce_res_214372 *\n              defunc_2_reduce_res_214374;\n        float y_214413 = defunc_2_reduce_res_214373 *\n              defunc_2_reduce_res_214373;\n        float a12_214414 = x_214412 - y_214413;\n        float x_214415 = defunc_2_reduce_res_214372 *\n              defunc_2_reduce_res_214373;\n        float y_214416 = defunc_2_reduce_res_214371 *\n              defunc_2_reduce_res_214374;\n        float b12_214417 = x_214415 - y_214416;\n        float x_214418 = defunc_2_reduce_res_214371 *\n              defunc_2_reduce_res_214373;\n        float y_214419 = defunc_2_reduce_res_214372 *\n              defunc_2_reduce_res_214372;\n        float c12_214420 = x_214418 - y_214419;\n        float x_214421 = defunc_2_reduce_res_214370 *\n              defunc_2_reduce_res_214374;\n        float b2_214422 = x_214421 - y_214419;\n        float x_214423 = defunc_2_reduce_res_214371 *\n              defunc_2_reduce_res_214372;\n        float y_214424 = defunc_2_reduce_res_214370 *\n              defunc_2_reduce_res_214373;\n        float c2_214425 = x_214423 - y_214424;\n        float x_214426 = defunc_2_reduce_res_214370 * a12_214414;\n        float y_214427 = defunc_2_reduce_res_214371 * b12_214417;\n        float x_214428 = x_214426 + y_214427;\n        float y_214429 = defunc_2_reduce_res_214372 * c12_214420;\n        float y_214430 = x_214428 + y_214429;\n        float det_214431 = 1.0F / y_214430;\n        float a12_214432 = a12_214414 * det_214431;\n        float b12_214433 = b12_214417 * det_214431;\n        float c12_214434 = c12_214420 * det_214431;\n        float b2_214435 = b2_214422 * det_214431;\n        float c2_214436 = c2_214425 * det_214431;\n        float defunc_2_reduce_res_214437;\n        float defunc_2_reduce_res_214438;\n        float redout_221502;\n        float redout_221503;\n        \n        redout_221502 = 0.0F;\n        redout_221503 = 0.0F;\n        for (int64_t i_221504 = 0; i_",
                   "221504 < q_l_196697; i_221504++) {\n            bool cond_214446 = sle64(n_196692, i_221504);\n            int64_t defunc_0_f_res_214447;\n            \n            if (cond_214446) {\n                defunc_0_f_res_214447 = (int64_t) 0;\n            } else {\n                int64_t i_214448 = add64(x_214365, i_221504);\n                int64_t defunc_1_add_res_214449 = add64((int64_t) 1, i_214448);\n                \n                defunc_0_f_res_214447 = defunc_1_add_res_214449;\n            }\n            \n            float defunc_0_f_res_214450;\n            \n            if (cond_214446) {\n                defunc_0_f_res_214450 = 0.0F;\n            } else {\n                int64_t i_214451 = add64(x_214365, i_221504);\n                float defunc_0_add_arg_214452;\n                \n                defunc_0_add_arg_214452 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_214359 *\n                                                                        ctx_param_ext_222546 +\n                                                                        i_214451 *\n                                                                        ctx_param_ext_222548)];\n                defunc_0_f_res_214450 = defunc_0_add_arg_214452;\n            }\n            \n            int64_t binop_p_214453 = sub64(defunc_0_f_res_214447,\n                                           defunc_0_g_res_214369);\n            float defunc_0_f_res_214454 = sitofp_i64_f32(binop_p_214453);\n            float abs_res_214455 = (float) fabs(defunc_0_f_res_214454);\n            float tmp1_214456 = abs_res_214455 / x_214366;\n            float x_214457 = tmp1_214456 * tmp1_214456;\n            float y_214458 = tmp1_214456 * x_214457;\n            float tmp2_214459 = 1.0F - y_214458;\n            float x_214460 = tmp2_214459 * tmp2_214459;\n            float tmp3_214461 = tmp2_214459 * x_214460;\n          ",
                   "  float tmp4_214462 = defunc_0_f_res_214450 * tmp3_214461;\n            float defunc_1_f_res_214463 = defunc_0_f_res_214454 * tmp4_214462;\n            float defunc_1_f_res_214464 = defunc_0_f_res_214454 *\n                  defunc_1_f_res_214463;\n            float defunc_0_f_res_214465;\n            \n            if (cond_214446) {\n                defunc_0_f_res_214465 = 0.0F;\n            } else {\n                int64_t i_214466 = add64(x_214365, i_221504);\n                float defunc_0_add_arg_214467;\n                \n                defunc_0_add_arg_214467 = ((__global\n                                            float *) mem_223608)[gtid_214359 *\n                                                                 n_196692 +\n                                                                 i_214466];\n                defunc_0_f_res_214465 = defunc_0_add_arg_214467;\n            }\n            \n            float x_214468 = a12_214432 * tmp4_214462;\n            float y_214469 = b12_214433 * defunc_1_f_res_214463;\n            float x_214470 = x_214468 + y_214469;\n            float y_214471 = c12_214434 * defunc_1_f_res_214464;\n            float x_214472 = x_214470 + y_214471;\n            float defunc_9_fit_fun_res_214473 = defunc_0_f_res_214465 *\n                  x_214472;\n            float x_214474 = b12_214433 * tmp4_214462;\n            float y_214475 = b2_214435 * defunc_1_f_res_214463;\n            float x_214476 = x_214474 + y_214475;\n            float y_214477 = c2_214436 * defunc_1_f_res_214464;\n            float x_214478 = x_214476 + y_214477;\n            float defunc_9_slope_fun_res_214479 = defunc_0_f_res_214465 *\n                  x_214478;\n            float defunc_1_op_res_214441 = defunc_9_fit_fun_res_214473 +\n                  redout_221502;\n            float defunc_1_op_res_214444 = defunc_9_slope_fun_res_214479 +\n                  redout_221503;\n            float redout_tmp_227988 = defunc_1_op_res_214441;\n            float redout_tmp_227989 = defunc_1_op_res_2",
                   "14444;\n            \n            redout_221502 = redout_tmp_227988;\n            redout_221503 = redout_tmp_227989;\n        }\n        defunc_2_reduce_res_214437 = redout_221502;\n        defunc_2_reduce_res_214438 = redout_221503;\n        ((__global float *) mem_223831)[gtid_214359 * l_n_m_196752 +\n                                        gtid_214360] =\n            defunc_2_reduce_res_214437;\n        ((__global float *) mem_223835)[gtid_214359 * l_n_m_196752 +\n                                        gtid_214360] =\n            defunc_2_reduce_res_214438;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_214350\n}\n__kernel void mainzisegmap_214562(__global int *global_failure,\n                                  int64_t m_196691, int64_t l_n_m_196752,\n                                  __global unsigned char *mem_223840, __global\n                                  unsigned char *mem_223844, __global\n                                  unsigned char *mem_223848, __global\n                                  unsigned char *mem_223852, __global\n                                  unsigned char *mem_223856, __global\n                                  unsigned char *mem_223861, __global\n                                  unsigned char *mem_223865, __global\n                                  unsigned char *mem_223869, __global\n                                  unsigned char *mem_223873, __global\n                                  unsigned char *mem_223877)\n{\n    #define segmap_group_sizze_214553 (mainzisegmap_group_sizze_214051)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228118;\n    int32_t local_tid_228119;\n    int64_t group_sizze_228122;\n    int32_t wave_sizze_228121;\n    int32_t group_tid_228120;\n    \n    global_tid_228118 = get_global_id(0);\n    local_tid_228119 = get_local_id(0);\n    group_sizze_228122 = get_local_size(0);\n    wave_sizze_228121 =",
                   " LOCKSTEP_WIDTH;\n    group_tid_228120 = get_group_id(0);\n    \n    int32_t phys_tid_214562 = global_tid_228118;\n    int64_t global_tid_228123 = sext_i32_i64(group_tid_228120) *\n            segmap_group_sizze_214553 + sext_i32_i64(local_tid_228119);\n    int64_t slice_228124 = l_n_m_196752;\n    int64_t slice_228125 = m_196691 * slice_228124;\n    int64_t gtid_214560 = squot64(global_tid_228123, slice_228124);\n    int64_t remnant_228126 = global_tid_228123 - gtid_214560 * slice_228124;\n    int64_t gtid_214561 = remnant_228126;\n    int64_t remnant_228127 = remnant_228126 - gtid_214561;\n    \n    if (slt64(gtid_214560, m_196691) && slt64(gtid_214561, l_n_m_196752)) {\n        float defunc_2_reduce_res_214563;\n        \n        defunc_2_reduce_res_214563 = ((__global\n                                       float *) mem_223840)[gtid_214560 *\n                                                            l_n_m_196752 +\n                                                            gtid_214561];\n        \n        float defunc_2_reduce_res_214564;\n        \n        defunc_2_reduce_res_214564 = ((__global\n                                       float *) mem_223844)[gtid_214560 *\n                                                            l_n_m_196752 +\n                                                            gtid_214561];\n        \n        float defunc_2_reduce_res_214565;\n        \n        defunc_2_reduce_res_214565 = ((__global\n                                       float *) mem_223848)[gtid_214560 *\n                                                            l_n_m_196752 +\n                                                            gtid_214561];\n        \n        float defunc_2_reduce_res_214566;\n        \n        defunc_2_reduce_res_214566 = ((__global\n                                       float *) mem_223852)[gtid_214560 *\n                                                            l_n_m_196752 +\n                                                            gtid_214561];\n        \n        ",
                   "float defunc_2_reduce_res_214567;\n        \n        defunc_2_reduce_res_214567 = ((__global\n                                       float *) mem_223856)[gtid_214560 *\n                                                            l_n_m_196752 +\n                                                            gtid_214561];\n        \n        float x_214568 = defunc_2_reduce_res_214565 *\n              defunc_2_reduce_res_214567;\n        float y_214569 = defunc_2_reduce_res_214566 *\n              defunc_2_reduce_res_214566;\n        float a12_214570 = x_214568 - y_214569;\n        float x_214571 = defunc_2_reduce_res_214565 *\n              defunc_2_reduce_res_214566;\n        float y_214572 = defunc_2_reduce_res_214564 *\n              defunc_2_reduce_res_214567;\n        float b12_214573 = x_214571 - y_214572;\n        float x_214574 = defunc_2_reduce_res_214564 *\n              defunc_2_reduce_res_214566;\n        float y_214575 = defunc_2_reduce_res_214565 *\n              defunc_2_reduce_res_214565;\n        float c12_214576 = x_214574 - y_214575;\n        float x_214577 = defunc_2_reduce_res_214563 *\n              defunc_2_reduce_res_214567;\n        float b2_214578 = x_214577 - y_214575;\n        float x_214579 = defunc_2_reduce_res_214564 *\n              defunc_2_reduce_res_214565;\n        float y_214580 = defunc_2_reduce_res_214563 *\n              defunc_2_reduce_res_214566;\n        float c2_214581 = x_214579 - y_214580;\n        float x_214582 = defunc_2_reduce_res_214563 * a12_214570;\n        float y_214583 = defunc_2_reduce_res_214564 * b12_214573;\n        float x_214584 = x_214582 + y_214583;\n        float y_214585 = defunc_2_reduce_res_214565 * c12_214576;\n        float y_214586 = x_214584 + y_214585;\n        float det_214587 = 1.0F / y_214586;\n        float a12_214588 = a12_214570 * det_214587;\n        float b12_214589 = b12_214573 * det_214587;\n        float c12_214590 = c12_214576 * det_214587;\n        float b2_214591 = b2_214578 * det_214587;\n        float c2_214592 = c2_214581",
                   " * det_214587;\n        \n        ((__global float *) mem_223861)[gtid_214560 * l_n_m_196752 +\n                                        gtid_214561] = a12_214588;\n        ((__global float *) mem_223865)[gtid_214560 * l_n_m_196752 +\n                                        gtid_214561] = b12_214589;\n        ((__global float *) mem_223869)[gtid_214560 * l_n_m_196752 +\n                                        gtid_214561] = c12_214590;\n        ((__global float *) mem_223873)[gtid_214560 * l_n_m_196752 +\n                                        gtid_214561] = b2_214591;\n        ((__global float *) mem_223877)[gtid_214560 * l_n_m_196752 +\n                                        gtid_214561] = c2_214592;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_214553\n}\n__kernel void mainzisegmap_215432(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t jump_l_196703, int64_t l_n_m_196752,\n                                  int64_t i_196779, int64_t y_198899, __global\n                                  unsigned char *ext_mem_223964, __global\n                                  unsigned char *ext_mem_223965, __global\n                                  unsigned char *mem_223970)\n{\n    #define segmap_group_sizze_215427 (mainzisegmap_group_sizze_215309)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228292;\n    int32_t local_tid_228293;\n    int64_t group_sizze_228296;\n    int32_t wave_sizze_228295;\n    int32_t group_tid_228294;\n    \n    global_tid_228292 = get_global_id(0);\n    local_tid_228293 = get_local_id(0);\n    group_sizze_228296 = get_local_size(0);\n    wave_sizze_228295 = LOCKSTEP_WIDTH;\n    group_tid_228294 = get_group_id(0);\n ",
                   "   \n    int32_t phys_tid_215432 = global_tid_228292;\n    int64_t global_tid_228297 = sext_i32_i64(group_tid_228294) *\n            segmap_group_sizze_215427 + sext_i32_i64(local_tid_228293);\n    int64_t slice_228298 = n_196692;\n    int64_t slice_228299 = m_196691 * slice_228298;\n    int64_t gtid_215430 = squot64(global_tid_228297, slice_228298);\n    int64_t remnant_228300 = global_tid_228297 - gtid_215430 * slice_228298;\n    int64_t gtid_215431 = remnant_228300;\n    int64_t remnant_228301 = remnant_228300 - gtid_215431;\n    \n    if (slt64(gtid_215430, m_196691) && slt64(gtid_215431, n_196692)) {\n        int64_t m_v_215436 = sdiv64(gtid_215431, jump_l_196703);\n        bool cond_215437 = m_v_215436 == y_198899;\n        int64_t j_215438;\n        \n        if (cond_215437) {\n            int64_t j_t_res_215439 = sub64(m_v_215436, (int64_t) 1);\n            \n            j_215438 = j_t_res_215439;\n        } else {\n            j_215438 = m_v_215436;\n        }\n        \n        int64_t min_arg_215440 = mul64(jump_l_196703, j_215438);\n        int64_t min_res_215441 = smin64(i_196779, min_arg_215440);\n        int64_t defunc_0_m_fun_arg_215442 = add64((int64_t) 1, j_215438);\n        int64_t min_arg_215443 = mul64(jump_l_196703,\n                                       defunc_0_m_fun_arg_215442);\n        int64_t min_res_215444 = smin64(i_196779, min_arg_215443);\n        int64_t i64_arg_215445 = sub64(min_res_215444, min_res_215441);\n        float i64_res_215446 = sitofp_i64_f32(i64_arg_215445);\n        int64_t i64_arg_215447 = sub64(gtid_215431, min_res_215441);\n        float i64_res_215448 = sitofp_i64_f32(i64_arg_215447);\n        float u_215449 = i64_res_215448 / i64_res_215446;\n        float u2_215450 = u_215449 * u_215449;\n        float u3_215451 = u_215449 * u2_215450;\n        float x_215452 = 2.0F * u3_215451;\n        float y_215453 = 3.0F * u2_215450;\n        float x_215454 = x_215452 - y_215453;\n        float x_215455 = 1.0F + x_215454;\n        bool x_215456 = sle64((int64_t) ",
                   "0, j_215438);\n        bool y_215457 = slt64(j_215438, l_n_m_196752);\n        bool bounds_check_215458 = x_215456 && y_215457;\n        bool index_certs_215459;\n        \n        if (!bounds_check_215458) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 49) == -1) {\n                    global_failure_args[0] = (int64_t) j_215438;\n                    global_failure_args[1] = (int64_t) l_n_m_196752;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        float y_215460;\n        \n        y_215460 = ((__global float *) ext_mem_223965)[gtid_215430 *\n                                                       l_n_m_196752 + j_215438];\n        \n        float x_215461 = x_215455 * y_215460;\n        float x_215462 = y_215453 - x_215452;\n        bool x_215463 = sle64((int64_t) 0, defunc_0_m_fun_arg_215442);\n        bool y_215464 = slt64(defunc_0_m_fun_arg_215442, l_n_m_196752);\n        bool bounds_check_215465 = x_215463 && y_215464;\n        bool index_certs_215466;\n        \n        if (!bounds_check_215465) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 50) == -1) {\n                    global_failure_args[0] =\n                        (int64_t) defunc_0_m_fun_arg_215442;\n                    global_failure_args[1] = (int64_t) l_n_m_196752;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        float y_215467;\n        \n        y_215467 = ((__global float *) ext_mem_223965)[gtid_215430 *\n                                                       l_n_m_196752 +\n                                                       defunc_0_m_fun_arg_215442];\n        \n        float y_215468 = x_215462 * y_215467;\n        float x_215469 = x_215461 + y_215468;\n        float y_215470 = 2.0F * u2_215450;\n        float x_215471 = u3_215451 - y_215470;\n        float x_215472 = u_215449 + x_215471;\n        float y_215473;\n        \n        y_215473 = (",
                   "(__global float *) ext_mem_223964)[gtid_215430 *\n                                                       l_n_m_196752 + j_215438];\n        \n        float x_215474 = x_215472 * y_215473;\n        float y_215475 = i64_res_215446 * x_215474;\n        float x_215476 = x_215469 + y_215475;\n        float x_215477 = u3_215451 - u2_215450;\n        float y_215478;\n        \n        y_215478 = ((__global float *) ext_mem_223964)[gtid_215430 *\n                                                       l_n_m_196752 +\n                                                       defunc_0_m_fun_arg_215442];\n        \n        float x_215479 = x_215477 * y_215478;\n        float y_215480 = i64_res_215446 * x_215479;\n        float defunc_4_interpolate_proc_res_215481 = x_215476 + y_215480;\n        \n        ((__global float *) mem_223970)[gtid_215430 * n_196692 + gtid_215431] =\n            defunc_4_interpolate_proc_res_215481;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_215427\n}\n__kernel void mainzisegmap_215527(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t n_p_196694, int64_t C_len_196743,\n                                  int64_t ext_223972, __global\n                                  unsigned char *mem_223557, __global\n                                  unsigned char *ext_mem_223971, __global\n                                  unsigned char *mem_223977)\n{\n    #define segmap_group_sizze_215522 (mainzisegmap_group_sizze_215496)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228302;\n    int32_t local_tid_228303;\n    int64_t group_sizze_228306;\n    int32_t wave_sizze_228305;\n    int32_t group_tid_228304;\n    \n    global_tid_228302 = get_global_id(0);\n    local_tid_228303 = get_local_id(0);\n    group_sizze_228306 = get_local_size(0);\n    wave_sizze_228305 = LOCKSTEP_",
                   "WIDTH;\n    group_tid_228304 = get_group_id(0);\n    \n    int32_t phys_tid_215527 = global_tid_228302;\n    int64_t global_tid_228307 = sext_i32_i64(group_tid_228304) *\n            segmap_group_sizze_215522 + sext_i32_i64(local_tid_228303);\n    int64_t slice_228308 = n_196692;\n    int64_t slice_228309 = m_196691 * slice_228308;\n    int64_t gtid_215525 = squot64(global_tid_228307, slice_228308);\n    int64_t remnant_228310 = global_tid_228307 - gtid_215525 * slice_228308;\n    int64_t gtid_215526 = remnant_228310;\n    int64_t remnant_228311 = remnant_228310 - gtid_215526;\n    \n    if (slt64(gtid_215525, m_196691) && slt64(gtid_215526, n_196692)) {\n        int64_t slice_221426 = n_p_196694 + gtid_215526;\n        float x_215528;\n        \n        x_215528 = ((__global float *) mem_223557)[gtid_215525 * C_len_196743 +\n                                                   slice_221426];\n        \n        float x_215529;\n        \n        x_215529 = ((__global float *) ext_mem_223971)[gtid_215525 *\n                                                       ext_223972 +\n                                                       gtid_215526];\n        \n        float defunc_1_f_res_215530 = x_215528 - x_215529;\n        \n        ((__global float *) mem_223977)[gtid_215525 * n_196692 + gtid_215526] =\n            defunc_1_f_res_215530;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_215522\n}\n__kernel void mainzisegmap_215634(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  int64_t num_groups_215630,\n                                  int64_t num_threads_225226, __global\n                                  unsigned char *ex",
                   "t_mem_222256, __global\n                                  unsigned char *mem_223984, __global\n                                  unsigned char *mem_223987, __global\n                                  unsigned char *mem_223990, __global\n                                  unsigned char *mem_223993, __global\n                                  unsigned char *mem_223996, __global\n                                  unsigned char *mem_223999, __global\n                                  unsigned char *mem_224063, __global\n                                  unsigned char *color_225087, __global\n                                  unsigned char *color_225088, __global\n                                  unsigned char *color_225089)\n{\n    #define segmap_group_sizze_215629 (mainzisegmap_group_sizze_215537)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_228327;\n    int32_t local_tid_228328;\n    int64_t group_sizze_228331;\n    int32_t wave_sizze_228330;\n    int32_t group_tid_228329;\n    \n    global_tid_228327 = get_global_id(0);\n    local_tid_228328 = get_local_id(0);\n    group_sizze_228331 = get_local_size(0);\n    wave_sizze_228330 = LOCKSTEP_WIDTH;\n    group_tid_228329 = get_group_id(0);\n    \n    int32_t phys_tid_215634 = global_tid_228327;\n    int32_t phys_group_id_228332;\n    \n    phys_group_id_228332 = get_group_id(0);\n    for (int32_t i_228333 = 0; i_228333 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_215629)) -\n                   phys_group_id_228332, sext_i64_i32(num_groups_215630));\n         i_228333++) {\n        int32_t virt_group_id_228334 = phys_group_id_228332 + i_228333 *\n                sext_i64_i32(n",
                   "um_groups_215630);\n        int64_t global_tid_228335 = sext_i32_i64(virt_group_id_228334) *\n                segmap_group_sizze_215629 + sext_i32_i64(local_tid_228328);\n        int64_t slice_228336 = m_196691;\n        int64_t gtid_215633 = global_tid_228335;\n        int64_t remnant_228337 = global_tid_228335 - gtid_215633;\n        \n        if (slt64(gtid_215633, m_196691)) {\n            int64_t x_215639;\n            \n            x_215639 = ((__global int64_t *) ext_mem_222256)[gtid_215633];\n            for (int64_t i_222089 = 0; i_222089 < n_196692; i_222089++) {\n                float x_215643;\n                \n                x_215643 = ((__global float *) mem_223984)[i_222089 * m_196691 +\n                                                           gtid_215633];\n                \n                float x_215644;\n                \n                x_215644 = ((__global float *) mem_223987)[i_222089 * m_196691 +\n                                                           gtid_215633];\n                \n                float defunc_1_f_res_215645 = x_215643 - x_215644;\n                \n                ((__global float *) color_225087)[phys_tid_215634 + i_222089 *\n                                                  num_threads_225226] =\n                    defunc_1_f_res_215645;\n            }\n            for (int64_t i_222095 = 0; i_222095 < n_196692; i_222095++) {\n                int64_t x_215648;\n                \n                x_215648 = ((__global int64_t *) mem_223990)[i_222095 *\n                                                             m_196691 +\n                                                             gtid_215633];\n                \n                bool cond_215649 = sle64((int64_t) 0, x_215648);\n                float defunc_0_f_res_215650;\n                \n                if (cond_215649) {\n                    bool y_215651 = slt64(x_215648, n_196692);\n                    bool bounds_check_215652 = cond_215649 && y_215651;\n                    bool index_certs_2156",
                   "53;\n                    \n                    if (!bounds_check_215652) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          51) == -1) {\n                                global_failure_args[0] = (int64_t) x_215648;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_215654;\n                    \n                    defunc_0_f_res_t_res_215654 = ((__global\n                                                    float *) color_225087)[phys_tid_215634 +\n                                                                           x_215648 *\n                                                                           num_threads_225226];\n                    defunc_0_f_res_215650 = defunc_0_f_res_t_res_215654;\n                } else {\n                    defunc_0_f_res_215650 = 0.0F;\n                }\n                \n                float defunc_0_f_res_215655;\n                \n                if (cond_215649) {\n                    bool y_215656 = slt64(x_215648, n_196692);\n                    bool bounds_check_215657 = cond_215649 && y_215656;\n                    bool index_certs_215658;\n                    \n                    if (!bounds_check_215657) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          52) == -1) {\n                                global_failure_args[0] = (int64_t) x_215648;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failu",
                   "re = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_215659;\n                    \n                    defunc_0_f_res_t_res_215659 = ((__global\n                                                    float *) mem_223999)[x_215648 *\n                                                                         m_196691 +\n                                                                         gtid_215633];\n                    defunc_0_f_res_215655 = defunc_0_f_res_t_res_215659;\n                } else {\n                    defunc_0_f_res_215655 = 0.0F;\n                }\n                ((__global float *) color_225089)[phys_tid_215634 + i_222095 *\n                                                  num_threads_225226] =\n                    defunc_0_f_res_215655;\n                ((__global float *) color_225088)[phys_tid_215634 + i_222095 *\n                                                  num_threads_225226] =\n                    defunc_0_f_res_215650;\n            }\n            for (int64_t i_222100 = 0; i_222100 < t_n_m_196759; i_222100++) {\n                int64_t x_215662;\n                \n                x_215662 = ((__global int64_t *) mem_223993)[i_222100 *\n                                                             m_196691 +\n                                                             gtid_215633];\n                \n                float x_215663;\n                \n                x_215663 = ((__global float *) mem_223996)[i_222100 * m_196691 +\n                                                           gtid_215633];\n                \n                int64_t min_arg_215664 = mul64(jump_t_196702, i_222100);\n                int64_t min_res_215665 = smin64(i_196779, min_arg_215664);\n                int64_t defunc_0_g_res_215666 = add64((int64_t) 1,\n                                                      min_res_215665);\n                float defunc_2_reduce_res_21566",
                   "7;\n                float redout_221320 = 0.0F;\n                \n                for (int64_t i_221321 = 0; i_221321 < q_t_196696; i_221321++) {\n                    bool cond_215672 = sle64(x_215639, i_221321);\n                    int64_t defunc_0_f_res_215673;\n                    \n                    if (cond_215672) {\n                        defunc_0_f_res_215673 = (int64_t) 0;\n                    } else {\n                        int64_t i_215674 = add64(x_215662, i_221321);\n                        int64_t defunc_0_add_arg_215675;\n                        \n                        defunc_0_add_arg_215675 = ((__global\n                                                    int64_t *) mem_223990)[i_215674 *\n                                                                           m_196691 +\n                                                                           gtid_215633];\n                        \n                        int64_t defunc_1_add_res_215676 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_215675);\n                        \n                        defunc_0_f_res_215673 = defunc_1_add_res_215676;\n                    }\n                    \n                    float defunc_0_f_res_215677;\n                    \n                    if (cond_215672) {\n                        defunc_0_f_res_215677 = 0.0F;\n                    } else {\n                        int64_t i_215678 = add64(x_215662, i_221321);\n                        float defunc_0_add_arg_215679;\n                        \n                        defunc_0_add_arg_215679 = ((__global\n                                                    float *) color_225089)[phys_tid_215634 +\n                                                                           i_215678 *\n                                                                           num_threads_225226];\n                        defunc_0_f_res_215677 = defunc_0_add_arg_215679;\n                    }\n         ",
                   "           \n                    int64_t binop_p_215680 = sub64(defunc_0_f_res_215673,\n                                                   defunc_0_g_res_215666);\n                    float defunc_0_f_res_215681 =\n                          sitofp_i64_f32(binop_p_215680);\n                    float abs_res_215682 = (float) fabs(defunc_0_f_res_215681);\n                    float tmp1_215683 = abs_res_215682 / x_215663;\n                    float x_215684 = tmp1_215683 * tmp1_215683;\n                    float y_215685 = tmp1_215683 * x_215684;\n                    float tmp2_215686 = 1.0F - y_215685;\n                    float x_215687 = tmp2_215686 * tmp2_215686;\n                    float tmp3_215688 = tmp2_215686 * x_215687;\n                    float w_j_215689 = defunc_0_f_res_215677 * tmp3_215688;\n                    float defunc_1_op_res_215670 = w_j_215689 + redout_221320;\n                    float redout_tmp_228342 = defunc_1_op_res_215670;\n                    \n                    redout_221320 = redout_tmp_228342;\n                }\n                defunc_2_reduce_res_215667 = redout_221320;\n                \n                float a0_215690 = 1.0F / defunc_2_reduce_res_215667;\n                float defunc_2_reduce_res_215691;\n                float redout_221322 = 0.0F;\n                \n                for (int64_t i_221323 = 0; i_221323 < q_t_196696; i_221323++) {\n                    bool cond_215696 = sle64(x_215639, i_221323);\n                    int64_t defunc_0_f_res_215697;\n                    \n                    if (cond_215696) {\n                        defunc_0_f_res_215697 = (int64_t) 0;\n                    } else {\n                        int64_t i_215698 = add64(x_215662, i_221323);\n                        int64_t defunc_0_add_arg_215699;\n                        \n                        defunc_0_add_arg_215699 = ((__global\n                                                    int64_t *) mem_223990)[i_215698 *\n                                                    ",
                   "                       m_196691 +\n                                                                           gtid_215633];\n                        \n                        int64_t defunc_1_add_res_215700 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_215699);\n                        \n                        defunc_0_f_res_215697 = defunc_1_add_res_215700;\n                    }\n                    \n                    float defunc_0_f_res_215701;\n                    \n                    if (cond_215696) {\n                        defunc_0_f_res_215701 = 0.0F;\n                    } else {\n                        int64_t i_215702 = add64(x_215662, i_221323);\n                        float defunc_0_add_arg_215703;\n                        \n                        defunc_0_add_arg_215703 = ((__global\n                                                    float *) color_225089)[phys_tid_215634 +\n                                                                           i_215702 *\n                                                                           num_threads_225226];\n                        defunc_0_f_res_215701 = defunc_0_add_arg_215703;\n                    }\n                    \n                    int64_t binop_p_215704 = sub64(defunc_0_f_res_215697,\n                                                   defunc_0_g_res_215666);\n                    float defunc_0_f_res_215705 =\n                          sitofp_i64_f32(binop_p_215704);\n                    float abs_res_215706 = (float) fabs(defunc_0_f_res_215705);\n                    float tmp1_215707 = abs_res_215706 / x_215663;\n                    float x_215708 = tmp1_215707 * tmp1_215707;\n                    float y_215709 = tmp1_215707 * x_215708;\n                    float tmp2_215710 = 1.0F - y_215709;\n                    float x_215711 = tmp2_215710 * tmp2_215710;\n                    float tmp3_215712 = tmp2_215710 * x_215711;\n                    float tmp4_21571",
                   "3 = defunc_0_f_res_215701 * tmp3_215712;\n                    float defunc_0_f_res_215714;\n                    \n                    if (cond_215696) {\n                        defunc_0_f_res_215714 = 0.0F;\n                    } else {\n                        int64_t i_215715 = add64(x_215662, i_221323);\n                        float defunc_0_add_arg_215716;\n                        \n                        defunc_0_add_arg_215716 = ((__global\n                                                    float *) color_225088)[phys_tid_215634 +\n                                                                           i_215715 *\n                                                                           num_threads_225226];\n                        defunc_0_f_res_215714 = defunc_0_add_arg_215716;\n                    }\n                    \n                    float x_215717 = a0_215690 * tmp4_215713;\n                    float defunc_9_fit_fun_res_215718 = defunc_0_f_res_215714 *\n                          x_215717;\n                    float defunc_1_op_res_215694 = defunc_9_fit_fun_res_215718 +\n                          redout_221322;\n                    float redout_tmp_228343 = defunc_1_op_res_215694;\n                    \n                    redout_221322 = redout_tmp_228343;\n                }\n                defunc_2_reduce_res_215691 = redout_221322;\n                ((__global float *) color_225087)[phys_tid_215634 + i_222100 *\n                                                  num_threads_225226] =\n                    defunc_2_reduce_res_215691;\n            }\n            for (int64_t i_228344 = 0; i_228344 < t_n_m_196759; i_228344++) {\n                float tmp_228345;\n                \n                tmp_228345 = ((__global float *) color_225087)[phys_tid_215634 +\n                                                               i_228344 *\n                                                               num_threads_225226];\n                ((__global float *) mem_224063)[gtid_215633 ",
                   "+ i_228344 *\n                                                m_196691] = tmp_228345;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_215629\n}\n__kernel void mainzisegmap_216150(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n                                  unsigned char *mem_224068)\n{\n    #define segmap_group_sizze_216145 (mainzisegmap_group_sizze_216119)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228346;\n    int32_t local_tid_228347;\n    int64_t group_sizze_228350;\n    int32_t wave_sizze_228349;\n    int32_t group_tid_228348;\n    \n    global_tid_228346 = get_global_id(0);\n    local_tid_228347 = get_local_id(0);\n    group_sizze_228350 = get_local_size(0);\n    wave_sizze_228349 = LOCKSTEP_WIDTH;\n    group_tid_228348 = get_group_id(0);\n    \n    int32_t phys_tid_216150 = global_tid_228346;\n    int64_t global_tid_228351 = sext_i32_i64(group_tid_228348) *\n            segmap_group_sizze_216145 + sext_i32_i64(local_tid_228347);\n    int64_t slice_228352 = n_196692;\n    int64_t slice_228353 = m_196691 * slice_228352;\n    int64_t gtid_216148 = squot64(global_tid_228351, slice_228352);\n    int64_t remnant_228354 = global_tid_228351 - gtid_216148 * slice_228352;\n    int64_t gtid_216149 = remnant_228354;\n    int64_t remnant_228355 = remnant_228354 - gtid_216149;\n    \n    if (slt64(gtid_216148, m_196691) && slt64(gtid_216149, n_196692)) {\n        float x_216151;\n        \n        x_216151 = ((__global float *) Y_mem_222225)[gtid_216148 * n_196692 +\n                                                     gtid_216149];\n        \n        float x_216152;\n       ",
                   " \n        x_216152 = ((__global float *) mem_223977)[gtid_216148 * n_196692 +\n                                                   gtid_216149];\n        \n        float defunc_1_f_res_216153 = x_216151 - x_216152;\n        \n        ((__global float *) mem_224068)[gtid_216148 * n_196692 + gtid_216149] =\n            defunc_1_f_res_216153;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_216145\n}\n__kernel void mainzisegmap_216167(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_224068, __global\n                                  unsigned char *mem_224073, __global\n                                  unsigned char *mem_224077)\n{\n    #define segmap_group_sizze_216161 (mainzisegmap_group_sizze_216063)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228356;\n    int32_t local_tid_228357;\n    int64_t group_sizze_228360;\n    int32_t wave_sizze_228359;\n    int32_t group_tid_228358;\n    \n    global_tid_228356 = get_global_id(0);\n    local_tid_228357 = get_local_id(0);\n    group_sizze_228360 = get_local_size(0);\n    wave_sizze_228359 = LOCKSTEP_WIDTH;\n    group_tid_228358 = get_group_id(0);\n    \n    int32_t phys_tid_216167 = global_tid_228356;\n    int64_t global_tid_228361 = sext_i32_i64(group_tid_228358) *\n            segmap_group_sizze_216161 + sext_i32_i64(local_tid_2",
                   "28357);\n    int64_t slice_228362 = n_196692;\n    int64_t slice_228363 = m_196691 * slice_228362;\n    int64_t gtid_216165 = squot64(global_tid_228361, slice_228362);\n    int64_t remnant_228364 = global_tid_228361 - gtid_216165 * slice_228362;\n    int64_t gtid_216166 = remnant_228364;\n    int64_t remnant_228365 = remnant_228364 - gtid_216166;\n    \n    if (slt64(gtid_216165, m_196691) && slt64(gtid_216166, n_196692)) {\n        int64_t x_216170;\n        \n        x_216170 = ((__global int64_t *) ext_mem_222257)[gtid_216165 *\n                                                         n_196692 +\n                                                         gtid_216166];\n        \n        bool cond_216171 = sle64((int64_t) 0, x_216170);\n        float defunc_0_f_res_216172;\n        \n        if (cond_216171) {\n            bool y_216173 = slt64(x_216170, n_196692);\n            bool bounds_check_216174 = cond_216171 && y_216173;\n            bool index_certs_216175;\n            \n            if (!bounds_check_216174) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 53) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_216170;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_216176;\n            \n            defunc_0_f_res_t_res_216176 = ((__global\n                                            float *) mem_224068)[gtid_216165 *\n                                                                 n_196692 +\n                                                                 x_216170];\n            defunc_0_f_res_216172 = defunc_0_f_res_t_res_216176;\n        } else {\n            defunc_0_f_res_216172 = 0.0F;\n        }\n        \n        float defunc_0_f_res_216177;\n        \n        if (cond_216171) {\n            bool y_216178 = slt64(x_216170,",
                   " n_196692);\n            bool bounds_check_216179 = cond_216171 && y_216178;\n            bool index_certs_216180;\n            \n            if (!bounds_check_216179) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 54) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_216170;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_216181;\n            \n            defunc_0_f_res_t_res_216181 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_216165 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_216170 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_216177 = defunc_0_f_res_t_res_216181;\n        } else {\n            defunc_0_f_res_216177 = 0.0F;\n        }\n        ((__global float *) mem_224073)[gtid_216165 * n_196692 + gtid_216166] =\n            defunc_0_f_res_216177;\n        ((__global float *) mem_224077)[gtid_216165 * n_196692 + gtid_216166] =\n            defunc_0_f_res_216172;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_216161\n}\n__kernel void mainzisegmap_216195(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  __global unsigned char *ext_mem_222256,\n                                  __global unsigned char *ext_mem_222257,\n             ",
                   "                     __global unsigned char *ext_mem_222517,\n                                  __global unsigned char *ext_mem_222518,\n                                  __global unsigned char *mem_224073, __global\n                                  unsigned char *mem_224077, __global\n                                  unsigned char *mem_224082)\n{\n    #define segmap_group_sizze_216186 (mainzisegmap_group_sizze_215726)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228366;\n    int32_t local_tid_228367;\n    int64_t group_sizze_228370;\n    int32_t wave_sizze_228369;\n    int32_t group_tid_228368;\n    \n    global_tid_228366 = get_global_id(0);\n    local_tid_228367 = get_local_id(0);\n    group_sizze_228370 = get_local_size(0);\n    wave_sizze_228369 = LOCKSTEP_WIDTH;\n    group_tid_228368 = get_group_id(0);\n    \n    int32_t phys_tid_216195 = global_tid_228366;\n    int64_t global_tid_228371 = sext_i32_i64(group_tid_228368) *\n            segmap_group_sizze_216186 + sext_i32_i64(local_tid_228367);\n    int64_t slice_228372 = t_n_m_196759;\n    int64_t slice_228373 = m_196691 * slice_228372;\n    int64_t gtid_216193 = squot64(global_tid_228371, slice_228372);\n    int64_t remnant_228374 = global_tid_228371 - gtid_216193 * slice_228372;\n    int64_t gtid_216194 = remnant_228374;\n    int64_t remnant_228375 = remnant_228374 - gtid_216194;\n    \n    if (slt64(gtid_216193, m_196691) && slt64(gtid_216194, t_n_m_196759)) {\n        int64_t x_216197;\n        \n        x_216197 = ((__global int64_t *) ext_mem_222256)[gtid_216193];\n        \n        int64_t x_216201;\n        \n        x_216201 = ((__global int64_t *) ext_mem_222518)[gtid_216193 *\n                                                         t_n_m_196759 +\n                                                         gtid_216194];\n        \n        float x_216202;\n        \n        x_216202 = ((__global float *) ext_mem_2",
                   "22517)[gtid_216193 *\n                                                       t_n_m_196759 +\n                                                       gtid_216194];\n        \n        int64_t min_arg_216203 = mul64(jump_t_196702, gtid_216194);\n        int64_t min_res_216204 = smin64(i_196779, min_arg_216203);\n        int64_t defunc_0_g_res_216205 = add64((int64_t) 1, min_res_216204);\n        float defunc_2_reduce_res_216206;\n        float redout_221328 = 0.0F;\n        \n        for (int64_t i_221329 = 0; i_221329 < q_t_196696; i_221329++) {\n            bool cond_216211 = sle64(x_216197, i_221329);\n            int64_t defunc_0_f_res_216212;\n            \n            if (cond_216211) {\n                defunc_0_f_res_216212 = (int64_t) 0;\n            } else {\n                int64_t i_216213 = add64(x_216201, i_221329);\n                int64_t defunc_0_add_arg_216214;\n                \n                defunc_0_add_arg_216214 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_216193 *\n                                                                       n_196692 +\n                                                                       i_216213];\n                \n                int64_t defunc_1_add_res_216215 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_216214);\n                \n                defunc_0_f_res_216212 = defunc_1_add_res_216215;\n            }\n            \n            float defunc_0_f_res_216216;\n            \n            if (cond_216211) {\n                defunc_0_f_res_216216 = 0.0F;\n            } else {\n                int64_t i_216217 = add64(x_216201, i_221329);\n                float defunc_0_add_arg_216218;\n                \n                defunc_0_add_arg_216218 = ((__global\n                                            float *) mem_224073)[gtid_216193 *\n                                                                 n_196692 +\n                                                 ",
                   "                i_216217];\n                defunc_0_f_res_216216 = defunc_0_add_arg_216218;\n            }\n            \n            int64_t binop_p_216219 = sub64(defunc_0_f_res_216212,\n                                           defunc_0_g_res_216205);\n            float defunc_0_f_res_216220 = sitofp_i64_f32(binop_p_216219);\n            float abs_res_216221 = (float) fabs(defunc_0_f_res_216220);\n            float tmp1_216222 = abs_res_216221 / x_216202;\n            float x_216223 = tmp1_216222 * tmp1_216222;\n            float y_216224 = tmp1_216222 * x_216223;\n            float tmp2_216225 = 1.0F - y_216224;\n            float x_216226 = tmp2_216225 * tmp2_216225;\n            float tmp3_216227 = tmp2_216225 * x_216226;\n            float w_j_216228 = defunc_0_f_res_216216 * tmp3_216227;\n            float defunc_1_op_res_216209 = w_j_216228 + redout_221328;\n            float redout_tmp_228376 = defunc_1_op_res_216209;\n            \n            redout_221328 = redout_tmp_228376;\n        }\n        defunc_2_reduce_res_216206 = redout_221328;\n        \n        float a0_216229 = 1.0F / defunc_2_reduce_res_216206;\n        float defunc_2_reduce_res_216230;\n        float redout_221330 = 0.0F;\n        \n        for (int64_t i_221331 = 0; i_221331 < q_t_196696; i_221331++) {\n            bool cond_216235 = sle64(x_216197, i_221331);\n            int64_t defunc_0_f_res_216236;\n            \n            if (cond_216235) {\n                defunc_0_f_res_216236 = (int64_t) 0;\n            } else {\n                int64_t i_216237 = add64(x_216201, i_221331);\n                int64_t defunc_0_add_arg_216238;\n                \n                defunc_0_add_arg_216238 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_216193 *\n                                                                       n_196692 +\n                                                                       i_216237];\n                \n                int64_t defunc_1_add_res_216239 = add64",
                   "((int64_t) 1,\n                                                        defunc_0_add_arg_216238);\n                \n                defunc_0_f_res_216236 = defunc_1_add_res_216239;\n            }\n            \n            float defunc_0_f_res_216240;\n            \n            if (cond_216235) {\n                defunc_0_f_res_216240 = 0.0F;\n            } else {\n                int64_t i_216241 = add64(x_216201, i_221331);\n                float defunc_0_add_arg_216242;\n                \n                defunc_0_add_arg_216242 = ((__global\n                                            float *) mem_224073)[gtid_216193 *\n                                                                 n_196692 +\n                                                                 i_216241];\n                defunc_0_f_res_216240 = defunc_0_add_arg_216242;\n            }\n            \n            int64_t binop_p_216243 = sub64(defunc_0_f_res_216236,\n                                           defunc_0_g_res_216205);\n            float defunc_0_f_res_216244 = sitofp_i64_f32(binop_p_216243);\n            float abs_res_216245 = (float) fabs(defunc_0_f_res_216244);\n            float tmp1_216246 = abs_res_216245 / x_216202;\n            float x_216247 = tmp1_216246 * tmp1_216246;\n            float y_216248 = tmp1_216246 * x_216247;\n            float tmp2_216249 = 1.0F - y_216248;\n            float x_216250 = tmp2_216249 * tmp2_216249;\n            float tmp3_216251 = tmp2_216249 * x_216250;\n            float tmp4_216252 = defunc_0_f_res_216240 * tmp3_216251;\n            float defunc_0_f_res_216253;\n            \n            if (cond_216235) {\n                defunc_0_f_res_216253 = 0.0F;\n            } else {\n                int64_t i_216254 = add64(x_216201, i_221331);\n                float defunc_0_add_arg_216255;\n                \n                defunc_0_add_arg_216255 = ((__global\n                                            float *) mem_224077)[gtid_216193 *\n                                                      ",
                   "           n_196692 +\n                                                                 i_216254];\n                defunc_0_f_res_216253 = defunc_0_add_arg_216255;\n            }\n            \n            float x_216256 = a0_216229 * tmp4_216252;\n            float defunc_9_fit_fun_res_216257 = defunc_0_f_res_216253 *\n                  x_216256;\n            float defunc_1_op_res_216233 = defunc_9_fit_fun_res_216257 +\n                  redout_221330;\n            float redout_tmp_228377 = defunc_1_op_res_216233;\n            \n            redout_221330 = redout_tmp_228377;\n        }\n        defunc_2_reduce_res_216230 = redout_221330;\n        ((__global float *) mem_224082)[gtid_216193 * t_n_m_196759 +\n                                        gtid_216194] =\n            defunc_2_reduce_res_216230;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_216186\n}\n__kernel void mainzisegmap_216319(__global int *global_failure,\n                                  int64_t m_196691, int64_t t_n_m_196759,\n                                  __global unsigned char *mem_224087, __global\n                                  unsigned char *mem_224092)\n{\n    #define segmap_group_sizze_216314 (mainzisegmap_group_sizze_215864)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228450;\n    int32_t local_tid_228451;\n    int64_t group_sizze_228454;\n    int32_t wave_sizze_228453;\n    int32_t group_tid_228452;\n    \n    global_tid_228450 = get_global_id(0);\n    local_tid_228451 = get_local_id(0);\n    group_sizze_228454 = get_local_size(0);\n    wave_sizze_228453 = LOCKSTEP_WIDTH;\n    group_tid_228452 = get_group_id(0);\n    \n    int32_t phys_tid_216319 = global_tid_228450;\n    int64_t global_tid_228455 = sext_i32_i64(group_tid_228452) *\n            segmap_group_sizze_216314 + sext_i32_i64(local_tid_228451);\n    int64_t slice_228456 = t_n_m_196759;\n    int64_t slice_228457 = m_",
                   "196691 * slice_228456;\n    int64_t gtid_216317 = squot64(global_tid_228455, slice_228456);\n    int64_t remnant_228458 = global_tid_228455 - gtid_216317 * slice_228456;\n    int64_t gtid_216318 = remnant_228458;\n    int64_t remnant_228459 = remnant_228458 - gtid_216318;\n    \n    if (slt64(gtid_216317, m_196691) && slt64(gtid_216318, t_n_m_196759)) {\n        float defunc_2_reduce_res_216320;\n        \n        defunc_2_reduce_res_216320 = ((__global\n                                       float *) mem_224087)[gtid_216317 *\n                                                            t_n_m_196759 +\n                                                            gtid_216318];\n        \n        float a0_216321 = 1.0F / defunc_2_reduce_res_216320;\n        \n        ((__global float *) mem_224092)[gtid_216317 * t_n_m_196759 +\n                                        gtid_216318] = a0_216321;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_216314\n}\n__kernel void mainzisegmap_216506(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  int64_t num_groups_216501,\n                                  int64_t num_threads_225236, __global\n                                  unsigned char *ext_mem_222256, __global\n                                  unsigned char *mem_224107, __global\n                                  unsigned char *mem_224110, __global\n                                  unsigned char *mem_224113, __global\n                                  unsigned char *mem_224116, __global\n                                  unsigned char *mem_224119, __global\n                                  unsigned char *mem_224122, __glob",
                   "al\n                                  unsigned char *mem_224201, __global\n                                  unsigned char *mem_224204, __global\n                                  unsigned char *color_225091, __global\n                                  unsigned char *color_225092, __global\n                                  unsigned char *color_225093, __global\n                                  unsigned char *color_225094)\n{\n    #define segmap_group_sizze_216500 (mainzisegmap_group_sizze_216379)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_228549;\n    int32_t local_tid_228550;\n    int64_t group_sizze_228553;\n    int32_t wave_sizze_228552;\n    int32_t group_tid_228551;\n    \n    global_tid_228549 = get_global_id(0);\n    local_tid_228550 = get_local_id(0);\n    group_sizze_228553 = get_local_size(0);\n    wave_sizze_228552 = LOCKSTEP_WIDTH;\n    group_tid_228551 = get_group_id(0);\n    \n    int32_t phys_tid_216506 = global_tid_228549;\n    int32_t phys_group_id_228554;\n    \n    phys_group_id_228554 = get_group_id(0);\n    for (int32_t i_228555 = 0; i_228555 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_216500)) -\n                   phys_group_id_228554, sext_i64_i32(num_groups_216501));\n         i_228555++) {\n        int32_t virt_group_id_228556 = phys_group_id_228554 + i_228555 *\n                sext_i64_i32(num_groups_216501);\n        int64_t global_tid_228557 = sext_i32_i64(virt_group_id_228556) *\n                segmap_group_sizze_216500 + sext_i32_i64(local_tid_228550);\n        int64_t slice_228558 = m_196691;\n        int64_t gtid_216505 = global_tid_228557;\n        int64_t remnant_228559 = global_",
                   "tid_228557 - gtid_216505;\n        \n        if (slt64(gtid_216505, m_196691)) {\n            int64_t x_216511;\n            \n            x_216511 = ((__global int64_t *) ext_mem_222256)[gtid_216505];\n            for (int64_t i_222104 = 0; i_222104 < n_196692; i_222104++) {\n                float x_216515;\n                \n                x_216515 = ((__global float *) mem_224107)[i_222104 * m_196691 +\n                                                           gtid_216505];\n                \n                float x_216516;\n                \n                x_216516 = ((__global float *) mem_224110)[i_222104 * m_196691 +\n                                                           gtid_216505];\n                \n                float defunc_1_f_res_216517 = x_216515 - x_216516;\n                \n                ((__global float *) color_225091)[phys_tid_216506 + i_222104 *\n                                                  num_threads_225236] =\n                    defunc_1_f_res_216517;\n            }\n            for (int64_t i_222110 = 0; i_222110 < n_196692; i_222110++) {\n                int64_t x_216520;\n                \n                x_216520 = ((__global int64_t *) mem_224113)[i_222110 *\n                                                             m_196691 +\n                                                             gtid_216505];\n                \n                bool cond_216521 = sle64((int64_t) 0, x_216520);\n                float defunc_0_f_res_216522;\n                \n                if (cond_216521) {\n                    bool y_216523 = slt64(x_216520, n_196692);\n                    bool bounds_check_216524 = cond_216521 && y_216523;\n                    bool index_certs_216525;\n                    \n                    if (!bounds_check_216524) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          55) == -1) {\n                                global_failure_arg",
                   "s[0] = (int64_t) x_216520;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_216526;\n                    \n                    defunc_0_f_res_t_res_216526 = ((__global\n                                                    float *) color_225091)[phys_tid_216506 +\n                                                                           x_216520 *\n                                                                           num_threads_225236];\n                    defunc_0_f_res_216522 = defunc_0_f_res_t_res_216526;\n                } else {\n                    defunc_0_f_res_216522 = 0.0F;\n                }\n                \n                float defunc_0_f_res_216527;\n                \n                if (cond_216521) {\n                    bool y_216528 = slt64(x_216520, n_196692);\n                    bool bounds_check_216529 = cond_216521 && y_216528;\n                    bool index_certs_216530;\n                    \n                    if (!bounds_check_216529) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          56) == -1) {\n                                global_failure_args[0] = (int64_t) x_216520;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_216531;\n                    \n                    defunc_0_f_res_t_res_216531 = ((__global\n                                       ",
                   "             float *) mem_224122)[x_216520 *\n                                                                         m_196691 +\n                                                                         gtid_216505];\n                    defunc_0_f_res_216527 = defunc_0_f_res_t_res_216531;\n                } else {\n                    defunc_0_f_res_216527 = 0.0F;\n                }\n                ((__global float *) color_225094)[phys_tid_216506 + i_222110 *\n                                                  num_threads_225236] =\n                    defunc_0_f_res_216527;\n                ((__global float *) color_225093)[phys_tid_216506 + i_222110 *\n                                                  num_threads_225236] =\n                    defunc_0_f_res_216522;\n            }\n            for (int64_t i_222117 = 0; i_222117 < t_n_m_196759; i_222117++) {\n                int64_t x_216535;\n                \n                x_216535 = ((__global int64_t *) mem_224116)[i_222117 *\n                                                             m_196691 +\n                                                             gtid_216505];\n                \n                float x_216536;\n                \n                x_216536 = ((__global float *) mem_224119)[i_222117 * m_196691 +\n                                                           gtid_216505];\n                \n                int64_t min_arg_216537 = mul64(jump_t_196702, i_222117);\n                int64_t min_res_216538 = smin64(i_196779, min_arg_216537);\n                int64_t defunc_0_g_res_216539 = add64((int64_t) 1,\n                                                      min_res_216538);\n                float defunc_2_reduce_res_216540;\n                float defunc_2_reduce_res_216541;\n                float defunc_2_reduce_res_216542;\n                float redout_221344;\n                float redout_221345;\n                float redout_221346;\n                \n                redout_221344 = 0.0F;\n                redout_221345",
                   " = 0.0F;\n                redout_221346 = 0.0F;\n                for (int64_t i_221347 = 0; i_221347 < q_t_196696; i_221347++) {\n                    bool cond_216553 = sle64(x_216511, i_221347);\n                    int64_t defunc_0_f_res_216554;\n                    \n                    if (cond_216553) {\n                        defunc_0_f_res_216554 = (int64_t) 0;\n                    } else {\n                        int64_t i_216555 = add64(x_216535, i_221347);\n                        int64_t defunc_0_add_arg_216556;\n                        \n                        defunc_0_add_arg_216556 = ((__global\n                                                    int64_t *) mem_224113)[i_216555 *\n                                                                           m_196691 +\n                                                                           gtid_216505];\n                        \n                        int64_t defunc_1_add_res_216557 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_216556);\n                        \n                        defunc_0_f_res_216554 = defunc_1_add_res_216557;\n                    }\n                    \n                    float defunc_0_f_res_216558;\n                    \n                    if (cond_216553) {\n                        defunc_0_f_res_216558 = 0.0F;\n                    } else {\n                        int64_t i_216559 = add64(x_216535, i_221347);\n                        float defunc_0_add_arg_216560;\n                        \n                        defunc_0_add_arg_216560 = ((__global\n                                                    float *) color_225094)[phys_tid_216506 +\n                                                                           i_216559 *\n                                                                           num_threads_225236];\n                        defunc_0_f_res_216558 = defunc_0_add_arg_216560;\n                    }\n                    \n     ",
                   "               int64_t binop_p_216561 = sub64(defunc_0_f_res_216554,\n                                                   defunc_0_g_res_216539);\n                    float defunc_0_f_res_216562 =\n                          sitofp_i64_f32(binop_p_216561);\n                    float abs_res_216563 = (float) fabs(defunc_0_f_res_216562);\n                    float tmp1_216564 = abs_res_216563 / x_216536;\n                    float x_216565 = tmp1_216564 * tmp1_216564;\n                    float y_216566 = tmp1_216564 * x_216565;\n                    float tmp2_216567 = 1.0F - y_216566;\n                    float x_216568 = tmp2_216567 * tmp2_216567;\n                    float tmp3_216569 = tmp2_216567 * x_216568;\n                    float w_j_216570 = defunc_0_f_res_216558 * tmp3_216569;\n                    float xw_j_216571 = defunc_0_f_res_216562 * w_j_216570;\n                    float x2w_j_216572 = defunc_0_f_res_216562 * xw_j_216571;\n                    float defunc_1_op_res_216545 = w_j_216570 + redout_221344;\n                    float defunc_1_op_res_216548 = xw_j_216571 + redout_221345;\n                    float defunc_1_op_res_216551 = x2w_j_216572 + redout_221346;\n                    float redout_tmp_228565 = defunc_1_op_res_216545;\n                    float redout_tmp_228566 = defunc_1_op_res_216548;\n                    float redout_tmp_228567 = defunc_1_op_res_216551;\n                    \n                    redout_221344 = redout_tmp_228565;\n                    redout_221345 = redout_tmp_228566;\n                    redout_221346 = redout_tmp_228567;\n                }\n                defunc_2_reduce_res_216540 = redout_221344;\n                defunc_2_reduce_res_216541 = redout_221345;\n                defunc_2_reduce_res_216542 = redout_221346;\n                \n                float x_216573 = defunc_2_reduce_res_216540 *\n                      defunc_2_reduce_res_216542;\n                float y_216574 = defunc_2_reduce_res_216541 *\n                      defunc_2_reduc",
                   "e_res_216541;\n                float y_216575 = x_216573 - y_216574;\n                float det1_216576 = 1.0F / y_216575;\n                float a11_216577 = defunc_2_reduce_res_216542 * det1_216576;\n                float x_216578 = 0.0F - defunc_2_reduce_res_216541;\n                float b11_216579 = det1_216576 * x_216578;\n                float c11_216580 = defunc_2_reduce_res_216540 * det1_216576;\n                float defunc_2_reduce_res_216581;\n                float defunc_2_reduce_res_216582;\n                float redout_221348;\n                float redout_221349;\n                \n                redout_221348 = 0.0F;\n                redout_221349 = 0.0F;\n                for (int64_t i_221350 = 0; i_221350 < q_t_196696; i_221350++) {\n                    bool cond_216590 = sle64(x_216511, i_221350);\n                    int64_t defunc_0_f_res_216591;\n                    \n                    if (cond_216590) {\n                        defunc_0_f_res_216591 = (int64_t) 0;\n                    } else {\n                        int64_t i_216592 = add64(x_216535, i_221350);\n                        int64_t defunc_0_add_arg_216593;\n                        \n                        defunc_0_add_arg_216593 = ((__global\n                                                    int64_t *) mem_224113)[i_216592 *\n                                                                           m_196691 +\n                                                                           gtid_216505];\n                        \n                        int64_t defunc_1_add_res_216594 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_216593);\n                        \n                        defunc_0_f_res_216591 = defunc_1_add_res_216594;\n                    }\n                    \n                    float defunc_0_f_res_216595;\n                    \n                    if (cond_216590) {\n                        defunc_0_f_res_216595 = 0.0F;\n              ",
                   "      } else {\n                        int64_t i_216596 = add64(x_216535, i_221350);\n                        float defunc_0_add_arg_216597;\n                        \n                        defunc_0_add_arg_216597 = ((__global\n                                                    float *) color_225094)[phys_tid_216506 +\n                                                                           i_216596 *\n                                                                           num_threads_225236];\n                        defunc_0_f_res_216595 = defunc_0_add_arg_216597;\n                    }\n                    \n                    int64_t binop_p_216598 = sub64(defunc_0_f_res_216591,\n                                                   defunc_0_g_res_216539);\n                    float defunc_0_f_res_216599 =\n                          sitofp_i64_f32(binop_p_216598);\n                    float abs_res_216600 = (float) fabs(defunc_0_f_res_216599);\n                    float tmp1_216601 = abs_res_216600 / x_216536;\n                    float x_216602 = tmp1_216601 * tmp1_216601;\n                    float y_216603 = tmp1_216601 * x_216602;\n                    float tmp2_216604 = 1.0F - y_216603;\n                    float x_216605 = tmp2_216604 * tmp2_216604;\n                    float tmp3_216606 = tmp2_216604 * x_216605;\n                    float tmp4_216607 = defunc_0_f_res_216595 * tmp3_216606;\n                    float defunc_1_f_res_216608 = defunc_0_f_res_216599 *\n                          tmp4_216607;\n                    float defunc_0_f_res_216609;\n                    \n                    if (cond_216590) {\n                        defunc_0_f_res_216609 = 0.0F;\n                    } else {\n                        int64_t i_216610 = add64(x_216535, i_221350);\n                        float defunc_0_add_arg_216611;\n                        \n                        defunc_0_add_arg_216611 = ((__global\n                                                    float *) color_225093)[p",
                   "hys_tid_216506 +\n                                                                           i_216610 *\n                                                                           num_threads_225236];\n                        defunc_0_f_res_216609 = defunc_0_add_arg_216611;\n                    }\n                    \n                    float x_216612 = a11_216577 * tmp4_216607;\n                    float y_216613 = b11_216579 * defunc_1_f_res_216608;\n                    float x_216614 = x_216612 + y_216613;\n                    float defunc_9_fit_fun_res_216615 = defunc_0_f_res_216609 *\n                          x_216614;\n                    float x_216616 = b11_216579 * tmp4_216607;\n                    float y_216617 = c11_216580 * defunc_1_f_res_216608;\n                    float x_216618 = x_216616 + y_216617;\n                    float defunc_9_slope_fun_res_216619 =\n                          defunc_0_f_res_216609 * x_216618;\n                    float defunc_1_op_res_216585 = defunc_9_fit_fun_res_216615 +\n                          redout_221348;\n                    float defunc_1_op_res_216588 =\n                          defunc_9_slope_fun_res_216619 + redout_221349;\n                    float redout_tmp_228568 = defunc_1_op_res_216585;\n                    float redout_tmp_228569 = defunc_1_op_res_216588;\n                    \n                    redout_221348 = redout_tmp_228568;\n                    redout_221349 = redout_tmp_228569;\n                }\n                defunc_2_reduce_res_216581 = redout_221348;\n                defunc_2_reduce_res_216582 = redout_221349;\n                ((__global float *) color_225092)[phys_tid_216506 + i_222117 *\n                                                  num_threads_225236] =\n                    defunc_2_reduce_res_216581;\n                ((__global float *) color_225091)[phys_tid_216506 + i_222117 *\n                                                  num_threads_225236] =\n                    defunc_2_reduce_res_216582;\n          ",
                   "  }\n            for (int64_t i_228570 = 0; i_228570 < t_n_m_196759; i_228570++) {\n                float tmp_228571;\n                \n                tmp_228571 = ((__global float *) color_225092)[phys_tid_216506 +\n                                                               i_228570 *\n                                                               num_threads_225236];\n                ((__global float *) mem_224201)[gtid_216505 + i_228570 *\n                                                m_196691] = tmp_228571;\n            }\n            for (int64_t i_228572 = 0; i_228572 < t_n_m_196759; i_228572++) {\n                float tmp_228573;\n                \n                tmp_228573 = ((__global float *) color_225091)[phys_tid_216506 +\n                                                               i_228572 *\n                                                               num_threads_225236];\n                ((__global float *) mem_224204)[gtid_216505 + i_228572 *\n                                                m_196691] = tmp_228573;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_216500\n}\n__kernel void mainzisegmap_217156(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n                                  unsigned char *mem_224209)\n{\n    #define segmap_group_sizze_217151 (mainzisegmap_group_sizze_217125)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228574;\n    int32_t local_tid_228575;\n    int64_t group_sizze_228578;\n    int32_t wave_sizze_228577;\n    int32_t group_tid_228576;\n    \n    global_tid_228574 = get_global_id(0);\n    local_tid_228575 = get",
                   "_local_id(0);\n    group_sizze_228578 = get_local_size(0);\n    wave_sizze_228577 = LOCKSTEP_WIDTH;\n    group_tid_228576 = get_group_id(0);\n    \n    int32_t phys_tid_217156 = global_tid_228574;\n    int64_t global_tid_228579 = sext_i32_i64(group_tid_228576) *\n            segmap_group_sizze_217151 + sext_i32_i64(local_tid_228575);\n    int64_t slice_228580 = n_196692;\n    int64_t slice_228581 = m_196691 * slice_228580;\n    int64_t gtid_217154 = squot64(global_tid_228579, slice_228580);\n    int64_t remnant_228582 = global_tid_228579 - gtid_217154 * slice_228580;\n    int64_t gtid_217155 = remnant_228582;\n    int64_t remnant_228583 = remnant_228582 - gtid_217155;\n    \n    if (slt64(gtid_217154, m_196691) && slt64(gtid_217155, n_196692)) {\n        float x_217157;\n        \n        x_217157 = ((__global float *) Y_mem_222225)[gtid_217154 * n_196692 +\n                                                     gtid_217155];\n        \n        float x_217158;\n        \n        x_217158 = ((__global float *) mem_223977)[gtid_217154 * n_196692 +\n                                                   gtid_217155];\n        \n        float defunc_1_f_res_217159 = x_217157 - x_217158;\n        \n        ((__global float *) mem_224209)[gtid_217154 * n_196692 + gtid_217155] =\n            defunc_1_f_res_217159;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_217151\n}\n__kernel void mainzisegmap_217173(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n               ",
                   "                   unsigned char *mem_224209, __global\n                                  unsigned char *mem_224214, __global\n                                  unsigned char *mem_224218)\n{\n    #define segmap_group_sizze_217167 (mainzisegmap_group_sizze_217069)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228584;\n    int32_t local_tid_228585;\n    int64_t group_sizze_228588;\n    int32_t wave_sizze_228587;\n    int32_t group_tid_228586;\n    \n    global_tid_228584 = get_global_id(0);\n    local_tid_228585 = get_local_id(0);\n    group_sizze_228588 = get_local_size(0);\n    wave_sizze_228587 = LOCKSTEP_WIDTH;\n    group_tid_228586 = get_group_id(0);\n    \n    int32_t phys_tid_217173 = global_tid_228584;\n    int64_t global_tid_228589 = sext_i32_i64(group_tid_228586) *\n            segmap_group_sizze_217167 + sext_i32_i64(local_tid_228585);\n    int64_t slice_228590 = n_196692;\n    int64_t slice_228591 = m_196691 * slice_228590;\n    int64_t gtid_217171 = squot64(global_tid_228589, slice_228590);\n    int64_t remnant_228592 = global_tid_228589 - gtid_217171 * slice_228590;\n    int64_t gtid_217172 = remnant_228592;\n    int64_t remnant_228593 = remnant_228592 - gtid_217172;\n    \n    if (slt64(gtid_217171, m_196691) && slt64(gtid_217172, n_196692)) {\n        int64_t x_217176;\n        \n        x_217176 = ((__global int64_t *) ext_mem_222257)[gtid_217171 *\n                                                         n_196692 +\n                                                         gtid_217172];\n        \n        bool cond_217177 = sle64((int64_t) 0, x_217176);\n        float defunc_0_f_res_217178;\n        \n        if (cond_217177) {\n            bool y_217179 = slt64(x_217176, n_196692);\n            bool bounds_check_217180 = cond_217177 && y_217179;\n            bool index_certs_217181;\n            \n            if (!bounds_check_217180) {\n                {\n          ",
                   "          if (atomic_cmpxchg_i32_global(global_failure, -1, 57) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_217176;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_217182;\n            \n            defunc_0_f_res_t_res_217182 = ((__global\n                                            float *) mem_224209)[gtid_217171 *\n                                                                 n_196692 +\n                                                                 x_217176];\n            defunc_0_f_res_217178 = defunc_0_f_res_t_res_217182;\n        } else {\n            defunc_0_f_res_217178 = 0.0F;\n        }\n        \n        float defunc_0_f_res_217183;\n        \n        if (cond_217177) {\n            bool y_217184 = slt64(x_217176, n_196692);\n            bool bounds_check_217185 = cond_217177 && y_217184;\n            bool index_certs_217186;\n            \n            if (!bounds_check_217185) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 58) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_217176;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_217187;\n            \n            defunc_0_f_res_t_res_217187 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_217171 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_217176 *\n                    ",
                   "                                                    ctx_param_ext_222548)];\n            defunc_0_f_res_217183 = defunc_0_f_res_t_res_217187;\n        } else {\n            defunc_0_f_res_217183 = 0.0F;\n        }\n        ((__global float *) mem_224214)[gtid_217171 * n_196692 + gtid_217172] =\n            defunc_0_f_res_217183;\n        ((__global float *) mem_224218)[gtid_217171 * n_196692 + gtid_217172] =\n            defunc_0_f_res_217178;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_217167\n}\n__kernel void mainzisegmap_217203(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  __global unsigned char *ext_mem_222256,\n                                  __global unsigned char *ext_mem_222257,\n                                  __global unsigned char *ext_mem_222517,\n                                  __global unsigned char *ext_mem_222518,\n                                  __global unsigned char *mem_224214, __global\n                                  unsigned char *mem_224218, __global\n                                  unsigned char *mem_224223, __global\n                                  unsigned char *mem_224227)\n{\n    #define segmap_group_sizze_217192 (mainzisegmap_group_sizze_216627)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228594;\n    int32_t local_tid_228595;\n    int64_t group_sizze_228598;\n    int32_t wave_sizze_228597;\n    int32_t group_tid_228596;\n    \n    global_tid_228594 = get_global_id(0);\n    local_tid_228595 = get_local_id(0);\n    group_sizze_228598 = get_local_size(0);\n    wave_sizze_228597 = LOCKSTEP_WIDTH;\n    group_tid_228596 = get_group_id(0);\n    \n    int32_t phys_tid_217203 = g",
                   "lobal_tid_228594;\n    int64_t global_tid_228599 = sext_i32_i64(group_tid_228596) *\n            segmap_group_sizze_217192 + sext_i32_i64(local_tid_228595);\n    int64_t slice_228600 = t_n_m_196759;\n    int64_t slice_228601 = m_196691 * slice_228600;\n    int64_t gtid_217201 = squot64(global_tid_228599, slice_228600);\n    int64_t remnant_228602 = global_tid_228599 - gtid_217201 * slice_228600;\n    int64_t gtid_217202 = remnant_228602;\n    int64_t remnant_228603 = remnant_228602 - gtid_217202;\n    \n    if (slt64(gtid_217201, m_196691) && slt64(gtid_217202, t_n_m_196759)) {\n        int64_t x_217205;\n        \n        x_217205 = ((__global int64_t *) ext_mem_222256)[gtid_217201];\n        \n        int64_t x_217209;\n        \n        x_217209 = ((__global int64_t *) ext_mem_222518)[gtid_217201 *\n                                                         t_n_m_196759 +\n                                                         gtid_217202];\n        \n        float x_217210;\n        \n        x_217210 = ((__global float *) ext_mem_222517)[gtid_217201 *\n                                                       t_n_m_196759 +\n                                                       gtid_217202];\n        \n        int64_t min_arg_217211 = mul64(jump_t_196702, gtid_217202);\n        int64_t min_res_217212 = smin64(i_196779, min_arg_217211);\n        int64_t defunc_0_g_res_217213 = add64((int64_t) 1, min_res_217212);\n        float defunc_2_reduce_res_217214;\n        float defunc_2_reduce_res_217215;\n        float defunc_2_reduce_res_217216;\n        float redout_221355;\n        float redout_221356;\n        float redout_221357;\n        \n        redout_221355 = 0.0F;\n        redout_221356 = 0.0F;\n        redout_221357 = 0.0F;\n        for (int64_t i_221358 = 0; i_221358 < q_t_196696; i_221358++) {\n            bool cond_217227 = sle64(x_217205, i_221358);\n            int64_t defunc_0_f_res_217228;\n            \n            if (cond_217227) {\n                defunc_0_f_res_217228 = (int64_t) 0;\n         ",
                   "   } else {\n                int64_t i_217229 = add64(x_217209, i_221358);\n                int64_t defunc_0_add_arg_217230;\n                \n                defunc_0_add_arg_217230 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_217201 *\n                                                                       n_196692 +\n                                                                       i_217229];\n                \n                int64_t defunc_1_add_res_217231 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_217230);\n                \n                defunc_0_f_res_217228 = defunc_1_add_res_217231;\n            }\n            \n            float defunc_0_f_res_217232;\n            \n            if (cond_217227) {\n                defunc_0_f_res_217232 = 0.0F;\n            } else {\n                int64_t i_217233 = add64(x_217209, i_221358);\n                float defunc_0_add_arg_217234;\n                \n                defunc_0_add_arg_217234 = ((__global\n                                            float *) mem_224214)[gtid_217201 *\n                                                                 n_196692 +\n                                                                 i_217233];\n                defunc_0_f_res_217232 = defunc_0_add_arg_217234;\n            }\n            \n            int64_t binop_p_217235 = sub64(defunc_0_f_res_217228,\n                                           defunc_0_g_res_217213);\n            float defunc_0_f_res_217236 = sitofp_i64_f32(binop_p_217235);\n            float abs_res_217237 = (float) fabs(defunc_0_f_res_217236);\n            float tmp1_217238 = abs_res_217237 / x_217210;\n            float x_217239 = tmp1_217238 * tmp1_217238;\n            float y_217240 = tmp1_217238 * x_217239;\n            float tmp2_217241 = 1.0F - y_217240;\n            float x_217242 = tmp2_217241 * tmp2_217241;\n            float tmp3_217243 = tmp2_217241 * x_217242;\n            float w",
                   "_j_217244 = defunc_0_f_res_217232 * tmp3_217243;\n            float xw_j_217245 = defunc_0_f_res_217236 * w_j_217244;\n            float x2w_j_217246 = defunc_0_f_res_217236 * xw_j_217245;\n            float defunc_1_op_res_217219 = w_j_217244 + redout_221355;\n            float defunc_1_op_res_217222 = xw_j_217245 + redout_221356;\n            float defunc_1_op_res_217225 = x2w_j_217246 + redout_221357;\n            float redout_tmp_228604 = defunc_1_op_res_217219;\n            float redout_tmp_228605 = defunc_1_op_res_217222;\n            float redout_tmp_228606 = defunc_1_op_res_217225;\n            \n            redout_221355 = redout_tmp_228604;\n            redout_221356 = redout_tmp_228605;\n            redout_221357 = redout_tmp_228606;\n        }\n        defunc_2_reduce_res_217214 = redout_221355;\n        defunc_2_reduce_res_217215 = redout_221356;\n        defunc_2_reduce_res_217216 = redout_221357;\n        \n        float x_217247 = defunc_2_reduce_res_217214 *\n              defunc_2_reduce_res_217216;\n        float y_217248 = defunc_2_reduce_res_217215 *\n              defunc_2_reduce_res_217215;\n        float y_217249 = x_217247 - y_217248;\n        float det1_217250 = 1.0F / y_217249;\n        float a11_217251 = defunc_2_reduce_res_217216 * det1_217250;\n        float x_217252 = 0.0F - defunc_2_reduce_res_217215;\n        float b11_217253 = det1_217250 * x_217252;\n        float c11_217254 = defunc_2_reduce_res_217214 * det1_217250;\n        float defunc_2_reduce_res_217255;\n        float defunc_2_reduce_res_217256;\n        float redout_221359;\n        float redout_221360;\n        \n        redout_221359 = 0.0F;\n        redout_221360 = 0.0F;\n        for (int64_t i_221361 = 0; i_221361 < q_t_196696; i_221361++) {\n            bool cond_217264 = sle64(x_217205, i_221361);\n            int64_t defunc_0_f_res_217265;\n            \n            if (cond_217264) {\n                defunc_0_f_res_217265 = (int64_t) 0;\n            } else {\n                int64_t i_217266 = add64(x_21720",
                   "9, i_221361);\n                int64_t defunc_0_add_arg_217267;\n                \n                defunc_0_add_arg_217267 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_217201 *\n                                                                       n_196692 +\n                                                                       i_217266];\n                \n                int64_t defunc_1_add_res_217268 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_217267);\n                \n                defunc_0_f_res_217265 = defunc_1_add_res_217268;\n            }\n            \n            float defunc_0_f_res_217269;\n            \n            if (cond_217264) {\n                defunc_0_f_res_217269 = 0.0F;\n            } else {\n                int64_t i_217270 = add64(x_217209, i_221361);\n                float defunc_0_add_arg_217271;\n                \n                defunc_0_add_arg_217271 = ((__global\n                                            float *) mem_224214)[gtid_217201 *\n                                                                 n_196692 +\n                                                                 i_217270];\n                defunc_0_f_res_217269 = defunc_0_add_arg_217271;\n            }\n            \n            int64_t binop_p_217272 = sub64(defunc_0_f_res_217265,\n                                           defunc_0_g_res_217213);\n            float defunc_0_f_res_217273 = sitofp_i64_f32(binop_p_217272);\n            float abs_res_217274 = (float) fabs(defunc_0_f_res_217273);\n            float tmp1_217275 = abs_res_217274 / x_217210;\n            float x_217276 = tmp1_217275 * tmp1_217275;\n            float y_217277 = tmp1_217275 * x_217276;\n            float tmp2_217278 = 1.0F - y_217277;\n            float x_217279 = tmp2_217278 * tmp2_217278;\n            float tmp3_217280 = tmp2_217278 * x_217279;\n            float tmp4_217281 = defunc_0_f_res_217269 * tmp3_217280;\n          ",
                   "  float defunc_1_f_res_217282 = defunc_0_f_res_217273 * tmp4_217281;\n            float defunc_0_f_res_217283;\n            \n            if (cond_217264) {\n                defunc_0_f_res_217283 = 0.0F;\n            } else {\n                int64_t i_217284 = add64(x_217209, i_221361);\n                float defunc_0_add_arg_217285;\n                \n                defunc_0_add_arg_217285 = ((__global\n                                            float *) mem_224218)[gtid_217201 *\n                                                                 n_196692 +\n                                                                 i_217284];\n                defunc_0_f_res_217283 = defunc_0_add_arg_217285;\n            }\n            \n            float x_217286 = a11_217251 * tmp4_217281;\n            float y_217287 = b11_217253 * defunc_1_f_res_217282;\n            float x_217288 = x_217286 + y_217287;\n            float defunc_9_fit_fun_res_217289 = defunc_0_f_res_217283 *\n                  x_217288;\n            float x_217290 = b11_217253 * tmp4_217281;\n            float y_217291 = c11_217254 * defunc_1_f_res_217282;\n            float x_217292 = x_217290 + y_217291;\n            float defunc_9_slope_fun_res_217293 = defunc_0_f_res_217283 *\n                  x_217292;\n            float defunc_1_op_res_217259 = defunc_9_fit_fun_res_217289 +\n                  redout_221359;\n            float defunc_1_op_res_217262 = defunc_9_slope_fun_res_217293 +\n                  redout_221360;\n            float redout_tmp_228607 = defunc_1_op_res_217259;\n            float redout_tmp_228608 = defunc_1_op_res_217262;\n            \n            redout_221359 = redout_tmp_228607;\n            redout_221360 = redout_tmp_228608;\n        }\n        defunc_2_reduce_res_217255 = redout_221359;\n        defunc_2_reduce_res_217256 = redout_221360;\n        ((__global float *) mem_224223)[gtid_217201 * t_n_m_196759 +\n                                        gtid_217202] =\n            defunc_2_reduce_res_217255;\n        ((__",
                   "global float *) mem_224227)[gtid_217201 * t_n_m_196759 +\n                                        gtid_217202] =\n            defunc_2_reduce_res_217256;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_217192\n}\n__kernel void mainzisegmap_217367(__global int *global_failure,\n                                  int64_t m_196691, int64_t t_n_m_196759,\n                                  __global unsigned char *mem_224232, __global\n                                  unsigned char *mem_224236, __global\n                                  unsigned char *mem_224240, __global\n                                  unsigned char *mem_224245, __global\n                                  unsigned char *mem_224249, __global\n                                  unsigned char *mem_224253)\n{\n    #define segmap_group_sizze_217360 (mainzisegmap_group_sizze_216816)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228709;\n    int32_t local_tid_228710;\n    int64_t group_sizze_228713;\n    int32_t wave_sizze_228712;\n    int32_t group_tid_228711;\n    \n    global_tid_228709 = get_global_id(0);\n    local_tid_228710 = get_local_id(0);\n    group_sizze_228713 = get_local_size(0);\n    wave_sizze_228712 = LOCKSTEP_WIDTH;\n    group_tid_228711 = get_group_id(0);\n    \n    int32_t phys_tid_217367 = global_tid_228709;\n    int64_t global_tid_228714 = sext_i32_i64(group_tid_228711) *\n            segmap_group_sizze_217360 + sext_i32_i64(local_tid_228710);\n    int64_t slice_228715 = t_n_m_196759;\n    int64_t slice_228716 = m_196691 * slice_228715;\n    int64_t gtid_217365 = squot64(global_tid_228714, slice_228715);\n    int64_t remnant_228717 = global_tid_228714 - gtid_217365 * slice_228715;\n    int64_t gtid_217366 = remnant_228717;\n    int64_t remnant_228718 = remnant_228717 - gtid_217366;\n    \n    if (slt64(gtid_217365, m_196691) && slt64(gtid_217366, t_n_m_196759)) {\n        float de",
                   "func_2_reduce_res_217368;\n        \n        defunc_2_reduce_res_217368 = ((__global\n                                       float *) mem_224232)[gtid_217365 *\n                                                            t_n_m_196759 +\n                                                            gtid_217366];\n        \n        float defunc_2_reduce_res_217369;\n        \n        defunc_2_reduce_res_217369 = ((__global\n                                       float *) mem_224236)[gtid_217365 *\n                                                            t_n_m_196759 +\n                                                            gtid_217366];\n        \n        float defunc_2_reduce_res_217370;\n        \n        defunc_2_reduce_res_217370 = ((__global\n                                       float *) mem_224240)[gtid_217365 *\n                                                            t_n_m_196759 +\n                                                            gtid_217366];\n        \n        float x_217371 = defunc_2_reduce_res_217368 *\n              defunc_2_reduce_res_217370;\n        float y_217372 = defunc_2_reduce_res_217369 *\n              defunc_2_reduce_res_217369;\n        float y_217373 = x_217371 - y_217372;\n        float det1_217374 = 1.0F / y_217373;\n        float a11_217375 = defunc_2_reduce_res_217370 * det1_217374;\n        float x_217376 = 0.0F - defunc_2_reduce_res_217369;\n        float b11_217377 = det1_217374 * x_217376;\n        float c11_217378 = defunc_2_reduce_res_217368 * det1_217374;\n        \n        ((__global float *) mem_224245)[gtid_217365 * t_n_m_196759 +\n                                        gtid_217366] = a11_217375;\n        ((__global float *) mem_224249)[gtid_217365 * t_n_m_196759 +\n                                        gtid_217366] = b11_217377;\n        ((__global float *) mem_224253)[gtid_217365 * t_n_m_196759 +\n                                        gtid_217366] = c11_217378;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_217360\n}\n_",
                   "_kernel void mainzisegmap_217612(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  int64_t num_groups_217607,\n                                  int64_t num_threads_225247, __global\n                                  unsigned char *ext_mem_222256, __global\n                                  unsigned char *mem_224279, __global\n                                  unsigned char *mem_224282, __global\n                                  unsigned char *mem_224285, __global\n                                  unsigned char *mem_224288, __global\n                                  unsigned char *mem_224291, __global\n                                  unsigned char *mem_224294, __global\n                                  unsigned char *mem_224373, __global\n                                  unsigned char *mem_224376, __global\n                                  unsigned char *color_225096, __global\n                                  unsigned char *color_225097, __global\n                                  unsigned char *color_225098, __global\n                                  unsigned char *color_225099)\n{\n    #define segmap_group_sizze_217606 (mainzisegmap_group_sizze_217453)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_228822;\n    int32_t local_tid_228823;\n    int64_t group_sizze_228826;\n    int32_t wave_sizze_228825;\n   ",
                   " int32_t group_tid_228824;\n    \n    global_tid_228822 = get_global_id(0);\n    local_tid_228823 = get_local_id(0);\n    group_sizze_228826 = get_local_size(0);\n    wave_sizze_228825 = LOCKSTEP_WIDTH;\n    group_tid_228824 = get_group_id(0);\n    \n    int32_t phys_tid_217612 = global_tid_228822;\n    int32_t phys_group_id_228827;\n    \n    phys_group_id_228827 = get_group_id(0);\n    for (int32_t i_228828 = 0; i_228828 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_217606)) -\n                   phys_group_id_228827, sext_i64_i32(num_groups_217607));\n         i_228828++) {\n        int32_t virt_group_id_228829 = phys_group_id_228827 + i_228828 *\n                sext_i64_i32(num_groups_217607);\n        int64_t global_tid_228830 = sext_i32_i64(virt_group_id_228829) *\n                segmap_group_sizze_217606 + sext_i32_i64(local_tid_228823);\n        int64_t slice_228831 = m_196691;\n        int64_t gtid_217611 = global_tid_228830;\n        int64_t remnant_228832 = global_tid_228830 - gtid_217611;\n        \n        if (slt64(gtid_217611, m_196691)) {\n            int64_t x_217617;\n            \n            x_217617 = ((__global int64_t *) ext_mem_222256)[gtid_217611];\n            for (int64_t i_222122 = 0; i_222122 < n_196692; i_222122++) {\n                float x_217621;\n                \n                x_217621 = ((__global float *) mem_224279)[i_222122 * m_196691 +\n                                                           gtid_217611];\n                \n                float x_217622;\n                \n                x_217622 = ((__global float *) mem_224282)[i_222122 * m_196691 +\n                                                           gtid_217611];\n                \n                float defunc_1_f_res_217623 = x_217621 - x_217622;\n                \n                ((__global float *) color_225096)[phys_tid_217612 + i_222122 *\n                                                  num_threads_225247] =\n              ",
                   "      defunc_1_f_res_217623;\n            }\n            for (int64_t i_222128 = 0; i_222128 < n_196692; i_222128++) {\n                int64_t x_217626;\n                \n                x_217626 = ((__global int64_t *) mem_224285)[i_222128 *\n                                                             m_196691 +\n                                                             gtid_217611];\n                \n                bool cond_217627 = sle64((int64_t) 0, x_217626);\n                float defunc_0_f_res_217628;\n                \n                if (cond_217627) {\n                    bool y_217629 = slt64(x_217626, n_196692);\n                    bool bounds_check_217630 = cond_217627 && y_217629;\n                    bool index_certs_217631;\n                    \n                    if (!bounds_check_217630) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          59) == -1) {\n                                global_failure_args[0] = (int64_t) x_217626;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_217632;\n                    \n                    defunc_0_f_res_t_res_217632 = ((__global\n                                                    float *) color_225096)[phys_tid_217612 +\n                                                                           x_217626 *\n                                                                           num_threads_225247];\n                    defunc_0_f_res_217628 = defunc_0_f_res_t_res_217632;\n                } else {\n                    defunc_0_f_res_217628 = 0.0F;\n                }\n                \n                float defunc_0_f_res",
                   "_217633;\n                \n                if (cond_217627) {\n                    bool y_217634 = slt64(x_217626, n_196692);\n                    bool bounds_check_217635 = cond_217627 && y_217634;\n                    bool index_certs_217636;\n                    \n                    if (!bounds_check_217635) {\n                        {\n                            if (atomic_cmpxchg_i32_global(global_failure, -1,\n                                                          60) == -1) {\n                                global_failure_args[0] = (int64_t) x_217626;\n                                global_failure_args[1] = (int64_t) n_196692;\n                                ;\n                            }\n                            local_failure = true;\n                            goto error_0;\n                        }\n                    }\n                    \n                    float defunc_0_f_res_t_res_217637;\n                    \n                    defunc_0_f_res_t_res_217637 = ((__global\n                                                    float *) mem_224294)[x_217626 *\n                                                                         m_196691 +\n                                                                         gtid_217611];\n                    defunc_0_f_res_217633 = defunc_0_f_res_t_res_217637;\n                } else {\n                    defunc_0_f_res_217633 = 0.0F;\n                }\n                ((__global float *) color_225099)[phys_tid_217612 + i_222128 *\n                                                  num_threads_225247] =\n                    defunc_0_f_res_217633;\n                ((__global float *) color_225098)[phys_tid_217612 + i_222128 *\n                                                  num_threads_225247] =\n                    defunc_0_f_res_217628;\n            }\n            for (int64_t i_222135 = 0; i_222135 < t_n_m_196759; i_222135++) {\n                int64_t x_217641;\n                \n                x_217641 = ((__global int64_t *",
                   ") mem_224288)[i_222135 *\n                                                             m_196691 +\n                                                             gtid_217611];\n                \n                float x_217642;\n                \n                x_217642 = ((__global float *) mem_224291)[i_222135 * m_196691 +\n                                                           gtid_217611];\n                \n                int64_t min_arg_217643 = mul64(jump_t_196702, i_222135);\n                int64_t min_res_217644 = smin64(i_196779, min_arg_217643);\n                int64_t defunc_0_g_res_217645 = add64((int64_t) 1,\n                                                      min_res_217644);\n                float defunc_2_reduce_res_217646;\n                float defunc_2_reduce_res_217647;\n                float defunc_2_reduce_res_217648;\n                float defunc_2_reduce_res_217649;\n                float defunc_2_reduce_res_217650;\n                float redout_221374;\n                float redout_221375;\n                float redout_221376;\n                float redout_221377;\n                float redout_221378;\n                \n                redout_221374 = 0.0F;\n                redout_221375 = 0.0F;\n                redout_221376 = 0.0F;\n                redout_221377 = 0.0F;\n                redout_221378 = 0.0F;\n                for (int64_t i_221379 = 0; i_221379 < q_t_196696; i_221379++) {\n                    bool cond_217667 = sle64(x_217617, i_221379);\n                    int64_t defunc_0_f_res_217668;\n                    \n                    if (cond_217667) {\n                        defunc_0_f_res_217668 = (int64_t) 0;\n                    } else {\n                        int64_t i_217669 = add64(x_217641, i_221379);\n                        int64_t defunc_0_add_arg_217670;\n                        \n                        defunc_0_add_arg_217670 = ((__global\n                                                    int64_t *) mem_224285)[i_217669 *\n                 ",
                   "                                                          m_196691 +\n                                                                           gtid_217611];\n                        \n                        int64_t defunc_1_add_res_217671 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_217670);\n                        \n                        defunc_0_f_res_217668 = defunc_1_add_res_217671;\n                    }\n                    \n                    float defunc_0_f_res_217672;\n                    \n                    if (cond_217667) {\n                        defunc_0_f_res_217672 = 0.0F;\n                    } else {\n                        int64_t i_217673 = add64(x_217641, i_221379);\n                        float defunc_0_add_arg_217674;\n                        \n                        defunc_0_add_arg_217674 = ((__global\n                                                    float *) color_225099)[phys_tid_217612 +\n                                                                           i_217673 *\n                                                                           num_threads_225247];\n                        defunc_0_f_res_217672 = defunc_0_add_arg_217674;\n                    }\n                    \n                    int64_t binop_p_217675 = sub64(defunc_0_f_res_217668,\n                                                   defunc_0_g_res_217645);\n                    float defunc_0_f_res_217676 =\n                          sitofp_i64_f32(binop_p_217675);\n                    float abs_res_217677 = (float) fabs(defunc_0_f_res_217676);\n                    float tmp1_217678 = abs_res_217677 / x_217642;\n                    float x_217679 = tmp1_217678 * tmp1_217678;\n                    float y_217680 = tmp1_217678 * x_217679;\n                    float tmp2_217681 = 1.0F - y_217680;\n                    float x_217682 = tmp2_217681 * tmp2_217681;\n                    float tmp3_217683 = tmp2_217681 * x_217682;\n ",
                   "                   float w_j_217684 = defunc_0_f_res_217672 * tmp3_217683;\n                    float xw_j_217685 = defunc_0_f_res_217676 * w_j_217684;\n                    float x2w_j_217686 = defunc_0_f_res_217676 * xw_j_217685;\n                    float x3w_j_217687 = defunc_0_f_res_217676 * x2w_j_217686;\n                    float x4w_j_217688 = defunc_0_f_res_217676 * x3w_j_217687;\n                    float defunc_1_op_res_217653 = w_j_217684 + redout_221374;\n                    float defunc_1_op_res_217656 = xw_j_217685 + redout_221375;\n                    float defunc_1_op_res_217659 = x2w_j_217686 + redout_221376;\n                    float defunc_1_op_res_217662 = x3w_j_217687 + redout_221377;\n                    float defunc_1_op_res_217665 = x4w_j_217688 + redout_221378;\n                    float redout_tmp_228838 = defunc_1_op_res_217653;\n                    float redout_tmp_228839 = defunc_1_op_res_217656;\n                    float redout_tmp_228840 = defunc_1_op_res_217659;\n                    float redout_tmp_228841 = defunc_1_op_res_217662;\n                    float redout_tmp_228842 = defunc_1_op_res_217665;\n                    \n                    redout_221374 = redout_tmp_228838;\n                    redout_221375 = redout_tmp_228839;\n                    redout_221376 = redout_tmp_228840;\n                    redout_221377 = redout_tmp_228841;\n                    redout_221378 = redout_tmp_228842;\n                }\n                defunc_2_reduce_res_217646 = redout_221374;\n                defunc_2_reduce_res_217647 = redout_221375;\n                defunc_2_reduce_res_217648 = redout_221376;\n                defunc_2_reduce_res_217649 = redout_221377;\n                defunc_2_reduce_res_217650 = redout_221378;\n                \n                float x_217689 = defunc_2_reduce_res_217648 *\n                      defunc_2_reduce_res_217650;\n                float y_217690 = defunc_2_reduce_res_217649 *\n                      defunc_2_reduce_res_217649;\n      ",
                   "          float a12_217691 = x_217689 - y_217690;\n                float x_217692 = defunc_2_reduce_res_217648 *\n                      defunc_2_reduce_res_217649;\n                float y_217693 = defunc_2_reduce_res_217647 *\n                      defunc_2_reduce_res_217650;\n                float b12_217694 = x_217692 - y_217693;\n                float x_217695 = defunc_2_reduce_res_217647 *\n                      defunc_2_reduce_res_217649;\n                float y_217696 = defunc_2_reduce_res_217648 *\n                      defunc_2_reduce_res_217648;\n                float c12_217697 = x_217695 - y_217696;\n                float x_217698 = defunc_2_reduce_res_217646 *\n                      defunc_2_reduce_res_217650;\n                float b2_217699 = x_217698 - y_217696;\n                float x_217700 = defunc_2_reduce_res_217647 *\n                      defunc_2_reduce_res_217648;\n                float y_217701 = defunc_2_reduce_res_217646 *\n                      defunc_2_reduce_res_217649;\n                float c2_217702 = x_217700 - y_217701;\n                float x_217703 = defunc_2_reduce_res_217646 * a12_217691;\n                float y_217704 = defunc_2_reduce_res_217647 * b12_217694;\n                float x_217705 = x_217703 + y_217704;\n                float y_217706 = defunc_2_reduce_res_217648 * c12_217697;\n                float y_217707 = x_217705 + y_217706;\n                float det_217708 = 1.0F / y_217707;\n                float a12_217709 = a12_217691 * det_217708;\n                float b12_217710 = b12_217694 * det_217708;\n                float c12_217711 = c12_217697 * det_217708;\n                float b2_217712 = b2_217699 * det_217708;\n                float c2_217713 = c2_217702 * det_217708;\n                float defunc_2_reduce_res_217714;\n                float defunc_2_reduce_res_217715;\n                float redout_221380;\n                float redout_221381;\n                \n                redout_221380 = 0.0F;\n                redout_221381 = 0.0F;",
                   "\n                for (int64_t i_221382 = 0; i_221382 < q_t_196696; i_221382++) {\n                    bool cond_217723 = sle64(x_217617, i_221382);\n                    int64_t defunc_0_f_res_217724;\n                    \n                    if (cond_217723) {\n                        defunc_0_f_res_217724 = (int64_t) 0;\n                    } else {\n                        int64_t i_217725 = add64(x_217641, i_221382);\n                        int64_t defunc_0_add_arg_217726;\n                        \n                        defunc_0_add_arg_217726 = ((__global\n                                                    int64_t *) mem_224285)[i_217725 *\n                                                                           m_196691 +\n                                                                           gtid_217611];\n                        \n                        int64_t defunc_1_add_res_217727 = add64((int64_t) 1,\n                                                                defunc_0_add_arg_217726);\n                        \n                        defunc_0_f_res_217724 = defunc_1_add_res_217727;\n                    }\n                    \n                    float defunc_0_f_res_217728;\n                    \n                    if (cond_217723) {\n                        defunc_0_f_res_217728 = 0.0F;\n                    } else {\n                        int64_t i_217729 = add64(x_217641, i_221382);\n                        float defunc_0_add_arg_217730;\n                        \n                        defunc_0_add_arg_217730 = ((__global\n                                                    float *) color_225099)[phys_tid_217612 +\n                                                                           i_217729 *\n                                                                           num_threads_225247];\n                        defunc_0_f_res_217728 = defunc_0_add_arg_217730;\n                    }\n                    \n                    int64_t binop_p_217731 = sub64(",
                   "defunc_0_f_res_217724,\n                                                   defunc_0_g_res_217645);\n                    float defunc_0_f_res_217732 =\n                          sitofp_i64_f32(binop_p_217731);\n                    float abs_res_217733 = (float) fabs(defunc_0_f_res_217732);\n                    float tmp1_217734 = abs_res_217733 / x_217642;\n                    float x_217735 = tmp1_217734 * tmp1_217734;\n                    float y_217736 = tmp1_217734 * x_217735;\n                    float tmp2_217737 = 1.0F - y_217736;\n                    float x_217738 = tmp2_217737 * tmp2_217737;\n                    float tmp3_217739 = tmp2_217737 * x_217738;\n                    float tmp4_217740 = defunc_0_f_res_217728 * tmp3_217739;\n                    float defunc_1_f_res_217741 = defunc_0_f_res_217732 *\n                          tmp4_217740;\n                    float defunc_1_f_res_217742 = defunc_0_f_res_217732 *\n                          defunc_1_f_res_217741;\n                    float defunc_0_f_res_217743;\n                    \n                    if (cond_217723) {\n                        defunc_0_f_res_217743 = 0.0F;\n                    } else {\n                        int64_t i_217744 = add64(x_217641, i_221382);\n                        float defunc_0_add_arg_217745;\n                        \n                        defunc_0_add_arg_217745 = ((__global\n                                                    float *) color_225098)[phys_tid_217612 +\n                                                                           i_217744 *\n                                                                           num_threads_225247];\n                        defunc_0_f_res_217743 = defunc_0_add_arg_217745;\n                    }\n                    \n                    float x_217746 = a12_217709 * tmp4_217740;\n                    float y_217747 = b12_217710 * defunc_1_f_res_217741;\n                    float x_217748 = x_217746 + y_217747;\n                    float y_217749 =",
                   " c12_217711 * defunc_1_f_res_217742;\n                    float x_217750 = x_217748 + y_217749;\n                    float defunc_9_fit_fun_res_217751 = defunc_0_f_res_217743 *\n                          x_217750;\n                    float x_217752 = b12_217710 * tmp4_217740;\n                    float y_217753 = b2_217712 * defunc_1_f_res_217741;\n                    float x_217754 = x_217752 + y_217753;\n                    float y_217755 = c2_217713 * defunc_1_f_res_217742;\n                    float x_217756 = x_217754 + y_217755;\n                    float defunc_9_slope_fun_res_217757 =\n                          defunc_0_f_res_217743 * x_217756;\n                    float defunc_1_op_res_217718 = defunc_9_fit_fun_res_217751 +\n                          redout_221380;\n                    float defunc_1_op_res_217721 =\n                          defunc_9_slope_fun_res_217757 + redout_221381;\n                    float redout_tmp_228843 = defunc_1_op_res_217718;\n                    float redout_tmp_228844 = defunc_1_op_res_217721;\n                    \n                    redout_221380 = redout_tmp_228843;\n                    redout_221381 = redout_tmp_228844;\n                }\n                defunc_2_reduce_res_217714 = redout_221380;\n                defunc_2_reduce_res_217715 = redout_221381;\n                ((__global float *) color_225097)[phys_tid_217612 + i_222135 *\n                                                  num_threads_225247] =\n                    defunc_2_reduce_res_217714;\n                ((__global float *) color_225096)[phys_tid_217612 + i_222135 *\n                                                  num_threads_225247] =\n                    defunc_2_reduce_res_217715;\n            }\n            for (int64_t i_228845 = 0; i_228845 < t_n_m_196759; i_228845++) {\n                float tmp_228846;\n                \n                tmp_228846 = ((__global float *) color_225097)[phys_tid_217612 +\n                                                               i_228845",
                   " *\n                                                               num_threads_225247];\n                ((__global float *) mem_224373)[gtid_217611 + i_228845 *\n                                                m_196691] = tmp_228846;\n            }\n            for (int64_t i_228847 = 0; i_228847 < t_n_m_196759; i_228847++) {\n                float tmp_228848;\n                \n                tmp_228848 = ((__global float *) color_225096)[phys_tid_217612 +\n                                                               i_228847 *\n                                                               num_threads_225247];\n                ((__global float *) mem_224376)[gtid_217611 + i_228847 *\n                                                m_196691] = tmp_228848;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_217606\n}\n__kernel void mainzisegmap_218410(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n                                  unsigned char *mem_224381)\n{\n    #define segmap_group_sizze_218405 (mainzisegmap_group_sizze_218379)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228849;\n    int32_t local_tid_228850;\n    int64_t group_sizze_228853;\n    int32_t wave_sizze_228852;\n    int32_t group_tid_228851;\n    \n    global_tid_228849 = get_global_id(0);\n    local_tid_228850 = get_local_id(0);\n    group_sizze_228853 = get_local_size(0);\n    wave_sizze_228852 = LOCKSTEP_WIDTH;\n    group_tid_228851 = get_group_id(0);\n    \n    int32_t phys_tid_218410 = global_tid_228849;\n    int64_t global_tid_228854 = sext_i32_i64(group_tid_228851) *\n            segmap_group_siz",
                   "ze_218405 + sext_i32_i64(local_tid_228850);\n    int64_t slice_228855 = n_196692;\n    int64_t slice_228856 = m_196691 * slice_228855;\n    int64_t gtid_218408 = squot64(global_tid_228854, slice_228855);\n    int64_t remnant_228857 = global_tid_228854 - gtid_218408 * slice_228855;\n    int64_t gtid_218409 = remnant_228857;\n    int64_t remnant_228858 = remnant_228857 - gtid_218409;\n    \n    if (slt64(gtid_218408, m_196691) && slt64(gtid_218409, n_196692)) {\n        float x_218411;\n        \n        x_218411 = ((__global float *) Y_mem_222225)[gtid_218408 * n_196692 +\n                                                     gtid_218409];\n        \n        float x_218412;\n        \n        x_218412 = ((__global float *) mem_223977)[gtid_218408 * n_196692 +\n                                                   gtid_218409];\n        \n        float defunc_1_f_res_218413 = x_218411 - x_218412;\n        \n        ((__global float *) mem_224381)[gtid_218408 * n_196692 + gtid_218409] =\n            defunc_1_f_res_218413;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218405\n}\n__kernel void mainzisegmap_218427(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_224381, __global\n                                  unsigned char *mem_224386, __global\n                                  unsigned char *mem_224390)\n{\n    #define segmap_group_sizze_218421 (mainzisegmap_group_sizze_218323)\n    \n    const int block_",
                   "dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228859;\n    int32_t local_tid_228860;\n    int64_t group_sizze_228863;\n    int32_t wave_sizze_228862;\n    int32_t group_tid_228861;\n    \n    global_tid_228859 = get_global_id(0);\n    local_tid_228860 = get_local_id(0);\n    group_sizze_228863 = get_local_size(0);\n    wave_sizze_228862 = LOCKSTEP_WIDTH;\n    group_tid_228861 = get_group_id(0);\n    \n    int32_t phys_tid_218427 = global_tid_228859;\n    int64_t global_tid_228864 = sext_i32_i64(group_tid_228861) *\n            segmap_group_sizze_218421 + sext_i32_i64(local_tid_228860);\n    int64_t slice_228865 = n_196692;\n    int64_t slice_228866 = m_196691 * slice_228865;\n    int64_t gtid_218425 = squot64(global_tid_228864, slice_228865);\n    int64_t remnant_228867 = global_tid_228864 - gtid_218425 * slice_228865;\n    int64_t gtid_218426 = remnant_228867;\n    int64_t remnant_228868 = remnant_228867 - gtid_218426;\n    \n    if (slt64(gtid_218425, m_196691) && slt64(gtid_218426, n_196692)) {\n        int64_t x_218430;\n        \n        x_218430 = ((__global int64_t *) ext_mem_222257)[gtid_218425 *\n                                                         n_196692 +\n                                                         gtid_218426];\n        \n        bool cond_218431 = sle64((int64_t) 0, x_218430);\n        float defunc_0_f_res_218432;\n        \n        if (cond_218431) {\n            bool y_218433 = slt64(x_218430, n_196692);\n            bool bounds_check_218434 = cond_218431 && y_218433;\n            bool index_certs_218435;\n            \n            if (!bounds_check_218434) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 61) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_218430;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n  ",
                   "                  return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_218436;\n            \n            defunc_0_f_res_t_res_218436 = ((__global\n                                            float *) mem_224381)[gtid_218425 *\n                                                                 n_196692 +\n                                                                 x_218430];\n            defunc_0_f_res_218432 = defunc_0_f_res_t_res_218436;\n        } else {\n            defunc_0_f_res_218432 = 0.0F;\n        }\n        \n        float defunc_0_f_res_218437;\n        \n        if (cond_218431) {\n            bool y_218438 = slt64(x_218430, n_196692);\n            bool bounds_check_218439 = cond_218431 && y_218438;\n            bool index_certs_218440;\n            \n            if (!bounds_check_218439) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 62) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_218430;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_218441;\n            \n            defunc_0_f_res_t_res_218441 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_218425 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_218430 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_218437 = defunc_0_f_res_t_res_218441;\n        } else {\n            defunc_0_f_res_218437 = 0.0F;\n        }\n        ((__global float *) mem_224386)[gtid_218425 * n_196692 + gtid_21842",
                   "6] =\n            defunc_0_f_res_218437;\n        ((__global float *) mem_224390)[gtid_218425 * n_196692 + gtid_218426] =\n            defunc_0_f_res_218432;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218421\n}\n__kernel void mainzisegmap_218457(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t q_t_196696, int64_t jump_t_196702,\n                                  int64_t t_n_m_196759, int64_t i_196779,\n                                  __global unsigned char *ext_mem_222256,\n                                  __global unsigned char *ext_mem_222257,\n                                  __global unsigned char *ext_mem_222517,\n                                  __global unsigned char *ext_mem_222518,\n                                  __global unsigned char *mem_224386, __global\n                                  unsigned char *mem_224390, __global\n                                  unsigned char *mem_224395, __global\n                                  unsigned char *mem_224399)\n{\n    #define segmap_group_sizze_218446 (mainzisegmap_group_sizze_217765)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228869;\n    int32_t local_tid_228870;\n    int64_t group_sizze_228873;\n    int32_t wave_sizze_228872;\n    int32_t group_tid_228871;\n    \n    global_tid_228869 = get_global_id(0);\n    local_tid_228870 = get_local_id(0);\n    group_sizze_228873 = get_local_size(0);\n    wave_sizze_228872 = LOCKSTEP_WIDTH;\n    group_tid_228871 = get_group_id(0);\n    \n    int32_t phys_tid_218457 = global_tid_228869;\n    int64_t global_tid_228874 = sext_i32_i64(group_tid_228871) *\n            segmap_group_sizze_218446 + sext_i32_i64(local_tid_228870);\n    int64_t slice_228875 = t_n_m_196759;\n    int64_t slice_228876 = m_196691 * slice_228875;\n    int64_t gtid_218455 = squot64(glo",
                   "bal_tid_228874, slice_228875);\n    int64_t remnant_228877 = global_tid_228874 - gtid_218455 * slice_228875;\n    int64_t gtid_218456 = remnant_228877;\n    int64_t remnant_228878 = remnant_228877 - gtid_218456;\n    \n    if (slt64(gtid_218455, m_196691) && slt64(gtid_218456, t_n_m_196759)) {\n        int64_t x_218459;\n        \n        x_218459 = ((__global int64_t *) ext_mem_222256)[gtid_218455];\n        \n        int64_t x_218463;\n        \n        x_218463 = ((__global int64_t *) ext_mem_222518)[gtid_218455 *\n                                                         t_n_m_196759 +\n                                                         gtid_218456];\n        \n        float x_218464;\n        \n        x_218464 = ((__global float *) ext_mem_222517)[gtid_218455 *\n                                                       t_n_m_196759 +\n                                                       gtid_218456];\n        \n        int64_t min_arg_218465 = mul64(jump_t_196702, gtid_218456);\n        int64_t min_res_218466 = smin64(i_196779, min_arg_218465);\n        int64_t defunc_0_g_res_218467 = add64((int64_t) 1, min_res_218466);\n        float defunc_2_reduce_res_218468;\n        float defunc_2_reduce_res_218469;\n        float defunc_2_reduce_res_218470;\n        float defunc_2_reduce_res_218471;\n        float defunc_2_reduce_res_218472;\n        float redout_221387;\n        float redout_221388;\n        float redout_221389;\n        float redout_221390;\n        float redout_221391;\n        \n        redout_221387 = 0.0F;\n        redout_221388 = 0.0F;\n        redout_221389 = 0.0F;\n        redout_221390 = 0.0F;\n        redout_221391 = 0.0F;\n        for (int64_t i_221392 = 0; i_221392 < q_t_196696; i_221392++) {\n            bool cond_218489 = sle64(x_218459, i_221392);\n            int64_t defunc_0_f_res_218490;\n            \n            if (cond_218489) {\n                defunc_0_f_res_218490 = (int64_t) 0;\n            } else {\n                int64_t i_218491 = add64(x_218463, i_221392);\n         ",
                   "       int64_t defunc_0_add_arg_218492;\n                \n                defunc_0_add_arg_218492 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_218455 *\n                                                                       n_196692 +\n                                                                       i_218491];\n                \n                int64_t defunc_1_add_res_218493 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_218492);\n                \n                defunc_0_f_res_218490 = defunc_1_add_res_218493;\n            }\n            \n            float defunc_0_f_res_218494;\n            \n            if (cond_218489) {\n                defunc_0_f_res_218494 = 0.0F;\n            } else {\n                int64_t i_218495 = add64(x_218463, i_221392);\n                float defunc_0_add_arg_218496;\n                \n                defunc_0_add_arg_218496 = ((__global\n                                            float *) mem_224386)[gtid_218455 *\n                                                                 n_196692 +\n                                                                 i_218495];\n                defunc_0_f_res_218494 = defunc_0_add_arg_218496;\n            }\n            \n            int64_t binop_p_218497 = sub64(defunc_0_f_res_218490,\n                                           defunc_0_g_res_218467);\n            float defunc_0_f_res_218498 = sitofp_i64_f32(binop_p_218497);\n            float abs_res_218499 = (float) fabs(defunc_0_f_res_218498);\n            float tmp1_218500 = abs_res_218499 / x_218464;\n            float x_218501 = tmp1_218500 * tmp1_218500;\n            float y_218502 = tmp1_218500 * x_218501;\n            float tmp2_218503 = 1.0F - y_218502;\n            float x_218504 = tmp2_218503 * tmp2_218503;\n            float tmp3_218505 = tmp2_218503 * x_218504;\n            float w_j_218506 = defunc_0_f_res_218494 * tmp3_218505;\n            float xw_j_218507 = de",
                   "func_0_f_res_218498 * w_j_218506;\n            float x2w_j_218508 = defunc_0_f_res_218498 * xw_j_218507;\n            float x3w_j_218509 = defunc_0_f_res_218498 * x2w_j_218508;\n            float x4w_j_218510 = defunc_0_f_res_218498 * x3w_j_218509;\n            float defunc_1_op_res_218475 = w_j_218506 + redout_221387;\n            float defunc_1_op_res_218478 = xw_j_218507 + redout_221388;\n            float defunc_1_op_res_218481 = x2w_j_218508 + redout_221389;\n            float defunc_1_op_res_218484 = x3w_j_218509 + redout_221390;\n            float defunc_1_op_res_218487 = x4w_j_218510 + redout_221391;\n            float redout_tmp_228879 = defunc_1_op_res_218475;\n            float redout_tmp_228880 = defunc_1_op_res_218478;\n            float redout_tmp_228881 = defunc_1_op_res_218481;\n            float redout_tmp_228882 = defunc_1_op_res_218484;\n            float redout_tmp_228883 = defunc_1_op_res_218487;\n            \n            redout_221387 = redout_tmp_228879;\n            redout_221388 = redout_tmp_228880;\n            redout_221389 = redout_tmp_228881;\n            redout_221390 = redout_tmp_228882;\n            redout_221391 = redout_tmp_228883;\n        }\n        defunc_2_reduce_res_218468 = redout_221387;\n        defunc_2_reduce_res_218469 = redout_221388;\n        defunc_2_reduce_res_218470 = redout_221389;\n        defunc_2_reduce_res_218471 = redout_221390;\n        defunc_2_reduce_res_218472 = redout_221391;\n        \n        float x_218511 = defunc_2_reduce_res_218470 *\n              defunc_2_reduce_res_218472;\n        float y_218512 = defunc_2_reduce_res_218471 *\n              defunc_2_reduce_res_218471;\n        float a12_218513 = x_218511 - y_218512;\n        float x_218514 = defunc_2_reduce_res_218470 *\n              defunc_2_reduce_res_218471;\n        float y_218515 = defunc_2_reduce_res_218469 *\n              defunc_2_reduce_res_218472;\n        float b12_218516 = x_218514 - y_218515;\n        float x_218517 = defunc_2_reduce_res_218469 *\n              defunc_",
                   "2_reduce_res_218471;\n        float y_218518 = defunc_2_reduce_res_218470 *\n              defunc_2_reduce_res_218470;\n        float c12_218519 = x_218517 - y_218518;\n        float x_218520 = defunc_2_reduce_res_218468 *\n              defunc_2_reduce_res_218472;\n        float b2_218521 = x_218520 - y_218518;\n        float x_218522 = defunc_2_reduce_res_218469 *\n              defunc_2_reduce_res_218470;\n        float y_218523 = defunc_2_reduce_res_218468 *\n              defunc_2_reduce_res_218471;\n        float c2_218524 = x_218522 - y_218523;\n        float x_218525 = defunc_2_reduce_res_218468 * a12_218513;\n        float y_218526 = defunc_2_reduce_res_218469 * b12_218516;\n        float x_218527 = x_218525 + y_218526;\n        float y_218528 = defunc_2_reduce_res_218470 * c12_218519;\n        float y_218529 = x_218527 + y_218528;\n        float det_218530 = 1.0F / y_218529;\n        float a12_218531 = a12_218513 * det_218530;\n        float b12_218532 = b12_218516 * det_218530;\n        float c12_218533 = c12_218519 * det_218530;\n        float b2_218534 = b2_218521 * det_218530;\n        float c2_218535 = c2_218524 * det_218530;\n        float defunc_2_reduce_res_218536;\n        float defunc_2_reduce_res_218537;\n        float redout_221393;\n        float redout_221394;\n        \n        redout_221393 = 0.0F;\n        redout_221394 = 0.0F;\n        for (int64_t i_221395 = 0; i_221395 < q_t_196696; i_221395++) {\n            bool cond_218545 = sle64(x_218459, i_221395);\n            int64_t defunc_0_f_res_218546;\n            \n            if (cond_218545) {\n                defunc_0_f_res_218546 = (int64_t) 0;\n            } else {\n                int64_t i_218547 = add64(x_218463, i_221395);\n                int64_t defunc_0_add_arg_218548;\n                \n                defunc_0_add_arg_218548 = ((__global\n                                            int64_t *) ext_mem_222257)[gtid_218455 *\n                                                                       n_196692 +\n             ",
                   "                                                          i_218547];\n                \n                int64_t defunc_1_add_res_218549 = add64((int64_t) 1,\n                                                        defunc_0_add_arg_218548);\n                \n                defunc_0_f_res_218546 = defunc_1_add_res_218549;\n            }\n            \n            float defunc_0_f_res_218550;\n            \n            if (cond_218545) {\n                defunc_0_f_res_218550 = 0.0F;\n            } else {\n                int64_t i_218551 = add64(x_218463, i_221395);\n                float defunc_0_add_arg_218552;\n                \n                defunc_0_add_arg_218552 = ((__global\n                                            float *) mem_224386)[gtid_218455 *\n                                                                 n_196692 +\n                                                                 i_218551];\n                defunc_0_f_res_218550 = defunc_0_add_arg_218552;\n            }\n            \n            int64_t binop_p_218553 = sub64(defunc_0_f_res_218546,\n                                           defunc_0_g_res_218467);\n            float defunc_0_f_res_218554 = sitofp_i64_f32(binop_p_218553);\n            float abs_res_218555 = (float) fabs(defunc_0_f_res_218554);\n            float tmp1_218556 = abs_res_218555 / x_218464;\n            float x_218557 = tmp1_218556 * tmp1_218556;\n            float y_218558 = tmp1_218556 * x_218557;\n            float tmp2_218559 = 1.0F - y_218558;\n            float x_218560 = tmp2_218559 * tmp2_218559;\n            float tmp3_218561 = tmp2_218559 * x_218560;\n            float tmp4_218562 = defunc_0_f_res_218550 * tmp3_218561;\n            float defunc_1_f_res_218563 = defunc_0_f_res_218554 * tmp4_218562;\n            float defunc_1_f_res_218564 = defunc_0_f_res_218554 *\n                  defunc_1_f_res_218563;\n            float defunc_0_f_res_218565;\n            \n            if (cond_218545) {\n                defunc_0_f_res_218565 = 0.0F;\n      ",
                   "      } else {\n                int64_t i_218566 = add64(x_218463, i_221395);\n                float defunc_0_add_arg_218567;\n                \n                defunc_0_add_arg_218567 = ((__global\n                                            float *) mem_224390)[gtid_218455 *\n                                                                 n_196692 +\n                                                                 i_218566];\n                defunc_0_f_res_218565 = defunc_0_add_arg_218567;\n            }\n            \n            float x_218568 = a12_218531 * tmp4_218562;\n            float y_218569 = b12_218532 * defunc_1_f_res_218563;\n            float x_218570 = x_218568 + y_218569;\n            float y_218571 = c12_218533 * defunc_1_f_res_218564;\n            float x_218572 = x_218570 + y_218571;\n            float defunc_9_fit_fun_res_218573 = defunc_0_f_res_218565 *\n                  x_218572;\n            float x_218574 = b12_218532 * tmp4_218562;\n            float y_218575 = b2_218534 * defunc_1_f_res_218563;\n            float x_218576 = x_218574 + y_218575;\n            float y_218577 = c2_218535 * defunc_1_f_res_218564;\n            float x_218578 = x_218576 + y_218577;\n            float defunc_9_slope_fun_res_218579 = defunc_0_f_res_218565 *\n                  x_218578;\n            float defunc_1_op_res_218540 = defunc_9_fit_fun_res_218573 +\n                  redout_221393;\n            float defunc_1_op_res_218543 = defunc_9_slope_fun_res_218579 +\n                  redout_221394;\n            float redout_tmp_228884 = defunc_1_op_res_218540;\n            float redout_tmp_228885 = defunc_1_op_res_218543;\n            \n            redout_221393 = redout_tmp_228884;\n            redout_221394 = redout_tmp_228885;\n        }\n        defunc_2_reduce_res_218536 = redout_221393;\n        defunc_2_reduce_res_218537 = redout_221394;\n        ((__global float *) mem_224395)[gtid_218455 * t_n_m_196759 +\n                                        gtid_218456] =\n            defunc_2_reduce_re",
                   "s_218536;\n        ((__global float *) mem_224399)[gtid_218455 * t_n_m_196759 +\n                                        gtid_218456] =\n            defunc_2_reduce_res_218537;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218446\n}\n__kernel void mainzisegmap_218665(__global int *global_failure,\n                                  int64_t m_196691, int64_t t_n_m_196759,\n                                  __global unsigned char *mem_224404, __global\n                                  unsigned char *mem_224408, __global\n                                  unsigned char *mem_224412, __global\n                                  unsigned char *mem_224416, __global\n                                  unsigned char *mem_224420, __global\n                                  unsigned char *mem_224425, __global\n                                  unsigned char *mem_224429, __global\n                                  unsigned char *mem_224433, __global\n                                  unsigned char *mem_224437, __global\n                                  unsigned char *mem_224441)\n{\n    #define segmap_group_sizze_218656 (mainzisegmap_group_sizze_218003)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229014;\n    int32_t local_tid_229015;\n    int64_t group_sizze_229018;\n    int32_t wave_sizze_229017;\n    int32_t group_tid_229016;\n    \n    global_tid_229014 = get_global_id(0);\n    local_tid_229015 = get_local_id(0);\n    group_sizze_229018 = get_local_size(0);\n    wave_sizze_229017 = LOCKSTEP_WIDTH;\n    group_tid_229016 = get_group_id(0);\n    \n    int32_t phys_tid_218665 = global_tid_229014;\n    int64_t global_tid_229019 = sext_i32_i64(group_tid_229016) *\n            segmap_group_sizze_218656 + sext_i32_i64(local_tid_229015);\n    int64_t slice_229020 = t_n_m_196759;\n    int64_t slice_229021 = m_196691 * slice_229020;\n    int64_t gtid_218663 = squot64(global_",
                   "tid_229019, slice_229020);\n    int64_t remnant_229022 = global_tid_229019 - gtid_218663 * slice_229020;\n    int64_t gtid_218664 = remnant_229022;\n    int64_t remnant_229023 = remnant_229022 - gtid_218664;\n    \n    if (slt64(gtid_218663, m_196691) && slt64(gtid_218664, t_n_m_196759)) {\n        float defunc_2_reduce_res_218666;\n        \n        defunc_2_reduce_res_218666 = ((__global\n                                       float *) mem_224404)[gtid_218663 *\n                                                            t_n_m_196759 +\n                                                            gtid_218664];\n        \n        float defunc_2_reduce_res_218667;\n        \n        defunc_2_reduce_res_218667 = ((__global\n                                       float *) mem_224408)[gtid_218663 *\n                                                            t_n_m_196759 +\n                                                            gtid_218664];\n        \n        float defunc_2_reduce_res_218668;\n        \n        defunc_2_reduce_res_218668 = ((__global\n                                       float *) mem_224412)[gtid_218663 *\n                                                            t_n_m_196759 +\n                                                            gtid_218664];\n        \n        float defunc_2_reduce_res_218669;\n        \n        defunc_2_reduce_res_218669 = ((__global\n                                       float *) mem_224416)[gtid_218663 *\n                                                            t_n_m_196759 +\n                                                            gtid_218664];\n        \n        float defunc_2_reduce_res_218670;\n        \n        defunc_2_reduce_res_218670 = ((__global\n                                       float *) mem_224420)[gtid_218663 *\n                                                            t_n_m_196759 +\n                                                            gtid_218664];\n        \n        float x_218671 = defunc_2_reduce_res_218668 *\n     ",
                   "         defunc_2_reduce_res_218670;\n        float y_218672 = defunc_2_reduce_res_218669 *\n              defunc_2_reduce_res_218669;\n        float a12_218673 = x_218671 - y_218672;\n        float x_218674 = defunc_2_reduce_res_218668 *\n              defunc_2_reduce_res_218669;\n        float y_218675 = defunc_2_reduce_res_218667 *\n              defunc_2_reduce_res_218670;\n        float b12_218676 = x_218674 - y_218675;\n        float x_218677 = defunc_2_reduce_res_218667 *\n              defunc_2_reduce_res_218669;\n        float y_218678 = defunc_2_reduce_res_218668 *\n              defunc_2_reduce_res_218668;\n        float c12_218679 = x_218677 - y_218678;\n        float x_218680 = defunc_2_reduce_res_218666 *\n              defunc_2_reduce_res_218670;\n        float b2_218681 = x_218680 - y_218678;\n        float x_218682 = defunc_2_reduce_res_218667 *\n              defunc_2_reduce_res_218668;\n        float y_218683 = defunc_2_reduce_res_218666 *\n              defunc_2_reduce_res_218669;\n        float c2_218684 = x_218682 - y_218683;\n        float x_218685 = defunc_2_reduce_res_218666 * a12_218673;\n        float y_218686 = defunc_2_reduce_res_218667 * b12_218676;\n        float x_218687 = x_218685 + y_218686;\n        float y_218688 = defunc_2_reduce_res_218668 * c12_218679;\n        float y_218689 = x_218687 + y_218688;\n        float det_218690 = 1.0F / y_218689;\n        float a12_218691 = a12_218673 * det_218690;\n        float b12_218692 = b12_218676 * det_218690;\n        float c12_218693 = c12_218679 * det_218690;\n        float b2_218694 = b2_218681 * det_218690;\n        float c2_218695 = c2_218684 * det_218690;\n        \n        ((__global float *) mem_224425)[gtid_218663 * t_n_m_196759 +\n                                        gtid_218664] = a12_218691;\n        ((__global float *) mem_224429)[gtid_218663 * t_n_m_196759 +\n                                        gtid_218664] = b12_218692;\n        ((__global float *) mem_224433)[gtid_218663 * t_n_m_196759 +\n                 ",
                   "                       gtid_218664] = c12_218693;\n        ((__global float *) mem_224437)[gtid_218663 * t_n_m_196759 +\n                                        gtid_218664] = b2_218694;\n        ((__global float *) mem_224441)[gtid_218663 * t_n_m_196759 +\n                                        gtid_218664] = c2_218695;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218656\n}\n__kernel void mainzisegmap_218956(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n                                  unsigned char *mem_224477)\n{\n    #define segmap_group_sizze_218951 (mainzisegmap_group_sizze_218925)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229112;\n    int32_t local_tid_229113;\n    int64_t group_sizze_229116;\n    int32_t wave_sizze_229115;\n    int32_t group_tid_229114;\n    \n    global_tid_229112 = get_global_id(0);\n    local_tid_229113 = get_local_id(0);\n    group_sizze_229116 = get_local_size(0);\n    wave_sizze_229115 = LOCKSTEP_WIDTH;\n    group_tid_229114 = get_group_id(0);\n    \n    int32_t phys_tid_218956 = global_tid_229112;\n    int64_t global_tid_229117 = sext_i32_i64(group_tid_229114) *\n            segmap_group_sizze_218951 + sext_i32_i64(local_tid_229113);\n    int64_t slice_229118 = n_196692;\n    int64_t slice_229119 = m_196691 * slice_229118;\n    int64_t gtid_218954 = squot64(global_tid_229117, slice_229118);\n    int64_t remnant_229120 = global_tid_229117 - gtid_218954 * slice_229118;\n    int64_t gtid_218955 = remnant_229120;\n    int64_t remnant_229121 = remnant_229120 - gtid_218955;\n    \n    if (slt64(gtid_218954, m_196691) && slt64(gtid_218955, n_196692)) {\n        float x_218957;\n        \n        x_218957 = ((__global float",
                   " *) Y_mem_222225)[gtid_218954 * n_196692 +\n                                                     gtid_218955];\n        \n        float x_218958;\n        \n        x_218958 = ((__global float *) mem_223977)[gtid_218954 * n_196692 +\n                                                   gtid_218955];\n        \n        float defunc_1_f_res_218959 = x_218957 - x_218958;\n        \n        ((__global float *) mem_224477)[gtid_218954 * n_196692 + gtid_218955] =\n            defunc_1_f_res_218959;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218951\n}\n__kernel void mainzisegmap_218973(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_224477, __global\n                                  unsigned char *mem_224482, __global\n                                  unsigned char *mem_224486)\n{\n    #define segmap_group_sizze_218967 (mainzisegmap_group_sizze_218869)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229122;\n    int32_t local_tid_229123;\n    int64_t group_sizze_229126;\n    int32_t wave_sizze_229125;\n    int32_t group_tid_229124;\n    \n    global_tid_229122 = get_global_id(0);\n    local_tid_229123 = get_local_id(0);\n    group_sizze_229126 = get_local_size(0);\n    wave_sizze_229125 = LOCKSTEP_WIDTH;\n    group_tid_229124 = get_group_id(0);\n    \n    int32_t phys_tid_218973 ",
                   "= global_tid_229122;\n    int64_t global_tid_229127 = sext_i32_i64(group_tid_229124) *\n            segmap_group_sizze_218967 + sext_i32_i64(local_tid_229123);\n    int64_t slice_229128 = n_196692;\n    int64_t slice_229129 = m_196691 * slice_229128;\n    int64_t gtid_218971 = squot64(global_tid_229127, slice_229128);\n    int64_t remnant_229130 = global_tid_229127 - gtid_218971 * slice_229128;\n    int64_t gtid_218972 = remnant_229130;\n    int64_t remnant_229131 = remnant_229130 - gtid_218972;\n    \n    if (slt64(gtid_218971, m_196691) && slt64(gtid_218972, n_196692)) {\n        int64_t x_218976;\n        \n        x_218976 = ((__global int64_t *) ext_mem_222257)[gtid_218971 *\n                                                         n_196692 +\n                                                         gtid_218972];\n        \n        bool cond_218977 = sle64((int64_t) 0, x_218976);\n        float defunc_0_f_res_218978;\n        \n        if (cond_218977) {\n            bool y_218979 = slt64(x_218976, n_196692);\n            bool bounds_check_218980 = cond_218977 && y_218979;\n            bool index_certs_218981;\n            \n            if (!bounds_check_218980) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 63) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_218976;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_218982;\n            \n            defunc_0_f_res_t_res_218982 = ((__global\n                                            float *) mem_224477)[gtid_218971 *\n                                                                 n_196692 +\n                                                                 x_218976];\n            defunc_0_f_res_218978 = defunc_0_f_res_t_res_218982;\n        } else {\n            defunc_0_f_res_",
                   "218978 = 0.0F;\n        }\n        \n        float defunc_0_f_res_218983;\n        \n        if (cond_218977) {\n            bool y_218984 = slt64(x_218976, n_196692);\n            bool bounds_check_218985 = cond_218977 && y_218984;\n            bool index_certs_218986;\n            \n            if (!bounds_check_218985) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 64) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_218976;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_218987;\n            \n            defunc_0_f_res_t_res_218987 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_218971 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_218976 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_218983 = defunc_0_f_res_t_res_218987;\n        } else {\n            defunc_0_f_res_218983 = 0.0F;\n        }\n        ((__global float *) mem_224482)[gtid_218971 * n_196692 + gtid_218972] =\n            defunc_0_f_res_218983;\n        ((__global float *) mem_224486)[gtid_218971 * n_196692 + gtid_218972] =\n            defunc_0_f_res_218978;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_218967\n}\n__kernel void mainzisegmap_219268(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n           ",
                   "                       unsigned char *mem_224501)\n{\n    #define segmap_group_sizze_219263 (mainzisegmap_group_sizze_219237)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229152;\n    int32_t local_tid_229153;\n    int64_t group_sizze_229156;\n    int32_t wave_sizze_229155;\n    int32_t group_tid_229154;\n    \n    global_tid_229152 = get_global_id(0);\n    local_tid_229153 = get_local_id(0);\n    group_sizze_229156 = get_local_size(0);\n    wave_sizze_229155 = LOCKSTEP_WIDTH;\n    group_tid_229154 = get_group_id(0);\n    \n    int32_t phys_tid_219268 = global_tid_229152;\n    int64_t global_tid_229157 = sext_i32_i64(group_tid_229154) *\n            segmap_group_sizze_219263 + sext_i32_i64(local_tid_229153);\n    int64_t slice_229158 = n_196692;\n    int64_t slice_229159 = m_196691 * slice_229158;\n    int64_t gtid_219266 = squot64(global_tid_229157, slice_229158);\n    int64_t remnant_229160 = global_tid_229157 - gtid_219266 * slice_229158;\n    int64_t gtid_219267 = remnant_229160;\n    int64_t remnant_229161 = remnant_229160 - gtid_219267;\n    \n    if (slt64(gtid_219266, m_196691) && slt64(gtid_219267, n_196692)) {\n        float x_219269;\n        \n        x_219269 = ((__global float *) Y_mem_222225)[gtid_219266 * n_196692 +\n                                                     gtid_219267];\n        \n        float x_219270;\n        \n        x_219270 = ((__global float *) mem_223977)[gtid_219266 * n_196692 +\n                                                   gtid_219267];\n        \n        float defunc_1_f_res_219271 = x_219269 - x_219270;\n        \n        ((__global float *) mem_224501)[gtid_219266 * n_196692 + gtid_219267] =\n            defunc_1_f_res_219271;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_219263\n}\n__kernel void mainzisegmap_219285(__global int *global_failure,\n                                  int failure_is_an_option, __globa",
                   "l\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_224501, __global\n                                  unsigned char *mem_224506, __global\n                                  unsigned char *mem_224510)\n{\n    #define segmap_group_sizze_219279 (mainzisegmap_group_sizze_219181)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229162;\n    int32_t local_tid_229163;\n    int64_t group_sizze_229166;\n    int32_t wave_sizze_229165;\n    int32_t group_tid_229164;\n    \n    global_tid_229162 = get_global_id(0);\n    local_tid_229163 = get_local_id(0);\n    group_sizze_229166 = get_local_size(0);\n    wave_sizze_229165 = LOCKSTEP_WIDTH;\n    group_tid_229164 = get_group_id(0);\n    \n    int32_t phys_tid_219285 = global_tid_229162;\n    int64_t global_tid_229167 = sext_i32_i64(group_tid_229164) *\n            segmap_group_sizze_219279 + sext_i32_i64(local_tid_229163);\n    int64_t slice_229168 = n_196692;\n    int64_t slice_229169 = m_196691 * slice_229168;\n    int64_t gtid_219283 = squot64(global_tid_229167, slice_229168);\n    int64_t remnant_229170 = global_tid_229167 - gtid_219283 * slice_229168;\n    int64_t gtid_219284 = remnant_229170;\n    int64_t remnant_229171 = remnant_229170 - gtid_219284;\n    \n    if (slt64(gtid_219283, m_196691) && slt64(gtid_219284, n_196692)) {\n        int64_t x_219288;\n        \n        x_219288 = ((__global int64_t *) ext_mem_222257)[gtid_219283 *\n             ",
                   "                                            n_196692 +\n                                                         gtid_219284];\n        \n        bool cond_219289 = sle64((int64_t) 0, x_219288);\n        float defunc_0_f_res_219290;\n        \n        if (cond_219289) {\n            bool y_219291 = slt64(x_219288, n_196692);\n            bool bounds_check_219292 = cond_219289 && y_219291;\n            bool index_certs_219293;\n            \n            if (!bounds_check_219292) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 65) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_219288;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_219294;\n            \n            defunc_0_f_res_t_res_219294 = ((__global\n                                            float *) mem_224501)[gtid_219283 *\n                                                                 n_196692 +\n                                                                 x_219288];\n            defunc_0_f_res_219290 = defunc_0_f_res_t_res_219294;\n        } else {\n            defunc_0_f_res_219290 = 0.0F;\n        }\n        \n        float defunc_0_f_res_219295;\n        \n        if (cond_219289) {\n            bool y_219296 = slt64(x_219288, n_196692);\n            bool bounds_check_219297 = cond_219289 && y_219296;\n            bool index_certs_219298;\n            \n            if (!bounds_check_219297) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 66) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_219288;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n  ",
                   "          \n            float defunc_0_f_res_t_res_219299;\n            \n            defunc_0_f_res_t_res_219299 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_219283 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_219288 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_219295 = defunc_0_f_res_t_res_219299;\n        } else {\n            defunc_0_f_res_219295 = 0.0F;\n        }\n        ((__global float *) mem_224506)[gtid_219283 * n_196692 + gtid_219284] =\n            defunc_0_f_res_219295;\n        ((__global float *) mem_224510)[gtid_219283 * n_196692 + gtid_219284] =\n            defunc_0_f_res_219290;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_219279\n}\n__kernel void mainzisegmap_219672(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *mem_223977, __global\n                                  unsigned char *mem_224532)\n{\n    #define segmap_group_sizze_219667 (mainzisegmap_group_sizze_219641)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229198;\n    int32_t local_tid_229199;\n    int64_t group_sizze_229202;\n    int32_t wave_sizze_229201;\n    int32_t group_tid_229200;\n    \n    global_tid_229198 = get_global_id(0);\n    local_tid_229199 = get_local_id(0);\n    group_sizze_229202 = get_local_size(0);\n    wave_sizze_229201 = LOCKSTEP_WIDTH;\n    group_tid_229200 = get_group_id(0);\n    \n    int32_t phys_tid_219672 = global_tid_229",
                   "198;\n    int64_t global_tid_229203 = sext_i32_i64(group_tid_229200) *\n            segmap_group_sizze_219667 + sext_i32_i64(local_tid_229199);\n    int64_t slice_229204 = n_196692;\n    int64_t slice_229205 = m_196691 * slice_229204;\n    int64_t gtid_219670 = squot64(global_tid_229203, slice_229204);\n    int64_t remnant_229206 = global_tid_229203 - gtid_219670 * slice_229204;\n    int64_t gtid_219671 = remnant_229206;\n    int64_t remnant_229207 = remnant_229206 - gtid_219671;\n    \n    if (slt64(gtid_219670, m_196691) && slt64(gtid_219671, n_196692)) {\n        float x_219673;\n        \n        x_219673 = ((__global float *) Y_mem_222225)[gtid_219670 * n_196692 +\n                                                     gtid_219671];\n        \n        float x_219674;\n        \n        x_219674 = ((__global float *) mem_223977)[gtid_219670 * n_196692 +\n                                                   gtid_219671];\n        \n        float defunc_1_f_res_219675 = x_219673 - x_219674;\n        \n        ((__global float *) mem_224532)[gtid_219670 * n_196692 + gtid_219671] =\n            defunc_1_f_res_219675;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_219667\n}\n__kernel void mainzisegmap_219689(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ctx_param_ext_222545,\n                                  int64_t ctx_param_ext_222546,\n                                  int64_t ctx_param_ext_222548, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_param_222550, __global\n                                  unsigned char *mem_224532, __global\n                                  unsigned char *mem_224537, __global\n                                  unsigned char *mem_224541)\n{",
                   "\n    #define segmap_group_sizze_219683 (mainzisegmap_group_sizze_219585)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229208;\n    int32_t local_tid_229209;\n    int64_t group_sizze_229212;\n    int32_t wave_sizze_229211;\n    int32_t group_tid_229210;\n    \n    global_tid_229208 = get_global_id(0);\n    local_tid_229209 = get_local_id(0);\n    group_sizze_229212 = get_local_size(0);\n    wave_sizze_229211 = LOCKSTEP_WIDTH;\n    group_tid_229210 = get_group_id(0);\n    \n    int32_t phys_tid_219689 = global_tid_229208;\n    int64_t global_tid_229213 = sext_i32_i64(group_tid_229210) *\n            segmap_group_sizze_219683 + sext_i32_i64(local_tid_229209);\n    int64_t slice_229214 = n_196692;\n    int64_t slice_229215 = m_196691 * slice_229214;\n    int64_t gtid_219687 = squot64(global_tid_229213, slice_229214);\n    int64_t remnant_229216 = global_tid_229213 - gtid_219687 * slice_229214;\n    int64_t gtid_219688 = remnant_229216;\n    int64_t remnant_229217 = remnant_229216 - gtid_219688;\n    \n    if (slt64(gtid_219687, m_196691) && slt64(gtid_219688, n_196692)) {\n        int64_t x_219692;\n        \n        x_219692 = ((__global int64_t *) ext_mem_222257)[gtid_219687 *\n                                                         n_196692 +\n                                                         gtid_219688];\n        \n        bool cond_219693 = sle64((int64_t) 0, x_219692);\n        float defunc_0_f_res_219694;\n        \n        if (cond_219693) {\n            bool y_219695 = slt64(x_219692, n_196692);\n            bool bounds_check_219696 = cond_219693 && y_219695;\n            bool index_certs_219697;\n            \n            if (!bounds_check_219696) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 67) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_219692;\n                     ",
                   "   global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_219698;\n            \n            defunc_0_f_res_t_res_219698 = ((__global\n                                            float *) mem_224532)[gtid_219687 *\n                                                                 n_196692 +\n                                                                 x_219692];\n            defunc_0_f_res_219694 = defunc_0_f_res_t_res_219698;\n        } else {\n            defunc_0_f_res_219694 = 0.0F;\n        }\n        \n        float defunc_0_f_res_219699;\n        \n        if (cond_219693) {\n            bool y_219700 = slt64(x_219692, n_196692);\n            bool bounds_check_219701 = cond_219693 && y_219700;\n            bool index_certs_219702;\n            \n            if (!bounds_check_219701) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 68) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_219692;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_219703;\n            \n            defunc_0_f_res_t_res_219703 = ((__global\n                                            float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                       (gtid_219687 *\n                                                                        ctx_param_ext_222546 +\n                                                                        x_219692 *\n                                                                        ctx_param_ext_222548)];\n            defunc_0_f_res_219699 = defunc_0_f_res_t_res_219703;\n        } else {\n            defunc_0_f_res_21",
                   "9699 = 0.0F;\n        }\n        ((__global float *) mem_224537)[gtid_219687 * n_196692 + gtid_219688] =\n            defunc_0_f_res_219699;\n        ((__global float *) mem_224541)[gtid_219687 * n_196692 + gtid_219688] =\n            defunc_0_f_res_219694;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_219683\n}\n__kernel void mainzisegmap_219977(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t jump_t_196702, int64_t t_n_m_196759,\n                                  int64_t i_196779, int64_t y_199696, __global\n                                  unsigned char *ext_mem_224570, __global\n                                  unsigned char *ext_mem_224571, __global\n                                  unsigned char *mem_224576)\n{\n    #define segmap_group_sizze_219972 (mainzisegmap_group_sizze_219854)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229248;\n    int32_t local_tid_229249;\n    int64_t group_sizze_229252;\n    int32_t wave_sizze_229251;\n    int32_t group_tid_229250;\n    \n    global_tid_229248 = get_global_id(0);\n    local_tid_229249 = get_local_id(0);\n    group_sizze_229252 = get_local_size(0);\n    wave_sizze_229251 = LOCKSTEP_WIDTH;\n    group_tid_229250 = get_group_id(0);\n    \n    int32_t phys_tid_219977 = global_tid_229248;\n    int64_t global_tid_229253 = sext_i32_i64(group_tid_229250) *\n            segmap_group_sizze_219972 + sext_i32_i64(local_tid_229249);\n    int64_t slice_229254 = n_196692;\n    int64_t slice_229255 = m_196691 * slice_229254;\n    int64_t gtid_219975 = squot64(global_tid_229253, slice_229254);\n    int64_t remnant_229256 = global_tid_229253 - gtid_219975 * slice_229254;\n    int64_t gtid_219976 =",
                   " remnant_229256;\n    int64_t remnant_229257 = remnant_229256 - gtid_219976;\n    \n    if (slt64(gtid_219975, m_196691) && slt64(gtid_219976, n_196692)) {\n        int64_t m_v_219981 = sdiv64(gtid_219976, jump_t_196702);\n        bool cond_219982 = m_v_219981 == y_199696;\n        int64_t j_219983;\n        \n        if (cond_219982) {\n            int64_t j_t_res_219984 = sub64(m_v_219981, (int64_t) 1);\n            \n            j_219983 = j_t_res_219984;\n        } else {\n            j_219983 = m_v_219981;\n        }\n        \n        int64_t min_arg_219985 = mul64(jump_t_196702, j_219983);\n        int64_t min_res_219986 = smin64(i_196779, min_arg_219985);\n        int64_t defunc_0_m_fun_arg_219987 = add64((int64_t) 1, j_219983);\n        int64_t min_arg_219988 = mul64(jump_t_196702,\n                                       defunc_0_m_fun_arg_219987);\n        int64_t min_res_219989 = smin64(i_196779, min_arg_219988);\n        int64_t i64_arg_219990 = sub64(min_res_219989, min_res_219986);\n        float i64_res_219991 = sitofp_i64_f32(i64_arg_219990);\n        int64_t i64_arg_219992 = sub64(gtid_219976, min_res_219986);\n        float i64_res_219993 = sitofp_i64_f32(i64_arg_219992);\n        float u_219994 = i64_res_219993 / i64_res_219991;\n        float u2_219995 = u_219994 * u_219994;\n        float u3_219996 = u_219994 * u2_219995;\n        float x_219997 = 2.0F * u3_219996;\n        float y_219998 = 3.0F * u2_219995;\n        float x_219999 = x_219997 - y_219998;\n        float x_220000 = 1.0F + x_219999;\n        bool x_220001 = sle64((int64_t) 0, j_219983);\n        bool y_220002 = slt64(j_219983, t_n_m_196759);\n        bool bounds_check_220003 = x_220001 && y_220002;\n        bool index_certs_220004;\n        \n        if (!bounds_check_220003) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 69) == -1) {\n                    global_failure_args[0] = (int64_t) j_219983;\n                    global_failure_args[1] = (int64_t) t_n_m_196759;\n                  ",
                   "  ;\n                }\n                return;\n            }\n        }\n        \n        float y_220005;\n        \n        y_220005 = ((__global float *) ext_mem_224571)[gtid_219975 *\n                                                       t_n_m_196759 + j_219983];\n        \n        float x_220006 = x_220000 * y_220005;\n        float x_220007 = y_219998 - x_219997;\n        bool x_220008 = sle64((int64_t) 0, defunc_0_m_fun_arg_219987);\n        bool y_220009 = slt64(defunc_0_m_fun_arg_219987, t_n_m_196759);\n        bool bounds_check_220010 = x_220008 && y_220009;\n        bool index_certs_220011;\n        \n        if (!bounds_check_220010) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 70) == -1) {\n                    global_failure_args[0] =\n                        (int64_t) defunc_0_m_fun_arg_219987;\n                    global_failure_args[1] = (int64_t) t_n_m_196759;\n                    ;\n                }\n                return;\n            }\n        }\n        \n        float y_220012;\n        \n        y_220012 = ((__global float *) ext_mem_224571)[gtid_219975 *\n                                                       t_n_m_196759 +\n                                                       defunc_0_m_fun_arg_219987];\n        \n        float y_220013 = x_220007 * y_220012;\n        float x_220014 = x_220006 + y_220013;\n        float y_220015 = 2.0F * u2_219995;\n        float x_220016 = u3_219996 - y_220015;\n        float x_220017 = u_219994 + x_220016;\n        float y_220018;\n        \n        y_220018 = ((__global float *) ext_mem_224570)[gtid_219975 *\n                                                       t_n_m_196759 + j_219983];\n        \n        float x_220019 = x_220017 * y_220018;\n        float y_220020 = i64_res_219991 * x_220019;\n        float x_220021 = x_220014 + y_220020;\n        float x_220022 = u3_219996 - u2_219995;\n        float y_220023;\n        \n        y_220023 = ((__global float *) ext_mem_224570)[gtid_219975 *\n                ",
                   "                                       t_n_m_196759 +\n                                                       defunc_0_m_fun_arg_219987];\n        \n        float x_220024 = x_220022 * y_220023;\n        float y_220025 = i64_res_219991 * x_220024;\n        float defunc_4_interpolate_proc_res_220026 = x_220021 + y_220025;\n        \n        ((__global float *) mem_224576)[gtid_219975 * n_196692 + gtid_219976] =\n            defunc_4_interpolate_proc_res_220026;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_219972\n}\n__kernel void mainzisegmap_220194(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ext_224588, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *ext_mem_224583, __global\n                                  unsigned char *ext_mem_224584, __global\n                                  unsigned char *mem_224620)\n{\n    #define segmap_group_sizze_220189 (mainzisegmap_group_sizze_220153)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229270;\n    int32_t local_tid_229271;\n    int64_t group_sizze_229274;\n    int32_t wave_sizze_229273;\n    int32_t group_tid_229272;\n    \n    global_tid_229270 = get_global_id(0);\n    local_tid_229271 = get_local_id(0);\n    group_sizze_229274 = get_local_size(0);\n    wave_sizze_229273 = LOCKSTEP_WIDTH;\n    group_tid_229272 = get_group_id(0);\n    \n    int32_t phys_tid_220194 = global_tid_229270;\n    int64_t global_tid_229275 = sext_i32_i64(group_tid_229272) *\n            segmap_group_sizze_220189 + sext_i32_i64(local_tid_229271);\n    int64_t slice_229276 = n_196692;\n    int64_t slice_229277 = m_196691 * slice_229276;\n    int64_t gtid_220192 = squot64(global_tid_229275, slice_229276);\n    int64_t remnant_229278 = global_tid_229275 - gtid_",
                   "220192 * slice_229276;\n    int64_t gtid_220193 = remnant_229278;\n    int64_t remnant_229279 = remnant_229278 - gtid_220193;\n    \n    if (slt64(gtid_220192, m_196691) && slt64(gtid_220193, n_196692)) {\n        float x_220195;\n        \n        x_220195 = ((__global float *) Y_mem_222225)[gtid_220192 * n_196692 +\n                                                     gtid_220193];\n        \n        float x_220196;\n        \n        x_220196 = ((__global float *) ext_mem_224584)[gtid_220192 * n_196692 +\n                                                       gtid_220193];\n        \n        float x_220197;\n        \n        x_220197 = ((__global float *) ext_mem_224583)[gtid_220192 *\n                                                       ext_224588 +\n                                                       gtid_220193];\n        \n        float x_220198 = x_220195 - x_220196;\n        float defunc_2_f_res_220199 = x_220198 - x_220197;\n        bool isnan_res_220200;\n        \n        isnan_res_220200 = futrts_isnan32(defunc_2_f_res_220199);\n        \n        float defunc_0_f_res_220201;\n        \n        if (isnan_res_220200) {\n            defunc_0_f_res_220201 = defunc_2_f_res_220199;\n        } else {\n            float abs_res_220202 = (float) fabs(defunc_2_f_res_220199);\n            \n            defunc_0_f_res_220201 = abs_res_220202;\n        }\n        ((__global float *) mem_224620)[gtid_220192 * n_196692 + gtid_220193] =\n            defunc_0_f_res_220201;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_220189\n}\n__kernel void mainzisegmap_220215(__global int *global_failure,\n                                  int failure_is_an_option, __global\n                                  int64_t *global_failure_args,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *ext_mem_222257, __global\n                                  unsigned char *mem_224620, __global\n                                  unsigned c",
                   "har *mem_224625)\n{\n    #define segmap_group_sizze_220210 (mainzisegmap_group_sizze_220110)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229280;\n    int32_t local_tid_229281;\n    int64_t group_sizze_229284;\n    int32_t wave_sizze_229283;\n    int32_t group_tid_229282;\n    \n    global_tid_229280 = get_global_id(0);\n    local_tid_229281 = get_local_id(0);\n    group_sizze_229284 = get_local_size(0);\n    wave_sizze_229283 = LOCKSTEP_WIDTH;\n    group_tid_229282 = get_group_id(0);\n    \n    int32_t phys_tid_220215 = global_tid_229280;\n    int64_t global_tid_229285 = sext_i32_i64(group_tid_229282) *\n            segmap_group_sizze_220210 + sext_i32_i64(local_tid_229281);\n    int64_t slice_229286 = n_196692;\n    int64_t slice_229287 = m_196691 * slice_229286;\n    int64_t gtid_220213 = squot64(global_tid_229285, slice_229286);\n    int64_t remnant_229288 = global_tid_229285 - gtid_220213 * slice_229286;\n    int64_t gtid_220214 = remnant_229288;\n    int64_t remnant_229289 = remnant_229288 - gtid_220214;\n    \n    if (slt64(gtid_220213, m_196691) && slt64(gtid_220214, n_196692)) {\n        int64_t x_220217;\n        \n        x_220217 = ((__global int64_t *) ext_mem_222257)[gtid_220213 *\n                                                         n_196692 +\n                                                         gtid_220214];\n        \n        bool cond_220218 = sle64((int64_t) 0, x_220217);\n        float defunc_0_f_res_220219;\n        \n        if (cond_220218) {\n            bool y_220220 = slt64(x_220217, n_196692);\n            bool bounds_check_220221 = cond_220218 && y_220220;\n            bool index_certs_220222;\n            \n            if (!bounds_check_220221) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 72) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) x_220217;\n   ",
                   "                     global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    return;\n                }\n            }\n            \n            float defunc_0_f_res_t_res_220223;\n            \n            defunc_0_f_res_t_res_220223 = ((__global\n                                            float *) mem_224620)[gtid_220213 *\n                                                                 n_196692 +\n                                                                 x_220217];\n            defunc_0_f_res_220219 = defunc_0_f_res_t_res_220223;\n        } else {\n            defunc_0_f_res_220219 = INFINITY;\n        }\n        ((__global float *) mem_224625)[gtid_220213 * n_196692 + gtid_220214] =\n            defunc_0_f_res_220219;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_220210\n}\n__kernel void mainzisegmap_220339(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t i_196779, int32_t iters_199778,\n                                  int64_t num_groups_220335,\n                                  int64_t num_threads_225271, __global\n                                  unsigned char *mem_224630, __global\n                                  unsigned char *mem_224740, __global\n                                  unsigned char *color_225109, __global\n                                  unsigned char *color_225110, __global\n                                  unsigned char *color_225111, __global\n                                  unsigned char *color_225112, __global\n                                  unsigned char *color_225113, __global\n                                  unsigned char *color_225114, __global\n                                  unsigned char *color_225115)\n{\n    #define segmap_group_sizze_220334 (mainzisegmap_group_sizze_220241)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;",
                   "\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229293;\n    int32_t local_tid_229294;\n    int64_t group_sizze_229297;\n    int32_t wave_sizze_229296;\n    int32_t group_tid_229295;\n    \n    global_tid_229293 = get_global_id(0);\n    local_tid_229294 = get_local_id(0);\n    group_sizze_229297 = get_local_size(0);\n    wave_sizze_229296 = LOCKSTEP_WIDTH;\n    group_tid_229295 = get_group_id(0);\n    \n    int32_t phys_tid_220339 = global_tid_229293;\n    int32_t phys_group_id_229298;\n    \n    phys_group_id_229298 = get_group_id(0);\n    for (int32_t i_229299 = 0; i_229299 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          segmap_group_sizze_220334)) -\n                   phys_group_id_229298, sext_i64_i32(num_groups_220335));\n         i_229299++) {\n        int32_t virt_group_id_229300 = phys_group_id_229298 + i_229299 *\n                sext_i64_i32(num_groups_220335);\n        int64_t global_tid_229301 = sext_i32_i64(virt_group_id_229300) *\n                segmap_group_sizze_220334 + sext_i32_i64(local_tid_229294);\n        int64_t slice_229302 = m_196691;\n        int64_t gtid_220338 = global_tid_229301;\n        int64_t remnant_229303 = global_tid_229301 - gtid_220338;\n        \n        if (slt64(gtid_220338, m_196691)) {\n            for (int64_t i_229304 = 0; i_229304 < n_196692; i_229304++) {\n                float tmp_229305;\n                \n                tmp_229305 = ((__global float *) mem_224630)[gtid_220338 +\n                                                             i_229304 *\n                                                             m_196691];\n                ((__global float *) color_225109)[phys_tid_220339 + i_229304 *\n                                                  num_threads_225271] =\n                    tmp_229305;\n            }\n            \n            __global unsigned char *ext_mem_224733;\n            __global unsigned char *ext_mem_unused_225003;\n            __global unsigned ch",
                   "ar *mem_param_224640;\n            __global unsigned char *mem_param_out_225004;\n            \n            mem_param_224640 = color_225109;\n            mem_param_out_225004 = color_225110;\n            for (int32_t i_220342 = 0; i_220342 < iters_199778; i_220342++) {\n                int32_t defunc_2_radix_sort_step_arg_220344 = mul32(2,\n                                                                    i_220342);\n                int32_t defunc_0_get_bit_arg_220345 = add32(1,\n                                                            defunc_2_radix_sort_step_arg_220344);\n                bool cond_f_res_220346 = defunc_0_get_bit_arg_220345 == 31;\n                bool cond_f_res_220347 = defunc_2_radix_sort_step_arg_220344 ==\n                     31;\n                int64_t discard_222158;\n                int64_t discard_222159;\n                int64_t discard_222160;\n                int64_t discard_222161;\n                int64_t scanacc_222143;\n                int64_t scanacc_222144;\n                int64_t scanacc_222145;\n                int64_t scanacc_222146;\n                \n                scanacc_222143 = (int64_t) 0;\n                scanacc_222144 = (int64_t) 0;\n                scanacc_222145 = (int64_t) 0;\n                scanacc_222146 = (int64_t) 0;\n                for (int64_t i_222152 = 0; i_222152 < n_196692; i_222152++) {\n                    float x_220365;\n                    \n                    x_220365 = ((__global\n                                 float *) mem_param_224640)[phys_tid_220339 +\n                                                            i_222152 *\n                                                            num_threads_225271];\n                    \n                    int32_t i32_arg_220366;\n                    \n                    i32_arg_220366 = futrts_to_bits32(x_220365);\n                    \n                    int32_t unsign_arg_220367 = ashr32(i32_arg_220366,\n                                                       defunc_0_get_bit_",
                   "arg_220345);\n                    int32_t unsign_arg_220368 = 1 & unsign_arg_220367;\n                    int32_t unsign_arg_220369 = ashr32(i32_arg_220366, 31);\n                    int32_t unsign_arg_220370 = 1 & unsign_arg_220369;\n                    bool cond_220371 = unsign_arg_220370 == 1;\n                    bool x_220372 = !cond_220371;\n                    bool y_220373 = cond_f_res_220346 && x_220372;\n                    bool cond_220374 = cond_220371 || y_220373;\n                    int32_t defunc_1_get_bit_res_220375;\n                    \n                    if (cond_220374) {\n                        int32_t defunc_1_get_bit_res_t_res_220376 = 1 ^\n                                unsign_arg_220368;\n                        \n                        defunc_1_get_bit_res_220375 =\n                            defunc_1_get_bit_res_t_res_220376;\n                    } else {\n                        defunc_1_get_bit_res_220375 = unsign_arg_220368;\n                    }\n                    \n                    int32_t x_220377 = mul32(2, defunc_1_get_bit_res_220375);\n                    int32_t unsign_arg_220378 = ashr32(i32_arg_220366,\n                                                       defunc_2_radix_sort_step_arg_220344);\n                    int32_t unsign_arg_220379 = 1 & unsign_arg_220378;\n                    bool y_220380 = cond_f_res_220347 && x_220372;\n                    bool cond_220381 = cond_220371 || y_220380;\n                    int32_t defunc_1_get_bit_res_220382;\n                    \n                    if (cond_220381) {\n                        int32_t defunc_1_get_bit_res_t_res_220383 = 1 ^\n                                unsign_arg_220379;\n                        \n                        defunc_1_get_bit_res_220382 =\n                            defunc_1_get_bit_res_t_res_220383;\n                    } else {\n                        defunc_1_get_bit_res_220382 = unsign_arg_220379;\n                    }\n                    \n                    int32_t",
                   " defunc_0_f_res_220384 = add32(x_220377,\n                                                          defunc_1_get_bit_res_220382);\n                    bool cond_220385 = defunc_0_f_res_220384 == 0;\n                    int64_t defunc_0_f_res_220386 = btoi_bool_i64(cond_220385);\n                    int64_t defunc_0_f_res_220387;\n                    int64_t defunc_0_f_res_220388;\n                    int64_t defunc_0_f_res_220389;\n                    \n                    if (cond_220385) {\n                        defunc_0_f_res_220387 = (int64_t) 0;\n                        defunc_0_f_res_220388 = (int64_t) 0;\n                        defunc_0_f_res_220389 = (int64_t) 0;\n                    } else {\n                        bool cond_220390 = defunc_0_f_res_220384 == 1;\n                        int64_t defunc_0_f_res_f_res_220391 =\n                                btoi_bool_i64(cond_220390);\n                        int64_t defunc_0_f_res_f_res_220392;\n                        int64_t defunc_0_f_res_f_res_220393;\n                        \n                        if (cond_220390) {\n                            defunc_0_f_res_f_res_220392 = (int64_t) 0;\n                            defunc_0_f_res_f_res_220393 = (int64_t) 0;\n                        } else {\n                            bool cond_220394 = defunc_0_f_res_220384 == 2;\n                            int64_t defunc_0_f_res_f_res_f_res_220395 =\n                                    btoi_bool_i64(cond_220394);\n                            bool cond_neg_220396 = !cond_220394;\n                            int64_t defunc_0_f_res_f_res_f_res_220397 =\n                                    btoi_bool_i64(cond_neg_220396);\n                            \n                            defunc_0_f_res_f_res_220392 =\n                                defunc_0_f_res_f_res_f_res_220395;\n                            defunc_0_f_res_f_res_220393 =\n                                defunc_0_f_res_f_res_f_res_220397;\n                        }\n                    ",
                   "    defunc_0_f_res_220387 = defunc_0_f_res_f_res_220391;\n                        defunc_0_f_res_220388 = defunc_0_f_res_f_res_220392;\n                        defunc_0_f_res_220389 = defunc_0_f_res_f_res_220393;\n                    }\n                    \n                    int64_t defunc_1_op_res_220361 =\n                            add64(defunc_0_f_res_220386, scanacc_222143);\n                    int64_t defunc_1_op_res_220362 =\n                            add64(defunc_0_f_res_220387, scanacc_222144);\n                    int64_t defunc_1_op_res_220363 =\n                            add64(defunc_0_f_res_220388, scanacc_222145);\n                    int64_t defunc_1_op_res_220364 =\n                            add64(defunc_0_f_res_220389, scanacc_222146);\n                    \n                    ((__global int64_t *) color_225115)[phys_tid_220339 +\n                                                        i_222152 *\n                                                        num_threads_225271] =\n                        defunc_1_op_res_220361;\n                    ((__global int64_t *) color_225114)[phys_tid_220339 +\n                                                        i_222152 *\n                                                        num_threads_225271] =\n                        defunc_1_op_res_220362;\n                    ((__global int64_t *) color_225113)[phys_tid_220339 +\n                                                        i_222152 *\n                                                        num_threads_225271] =\n                        defunc_1_op_res_220363;\n                    ((__global int64_t *) color_225112)[phys_tid_220339 +\n                                                        i_222152 *\n                                                        num_threads_225271] =\n                        defunc_1_op_res_220364;\n                    ((__global int32_t *) color_225111)[phys_tid_220339 +\n                                                        i_222152 *\n        ",
                   "                                                num_threads_225271] =\n                        defunc_0_f_res_220384;\n                    \n                    int64_t scanacc_tmp_229309 = defunc_1_op_res_220361;\n                    int64_t scanacc_tmp_229310 = defunc_1_op_res_220362;\n                    int64_t scanacc_tmp_229311 = defunc_1_op_res_220363;\n                    int64_t scanacc_tmp_229312 = defunc_1_op_res_220364;\n                    \n                    scanacc_222143 = scanacc_tmp_229309;\n                    scanacc_222144 = scanacc_tmp_229310;\n                    scanacc_222145 = scanacc_tmp_229311;\n                    scanacc_222146 = scanacc_tmp_229312;\n                }\n                discard_222158 = scanacc_222143;\n                discard_222159 = scanacc_222144;\n                discard_222160 = scanacc_222145;\n                discard_222161 = scanacc_222146;\n                \n                int64_t last_res_220398;\n                \n                last_res_220398 = ((__global\n                                    int64_t *) color_225115)[phys_tid_220339 +\n                                                             i_196779 *\n                                                             num_threads_225271];\n                \n                int64_t last_res_220399;\n                \n                last_res_220399 = ((__global\n                                    int64_t *) color_225114)[phys_tid_220339 +\n                                                             i_196779 *\n                                                             num_threads_225271];\n                \n                int64_t last_res_220400;\n                \n                last_res_220400 = ((__global\n                                    int64_t *) color_225113)[phys_tid_220339 +\n                                                             i_196779 *\n                                                             num_threads_225271];\n                for (int64_t i_229318 = 0; i_229",
                   "318 < n_196692; i_229318++) {\n                    float tmp_229319;\n                    \n                    tmp_229319 = ((__global\n                                   float *) mem_param_224640)[phys_tid_220339 +\n                                                              i_229318 *\n                                                              num_threads_225271];\n                    ((__global float *) mem_param_out_225004)[phys_tid_220339 +\n                                                              i_229318 *\n                                                              num_threads_225271] =\n                        tmp_229319;\n                }\n                for (int64_t write_iter_222162 = 0; write_iter_222162 <\n                     n_196692; write_iter_222162++) {\n                    int32_t write_iv_222164;\n                    \n                    write_iv_222164 = ((__global\n                                        int32_t *) color_225111)[phys_tid_220339 +\n                                                                 write_iter_222162 *\n                                                                 num_threads_225271];\n                    \n                    bool match_lit_220409 = 0 == write_iv_222164;\n                    int64_t defunc_1_f_res_220410;\n                    \n                    if (match_lit_220409) {\n                        int64_t write_iv_222165;\n                        \n                        write_iv_222165 = ((__global\n                                            int64_t *) color_225115)[phys_tid_220339 +\n                                                                     write_iter_222162 *\n                                                                     num_threads_225271];\n                        \n                        int64_t case_res_220411 = sub64(write_iv_222165,\n                                                        (int64_t) 1);\n                        \n                        defunc_1_f_res_220410 = case_res",
                   "_220411;\n                    } else {\n                        bool match_lit_220412 = 1 == write_iv_222164;\n                        int64_t x_220413;\n                        \n                        if (match_lit_220412) {\n                            int64_t write_iv_222166;\n                            \n                            write_iv_222166 = ((__global\n                                                int64_t *) color_225114)[phys_tid_220339 +\n                                                                         write_iter_222162 *\n                                                                         num_threads_225271];\n                            \n                            int64_t x_220414 = add64(last_res_220398,\n                                                     write_iv_222166);\n                            int64_t case_res_220415 = sub64(x_220414,\n                                                            (int64_t) 1);\n                            \n                            x_220413 = case_res_220415;\n                        } else {\n                            bool match_lit_220416 = 2 == write_iv_222164;\n                            int64_t x_220417;\n                            \n                            if (match_lit_220416) {\n                                int64_t write_iv_222167;\n                                \n                                write_iv_222167 = ((__global\n                                                    int64_t *) color_225113)[phys_tid_220339 +\n                                                                             write_iter_222162 *\n                                                                             num_threads_225271];\n                                \n                                int64_t x_220418 = add64(last_res_220398,\n                                                         last_res_220399);\n                                int64_t x_220419 = add64(x_220418,\n                                     ",
                   "                    write_iv_222167);\n                                int64_t case_res_220420 = sub64(x_220419,\n                                                                (int64_t) 1);\n                                \n                                x_220417 = case_res_220420;\n                            } else {\n                                int64_t write_iv_222168;\n                                \n                                write_iv_222168 = ((__global\n                                                    int64_t *) color_225112)[phys_tid_220339 +\n                                                                             write_iter_222162 *\n                                                                             num_threads_225271];\n                                \n                                int64_t x_220421 = add64(last_res_220398,\n                                                         last_res_220399);\n                                int64_t x_220422 = add64(last_res_220400,\n                                                         x_220421);\n                                int64_t x_220423 = add64(x_220422,\n                                                         write_iv_222168);\n                                int64_t defunc_1_f_res_res_220424 =\n                                        sub64(x_220423, (int64_t) 1);\n                                \n                                x_220417 = defunc_1_f_res_res_220424;\n                            }\n                            x_220413 = x_220417;\n                        }\n                        defunc_1_f_res_220410 = x_220413;\n                    }\n                    if (sle64((int64_t) 0, defunc_1_f_res_220410) &&\n                        slt64(defunc_1_f_res_220410, n_196692)) {\n                        for (int64_t i_229321 = 0; i_229321 < (int64_t) 1;\n                             i_229321++) {\n                            float tmp_229322;\n                            \n                   ",
                   "         tmp_229322 = ((__global\n                                           float *) mem_param_224640)[phys_tid_220339 +\n                                                                      num_threads_225271 *\n                                                                      write_iter_222162 +\n                                                                      i_229321 *\n                                                                      num_threads_225271];\n                            ((__global\n                              float *) mem_param_out_225004)[phys_tid_220339 +\n                                                             num_threads_225271 *\n                                                             defunc_1_f_res_220410 +\n                                                             i_229321 *\n                                                             num_threads_225271] =\n                                tmp_229322;\n                        }\n                    }\n                }\n                \n                __global unsigned char *mem_param_tmp_229306;\n                \n                mem_param_tmp_229306 = mem_param_out_225004;\n                \n                __global unsigned char *mem_param_out_tmp_229307;\n                \n                mem_param_out_tmp_229307 = mem_param_224640;\n                mem_param_224640 = mem_param_tmp_229306;\n                mem_param_out_225004 = mem_param_out_tmp_229307;\n            }\n            ext_mem_224733 = mem_param_224640;\n            ext_mem_unused_225003 = mem_param_out_225004;\n            for (int64_t i_229323 = 0; i_229323 < n_196692; i_229323++) {\n                float tmp_229324;\n                \n                tmp_229324 = ((__global\n                               float *) ext_mem_224733)[phys_tid_220339 +\n                                                        i_229323 *\n                                                        num_threads_225271];\n                ((__global float *",
                   ") mem_224740)[gtid_220338 + i_229323 *\n                                                m_196691] = tmp_229324;\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_220334\n}\n__kernel void mainzisegmap_221037(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t i_196779, __global\n                                  unsigned char *mem_param_224799, __global\n                                  unsigned char *mem_224805, __global\n                                  unsigned char *mem_224835, __global\n                                  unsigned char *mem_224839, __global\n                                  unsigned char *mem_224843, __global\n                                  unsigned char *mem_224847, __global\n                                  unsigned char *mem_224851)\n{\n    #define segmap_group_sizze_221032 (mainzisegmap_group_sizze_220642)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229522;\n    int32_t local_tid_229523;\n    int64_t group_sizze_229526;\n    int32_t wave_sizze_229525;\n    int32_t group_tid_229524;\n    \n    global_tid_229522 = get_global_id(0);\n    local_tid_229523 = get_local_id(0);\n    group_sizze_229526 = get_local_size(0);\n    wave_sizze_229525 = LOCKSTEP_WIDTH;\n    group_tid_229524 = get_group_id(0);\n    \n    int32_t phys_tid_221037 = global_tid_229522;\n    int64_t global_tid_229527 = sext_i32_i64(group_tid_229524) *\n            segmap_group_sizze_221032 + sext_i32_i64(local_tid_229523);\n    int64_t slice_229528 = n_196692;\n    int64_t slice_229529 = m_196691 * slice_229528;\n    int64_t gtid_221035 = squot64(global_tid_229527, slice_229528);\n    int64_t remnant_229530 = global_tid_229527 - gtid_221035 * slice_229528;\n    int64_t gtid_221036 = remnant_",
                   "229530;\n    int64_t remnant_229531 = remnant_229530 - gtid_221036;\n    \n    if (slt64(gtid_221035, m_196691) && slt64(gtid_221036, n_196692)) {\n        int32_t x_221041;\n        \n        x_221041 = ((__global int32_t *) mem_224851)[gtid_221035 * n_196692 +\n                                                     gtid_221036];\n        \n        float write_value_221046;\n        \n        write_value_221046 = ((__global float *) mem_param_224799)[gtid_221035 *\n                                                                   n_196692 +\n                                                                   gtid_221036];\n        \n        bool match_lit_221047 = 0 == x_221041;\n        int64_t defunc_1_f_res_221048;\n        \n        if (match_lit_221047) {\n            int64_t x_221042;\n            \n            x_221042 = ((__global int64_t *) mem_224835)[gtid_221035 *\n                                                         n_196692 +\n                                                         gtid_221036];\n            \n            int64_t case_res_221049 = sub64(x_221042, (int64_t) 1);\n            \n            defunc_1_f_res_221048 = case_res_221049;\n        } else {\n            int64_t last_res_221038;\n            \n            last_res_221038 = ((__global int64_t *) mem_224835)[gtid_221035 *\n                                                                n_196692 +\n                                                                i_196779];\n            \n            bool match_lit_221050 = 1 == x_221041;\n            int64_t x_221051;\n            \n            if (match_lit_221050) {\n                int64_t x_221043;\n                \n                x_221043 = ((__global int64_t *) mem_224839)[gtid_221035 *\n                                                             n_196692 +\n                                                             gtid_221036];\n                \n                int64_t x_221052 = add64(last_res_221038, x_221043);\n                int64_t case_res_221053 = sub64(x_2",
                   "21052, (int64_t) 1);\n                \n                x_221051 = case_res_221053;\n            } else {\n                int64_t last_res_221039;\n                \n                last_res_221039 = ((__global\n                                    int64_t *) mem_224839)[gtid_221035 *\n                                                           n_196692 + i_196779];\n                \n                bool match_lit_221054 = 2 == x_221041;\n                int64_t x_221055;\n                \n                if (match_lit_221054) {\n                    int64_t x_221044;\n                    \n                    x_221044 = ((__global int64_t *) mem_224843)[gtid_221035 *\n                                                                 n_196692 +\n                                                                 gtid_221036];\n                    \n                    int64_t x_221056 = add64(last_res_221038, last_res_221039);\n                    int64_t x_221057 = add64(x_221044, x_221056);\n                    int64_t case_res_221058 = sub64(x_221057, (int64_t) 1);\n                    \n                    x_221055 = case_res_221058;\n                } else {\n                    int64_t last_res_221040;\n                    \n                    last_res_221040 = ((__global\n                                        int64_t *) mem_224843)[gtid_221035 *\n                                                               n_196692 +\n                                                               i_196779];\n                    \n                    int64_t x_221045;\n                    \n                    x_221045 = ((__global int64_t *) mem_224847)[gtid_221035 *\n                                                                 n_196692 +\n                                                                 gtid_221036];\n                    \n                    int64_t x_221059 = add64(last_res_221038, last_res_221039);\n                    int64_t x_221060 = add64(last_res_221040, x_221059);\n                   ",
                   " int64_t x_221061 = add64(x_221045, x_221060);\n                    int64_t defunc_1_f_res_res_221062 = sub64(x_221061,\n                                                              (int64_t) 1);\n                    \n                    x_221055 = defunc_1_f_res_res_221062;\n                }\n                x_221051 = x_221055;\n            }\n            defunc_1_f_res_221048 = x_221051;\n        }\n        if ((sle64((int64_t) 0, gtid_221035) && slt64(gtid_221035, m_196691)) &&\n            (sle64((int64_t) 0, defunc_1_f_res_221048) &&\n             slt64(defunc_1_f_res_221048, n_196692))) {\n            ((__global float *) mem_224805)[gtid_221035 * n_196692 +\n                                            defunc_1_f_res_221048] =\n                write_value_221046;\n        }\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_221032\n}\n__kernel void mainzisegmap_221092(__global int *global_failure,\n                                  int64_t m_196691, int64_t stl_res_196773,\n                                  int64_t j_m_i_197246, __global\n                                  unsigned char *mem_224885, __global\n                                  unsigned char *mem_224889, __global\n                                  unsigned char *mem_224892, __global\n                                  unsigned char *mem_224895)\n{\n    #define segmap_group_sizze_221086 (mainzisegmap_group_sizze_221071)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229536;\n    int32_t local_tid_229537;\n    int64_t group_sizze_229540;\n    int32_t wave_sizze_229539;\n    int32_t group_tid_229538;\n    \n    global_tid_229536 = get_global_id(0);\n    local_tid_229537 = get_local_id(0);\n    group_sizze_229540 = get_local_size(0);\n    wave_sizze_229539 = LOCKSTEP_WIDTH;\n    group_tid_229538 = get_group_id(0);\n    \n    int32_t phys_tid_221092 = global_tid_229536;\n    int64_t global_tid_229541",
                   " = sext_i32_i64(group_tid_229538) *\n            segmap_group_sizze_221086 + sext_i32_i64(local_tid_229537);\n    int64_t slice_229542 = m_196691;\n    int64_t gtid_221091 = global_tid_229541;\n    int64_t remnant_229543 = global_tid_229541 - gtid_221091;\n    \n    if (slt64(gtid_221091, m_196691)) {\n        float defunc_2_reduce_res_221094;\n        float redout_222171 = 0.0F;\n        \n        for (int64_t i_222172 = 0; i_222172 < j_m_i_197246; i_222172++) {\n            int64_t slice_222173 = stl_res_196773 + i_222172;\n            float x_221098;\n            \n            x_221098 = ((__global float *) mem_224885)[slice_222173 * m_196691 +\n                                                       gtid_221091];\n            \n            float defunc_1_op_res_221097 = x_221098 + redout_222171;\n            float redout_tmp_229544 = defunc_1_op_res_221097;\n            \n            redout_222171 = redout_tmp_229544;\n        }\n        defunc_2_reduce_res_221094 = redout_222171;\n        \n        float h_221099 = 3.0F * defunc_2_reduce_res_221094;\n        float h9_221100 = 0.999F * h_221099;\n        float h1_221101 = 1.0e-3F * h_221099;\n        \n        ((__global float *) mem_224889)[gtid_221091] = h_221099;\n        ((__global float *) mem_224892)[gtid_221091] = h9_221100;\n        ((__global float *) mem_224895)[gtid_221091] = h1_221101;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_221086\n}\n__kernel void mainzisegmap_221154(__global int *global_failure,\n                                  int64_t m_196691, __global\n                                  unsigned char *mem_224899, __global\n                                  unsigned char *mem_224903, __global\n                                  unsigned char *mem_224906, __global\n                                  unsigned char *mem_224909)\n{\n    #define segmap_group_sizze_221148 (mainzisegmap_group_sizze_221106)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*globa",
                   "l_failure >= 0)\n        return;\n    \n    int32_t global_tid_229613;\n    int32_t local_tid_229614;\n    int64_t group_sizze_229617;\n    int32_t wave_sizze_229616;\n    int32_t group_tid_229615;\n    \n    global_tid_229613 = get_global_id(0);\n    local_tid_229614 = get_local_id(0);\n    group_sizze_229617 = get_local_size(0);\n    wave_sizze_229616 = LOCKSTEP_WIDTH;\n    group_tid_229615 = get_group_id(0);\n    \n    int32_t phys_tid_221154 = global_tid_229613;\n    int64_t global_tid_229618 = sext_i32_i64(group_tid_229615) *\n            segmap_group_sizze_221148 + sext_i32_i64(local_tid_229614);\n    int64_t slice_229619 = m_196691;\n    int64_t gtid_221153 = global_tid_229618;\n    int64_t remnant_229620 = global_tid_229618 - gtid_221153;\n    \n    if (slt64(gtid_221153, m_196691)) {\n        float defunc_2_reduce_res_221155;\n        \n        defunc_2_reduce_res_221155 = ((__global\n                                       float *) mem_224899)[gtid_221153];\n        \n        float h_221156 = 3.0F * defunc_2_reduce_res_221155;\n        float h9_221157 = 0.999F * h_221156;\n        float h1_221158 = 1.0e-3F * h_221156;\n        \n        ((__global float *) mem_224903)[gtid_221153] = h_221156;\n        ((__global float *) mem_224906)[gtid_221153] = h9_221157;\n        ((__global float *) mem_224909)[gtid_221153] = h1_221158;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_221148\n}\n__kernel void mainzisegmap_221240(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692, __global\n                                  unsigned char *ext_mem_224626, __global\n                                  unsigned char *ext_mem_224910, __global\n                                  unsigned char *ext_mem_224911, __global\n                                  unsigned char *ext_mem_224912, __global\n                                  unsigned char *mem_224917)\n{\n    #define segmap_group_sizze_221235 (mainzisegmap_group_sizze_221175)\n    \n    const int block_dim0 = ",
                   "0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229622;\n    int32_t local_tid_229623;\n    int64_t group_sizze_229626;\n    int32_t wave_sizze_229625;\n    int32_t group_tid_229624;\n    \n    global_tid_229622 = get_global_id(0);\n    local_tid_229623 = get_local_id(0);\n    group_sizze_229626 = get_local_size(0);\n    wave_sizze_229625 = LOCKSTEP_WIDTH;\n    group_tid_229624 = get_group_id(0);\n    \n    int32_t phys_tid_221240 = global_tid_229622;\n    int64_t global_tid_229627 = sext_i32_i64(group_tid_229624) *\n            segmap_group_sizze_221235 + sext_i32_i64(local_tid_229623);\n    int64_t slice_229628 = n_196692;\n    int64_t slice_229629 = m_196691 * slice_229628;\n    int64_t gtid_221238 = squot64(global_tid_229627, slice_229628);\n    int64_t remnant_229630 = global_tid_229627 - gtid_221238 * slice_229628;\n    int64_t gtid_221239 = remnant_229630;\n    int64_t remnant_229631 = remnant_229630 - gtid_221239;\n    \n    if (slt64(gtid_221238, m_196691) && slt64(gtid_221239, n_196692)) {\n        float x_221241;\n        \n        x_221241 = ((__global float *) ext_mem_224912)[gtid_221238];\n        \n        float x_221243;\n        \n        x_221243 = ((__global float *) ext_mem_224910)[gtid_221238];\n        \n        float x_221244;\n        \n        x_221244 = ((__global float *) ext_mem_224626)[gtid_221238 * n_196692 +\n                                                       gtid_221239];\n        \n        float x_221245 = x_221244 / x_221241;\n        float y_221246 = fpow32(x_221245, 2.0F);\n        float x_221247 = 1.0F - y_221246;\n        float bicube_221248 = fpow32(x_221247, 2.0F);\n        bool isnan_res_221249;\n        \n        isnan_res_221249 = futrts_isnan32(x_221244);\n        \n        bool cond_f_res_221250 = x_221244 <= x_221243;\n        bool x_221251 = !isnan_res_221249;\n        bool y_221252 = cond_f_res_221250 && x_221251;\n        bool cond_221253 = isnan_res_221249 || y_22125",
                   "2;\n        float defunc_0_f_res_221254;\n        \n        if (cond_221253) {\n            defunc_0_f_res_221254 = 1.0F;\n        } else {\n            float x_221242;\n            \n            x_221242 = ((__global float *) ext_mem_224911)[gtid_221238];\n            \n            bool cond_221255 = x_221242 <= x_221244;\n            bool cond_f_res_221256 = x_221244 <= 1.0e-6F;\n            bool x_221257 = !cond_221255;\n            bool y_221258 = cond_f_res_221256 && x_221257;\n            bool cond_221259 = cond_221255 || y_221258;\n            float defunc_0_f_res_f_res_221260;\n            \n            if (cond_221259) {\n                defunc_0_f_res_f_res_221260 = 1.0e-6F;\n            } else {\n                defunc_0_f_res_f_res_221260 = bicube_221248;\n            }\n            defunc_0_f_res_221254 = defunc_0_f_res_f_res_221260;\n        }\n        ((__global float *) mem_224917)[gtid_221238 * n_196692 + gtid_221239] =\n            defunc_0_f_res_221254;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_221235\n}\n__kernel void mainzisegmap_221310(__global int *global_failure,\n                                  int64_t m_196691, int64_t n_196692,\n                                  int64_t ext_224939, __global\n                                  unsigned char *Y_mem_222225, __global\n                                  unsigned char *ext_mem_224927, __global\n                                  unsigned char *ext_mem_224928, __global\n                                  unsigned char *mem_224954)\n{\n    #define segmap_group_sizze_221305 (mainzisegmap_group_sizze_221275)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229632;\n    int32_t local_tid_229633;\n    int64_t group_sizze_229636;\n    int32_t wave_sizze_229635;\n    int32_t group_tid_229634;\n    \n    global_tid_229632 = get_global_id(0);\n    local_tid_229633 = get_local_id(0);\n    group_sizze_22963",
                   "6 = get_local_size(0);\n    wave_sizze_229635 = LOCKSTEP_WIDTH;\n    group_tid_229634 = get_group_id(0);\n    \n    int32_t phys_tid_221310 = global_tid_229632;\n    int64_t global_tid_229637 = sext_i32_i64(group_tid_229634) *\n            segmap_group_sizze_221305 + sext_i32_i64(local_tid_229633);\n    int64_t slice_229638 = n_196692;\n    int64_t slice_229639 = m_196691 * slice_229638;\n    int64_t gtid_221308 = squot64(global_tid_229637, slice_229638);\n    int64_t remnant_229640 = global_tid_229637 - gtid_221308 * slice_229638;\n    int64_t gtid_221309 = remnant_229640;\n    int64_t remnant_229641 = remnant_229640 - gtid_221309;\n    \n    if (slt64(gtid_221308, m_196691) && slt64(gtid_221309, n_196692)) {\n        float x_221311;\n        \n        x_221311 = ((__global float *) Y_mem_222225)[gtid_221308 * n_196692 +\n                                                     gtid_221309];\n        \n        float x_221312;\n        \n        x_221312 = ((__global float *) ext_mem_224928)[gtid_221308 * n_196692 +\n                                                       gtid_221309];\n        \n        float x_221313;\n        \n        x_221313 = ((__global float *) ext_mem_224927)[gtid_221308 *\n                                                       ext_224939 +\n                                                       gtid_221309];\n        \n        float x_221314 = x_221311 - x_221312;\n        float defunc_2_f_res_221315 = x_221314 - x_221313;\n        \n        ((__global float *) mem_224954)[gtid_221308 * n_196692 + gtid_221309] =\n            defunc_2_f_res_221315;\n    }\n    \n  error_0:\n    return;\n    #undef segmap_group_sizze_221305\n}\n__kernel void mainzisegmap_intragroup_199976(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *color_225012_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225011_backing_aligne",
                   "d_1,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t i_196779, __global\n                                             unsigned char *Y_mem_222225,\n                                             __global unsigned char *mem_222238,\n                                             __global unsigned char *mem_222241)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225012_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225012_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225011_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225011_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225294;\n    int32_t local_tid_225295;\n    int64_t group_sizze_225298;\n    int32_t wave_sizze_225297;\n    int32_t group_tid_225296;\n    \n    global_tid_225294 = get_global_id(0);\n    local_tid_225295 = get_local_id(0);\n    group_sizze_225298 = get_local_size(0);\n    wave_sizze_225297 = LOCKSTEP_WIDTH;\n    group_tid_225296 = get_group_id(0);\n    \n    int32_t phys_tid_199976 = group_tid_225296;\n    int64_t slice_225300 = n_196692;\n    int64_t ltid_pre_225299 = sext_i32_i64(local_tid_225295);\n    int64_t remnant_225301 = sext_i32_i64(local_tid_225295) - ltid_pre_225299;\n    int64_t slice_225302 = m_196691;\n    int64_t gtid_199975 = sext_i32_i64(group_tid_225296);\n    int64_t remnant_225303 = sext_i32_i64(group_tid_225296) - gtid_199975;\n    __local unsigned char *color_225011;\n    \n    color_225011 = (__local unsigned char *) color_225011_backing_0;\n    \n    __local unsigned char *color_225012;\n    \n    color_225012 = (__local unsigned char *) color_225012_backing_1;\n    \n    int64_t gtid_199980 = sext_i32_i",
                   "64(sext_i64_i32(ltid_pre_225299));\n    int32_t phys_tid_199981 = local_tid_225295;\n    float x_199985;\n    \n    x_199985 = ((__global float *) Y_mem_222225)[gtid_199975 * n_196692 +\n                                                 gtid_199980];\n    \n    bool isnan_res_199986;\n    \n    isnan_res_199986 = futrts_isnan32(x_199985);\n    \n    bool defunc_0_p_res_199987 = !isnan_res_199986;\n    int64_t defunc_0_f_res_199988 = btoi_bool_i64(defunc_0_p_res_199987);\n    \n    ((__local int64_t *) color_225012)[gtid_199980] = defunc_0_f_res_199988;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_225304 = n_196692;\n    int64_t x_199982;\n    int64_t x_199983;\n    int64_t x_225306;\n    int64_t x_225307;\n    bool ltid_in_bounds_225309 = slt64(sext_i32_i64(local_tid_225295),\n                                       n_196692);\n    int32_t skip_threads_225310;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225309) {\n            x_199983 = ((volatile __local\n                         int64_t *) color_225012)[sext_i32_i64(local_tid_225295)];\n            if ((local_tid_225295 - squot32(local_tid_225295, 32) * 32) == 0) {\n                x_199982 = x_199983;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225310 = 1;\n        while (slt32(skip_threads_225310, 32)) {\n            bool thread_active_225311 = sle32(skip_threads_225310,\n                                              local_tid_225295 -\n                                              squot32(local_tid_225295, 32) *\n                                              32) && ltid_in_bounds_225309;\n            \n            if (thread_active_225311) {\n                // read operands\n                {\n                    x_199982 = ((volatile __local\n                                 int64_t *) color_225012)[sext_i32_i64(local_tid_225295) -\n                                                          sext_i32_i64(skip_threads_225310)];\n             ",
                   "   }\n            }\n            // perform operation\n            {\n                bool inactive_225312 =\n                     slt64(srem64(sext_i32_i64(local_tid_225295), n_196692),\n                           sext_i32_i64(local_tid_225295) -\n                           sext_i32_i64(local_tid_225295 -\n                           skip_threads_225310));\n                \n                if (thread_active_225311 && inactive_225312) {\n                    x_199982 = x_199983;\n                }\n                if (thread_active_225311) {\n                    if (!inactive_225312) {\n                        int64_t defunc_1_op_res_199984 = add64(x_199982,\n                                                               x_199983);\n                        \n                        x_199982 = defunc_1_op_res_199984;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225297, skip_threads_225310)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225311) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225012)[sext_i32_i64(local_tid_225295)] =\n                        x_199982;\n                    x_199983 = x_199982;\n                }\n            }\n            if (sle32(wave_sizze_225297, skip_threads_225310)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225310 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225295 - squot32(local_tid_225295, 32) * 32) == 31 &&\n            ltid_in_bounds_225309) {\n            ((volatile __local\n              int64_t *) color_225012)[sext_i32_i64(squot32(local_tid_225295,\n                                                            32))] = x_199982;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains ",
                   "carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225313;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225295, 32) == 0 && ltid_in_bounds_225309) {\n                x_225307 = ((volatile __local\n                             int64_t *) color_225012)[sext_i32_i64(local_tid_225295)];\n                if ((local_tid_225295 - squot32(local_tid_225295, 32) * 32) ==\n                    0) {\n                    x_225306 = x_225307;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225313 = 1;\n            while (slt32(skip_threads_225313, 32)) {\n                bool thread_active_225314 = sle32(skip_threads_225313,\n                                                  local_tid_225295 -\n                                                  squot32(local_tid_225295,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225295, 32) == 0 &&\n                      ltid_in_bounds_225309);\n                \n                if (thread_active_225314) {\n                    // read operands\n                    {\n                        x_225306 = ((volatile __local\n                                     int64_t *) color_225012)[sext_i32_i64(local_tid_225295) -\n                                                              sext_i32_i64(skip_threads_225313)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225315 =\n                         slt64(srem64(sext_i32_i64(local_tid_225295 * 32 + 32 -\n                                      1), n_196692),\n                               sext_i32_i64(local_tid_225295 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225295 -\n                                             skip_threads_225313) * 32 + 32 -\n                               1));\n                    \n          ",
                   "          if (thread_active_225314 && inactive_225315) {\n                        x_225306 = x_225307;\n                    }\n                    if (thread_active_225314) {\n                        if (!inactive_225315) {\n                            int64_t defunc_1_op_res_225308 = add64(x_225306,\n                                                                   x_225307);\n                            \n                            x_225306 = defunc_1_op_res_225308;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225297, skip_threads_225313)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225314) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225012)[sext_i32_i64(local_tid_225295)] =\n                            x_225306;\n                        x_225307 = x_225306;\n                    }\n                }\n                if (sle32(wave_sizze_225297, skip_threads_225313)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225313 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225316 = squot32(local_tid_225295, 32) == 0 ||\n         !ltid_in_bounds_225309;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225316) {\n                x_199983 = x_199982;\n                x_199982 = ((__local\n                             int64_t *) color_225012)[sext_i32_i64(squot32(local_tid_225295,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225317 = slt64(srem64(sext_i32_i64(local_tid_225295),\n                                  ",
                   "              n_196692),\n                                         sext_i32_i64(local_tid_225295) -\n                                         sext_i32_i64(squot32(local_tid_225295,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225316) {\n                if (inactive_225317) {\n                    x_199982 = x_199983;\n                }\n            }\n            if (!no_carry_in_225316) {\n                if (!inactive_225317) {\n                    int64_t defunc_1_op_res_199984 = add64(x_199982, x_199983);\n                    \n                    x_199982 = defunc_1_op_res_199984;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225316) {\n                ((__local\n                  int64_t *) color_225012)[sext_i32_i64(local_tid_225295)] =\n                    x_199982;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225295, 32) == 0 && ltid_in_bounds_225309) {\n            ((__local int64_t *) color_225012)[sext_i32_i64(local_tid_225295)] =\n                x_199983;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t last_res_199989;\n    \n    last_res_199989 = ((__local int64_t *) color_225012)[i_196779];\n    ((__local int64_t *) color_225011)[sext_i32_i64(local_tid_225295)] =\n        (int64_t) -1;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t write_i_199992 = sext_i32_i64(sext_i64_i32(ltid_pre_225299));\n    int32_t phys_tid_199993 = local_tid_225295;\n    float x_199994;\n    \n    x_199994 = ((__global float *) Y_mem_222225)[gtid_199975 * n_196692 +\n                                                 write_i_199992];\n    \n    bool isnan_res_199997;\n    \n    isnan_res_199997 = futrts_isnan32(x_199994);\n    \n    bool defunc_0_p_res_199998 = !isnan_res_199997;\n    int64_t defunc_1_f_res_199999;\n    \n    if (defunc_0_p_res_199998) ",
                   "{\n        int64_t x_199995;\n        \n        x_199995 = ((__local int64_t *) color_225012)[write_i_199992];\n        \n        int64_t defunc_1_f_res_t_res_200000 = sub64(x_199995, (int64_t) 1);\n        \n        defunc_1_f_res_199999 = defunc_1_f_res_t_res_200000;\n    } else {\n        defunc_1_f_res_199999 = (int64_t) -1;\n    }\n    if (sle64((int64_t) 0, defunc_1_f_res_199999) &&\n        slt64(defunc_1_f_res_199999, n_196692)) {\n        ((__local int64_t *) color_225011)[defunc_1_f_res_199999] =\n            write_i_199992;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t tmp_225318;\n    \n    tmp_225318 = ((__local\n                   int64_t *) color_225011)[sext_i32_i64(local_tid_225295)];\n    ((__global int64_t *) mem_222238)[gtid_199975 * n_196692 +\n                                      sext_i32_i64(local_tid_225295)] =\n        tmp_225318;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_tid_225295 == 0) {\n        ((__global int64_t *) mem_222241)[gtid_199975] = last_res_199989;\n    }\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_200331(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *color_225014_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225013_backing_aligned_1,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t i_196831,\n                                             int64_t computed_group_sizze_200270,\n                                             __global unsigned char *mem_222263,\n                                             __global unsigned char *mem_222279,\n                                             __global unsigned char *mem_222283)\n",
                   "{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225014_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225014_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225013_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225013_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225429;\n    int32_t local_tid_225430;\n    int64_t group_sizze_225433;\n    int32_t wave_sizze_225432;\n    int32_t group_tid_225431;\n    \n    global_tid_225429 = get_global_id(0);\n    local_tid_225430 = get_local_id(0);\n    group_sizze_225433 = get_local_size(0);\n    wave_sizze_225432 = LOCKSTEP_WIDTH;\n    group_tid_225431 = get_group_id(0);\n    \n    int32_t phys_tid_200331 = group_tid_225431;\n    int64_t slice_225436 = defunc_0_f_res_196740;\n    int64_t slice_225437 = n_p_196694 * slice_225436;\n    int64_t ltid_pre_225434 = squot64(sext_i32_i64(local_tid_225430),\n                                      slice_225436);\n    int64_t remnant_225438 = sext_i32_i64(local_tid_225430) - ltid_pre_225434 *\n            slice_225436;\n    int64_t ltid_pre_225435 = remnant_225438;\n    int64_t remnant_225439 = remnant_225438 - ltid_pre_225435;\n    int64_t slice_225440 = m_196691;\n    int64_t gtid_200330 = sext_i32_i64(group_tid_225431);\n    int64_t remnant_225441 = sext_i32_i64(group_tid_225431) - gtid_200330;\n    __local unsigned char *color_225013;\n    \n    color_225013 = (__local unsigned char *) color_225013_backing_0;\n    \n    __local unsigned char *color_225014;\n    \n    color_225014 = (__local unsigned char *) color_225014_backing_1;\n    \n    int64_t gtid_200335 = sext_i32_i64(sext_i64_i32(ltid_pre_225434));\n    int64_t gtid_200336 = sext_i32_i64(sext_i64_i32(ltid_pre_225435));\n    int32_t phys_tid_200",
                   "337 = local_tid_225430;\n    \n    if (slt64(gtid_200335, n_p_196694) && slt64(gtid_200336,\n                                                defunc_0_f_res_196740)) {\n        float x_200342;\n        \n        x_200342 = ((__global float *) mem_222263)[gtid_200330 *\n                                                   (defunc_0_f_res_196740 *\n                                                    n_p_196694) + gtid_200335 *\n                                                   defunc_0_f_res_196740 +\n                                                   gtid_200336];\n        \n        bool isnan_res_200343;\n        \n        isnan_res_200343 = futrts_isnan32(x_200342);\n        \n        bool defunc_0_p_res_200344 = !isnan_res_200343;\n        int64_t defunc_0_f_res_200345 = btoi_bool_i64(defunc_0_p_res_200344);\n        \n        ((__local int64_t *) color_225014)[gtid_200335 * defunc_0_f_res_196740 +\n                                           gtid_200336] = defunc_0_f_res_200345;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_225442 = n_p_196694 * defunc_0_f_res_196740;\n    int64_t x_200338;\n    int64_t x_200339;\n    int64_t x_225444;\n    int64_t x_225445;\n    bool ltid_in_bounds_225447 = slt64(sext_i32_i64(local_tid_225430),\n                                       n_p_196694 * defunc_0_f_res_196740);\n    int32_t skip_threads_225448;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225447) {\n            x_200339 = ((volatile __local\n                         int64_t *) color_225014)[sext_i32_i64(local_tid_225430)];\n            if ((local_tid_225430 - squot32(local_tid_225430, 32) * 32) == 0) {\n                x_200338 = x_200339;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225448 = 1;\n        while (slt32(skip_threads_225448, 32)) {\n            bool thread_active_225449 = sle32(skip_threads_225448,\n                                              local_tid_225430 -\n                  ",
                   "                            squot32(local_tid_225430, 32) *\n                                              32) && ltid_in_bounds_225447;\n            \n            if (thread_active_225449) {\n                // read operands\n                {\n                    x_200338 = ((volatile __local\n                                 int64_t *) color_225014)[sext_i32_i64(local_tid_225430) -\n                                                          sext_i32_i64(skip_threads_225448)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225450 =\n                     slt64(srem64(sext_i32_i64(local_tid_225430),\n                                  defunc_0_f_res_196740),\n                           sext_i32_i64(local_tid_225430) -\n                           sext_i32_i64(local_tid_225430 -\n                           skip_threads_225448));\n                \n                if (thread_active_225449 && inactive_225450) {\n                    x_200338 = x_200339;\n                }\n                if (thread_active_225449) {\n                    if (!inactive_225450) {\n                        int64_t defunc_1_op_res_200340 = add64(x_200338,\n                                                               x_200339);\n                        \n                        x_200338 = defunc_1_op_res_200340;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225432, skip_threads_225448)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225449) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225014)[sext_i32_i64(local_tid_225430)] =\n                        x_200338;\n                    x_200339 = x_200338;\n                }\n            }\n            if (sle32(wave_sizze_225432, skip_threads_225448)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225448 *= ",
                   "2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225430 - squot32(local_tid_225430, 32) * 32) == 31 &&\n            ltid_in_bounds_225447) {\n            ((volatile __local\n              int64_t *) color_225014)[sext_i32_i64(squot32(local_tid_225430,\n                                                            32))] = x_200338;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225451;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225430, 32) == 0 && ltid_in_bounds_225447) {\n                x_225445 = ((volatile __local\n                             int64_t *) color_225014)[sext_i32_i64(local_tid_225430)];\n                if ((local_tid_225430 - squot32(local_tid_225430, 32) * 32) ==\n                    0) {\n                    x_225444 = x_225445;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225451 = 1;\n            while (slt32(skip_threads_225451, 32)) {\n                bool thread_active_225452 = sle32(skip_threads_225451,\n                                                  local_tid_225430 -\n                                                  squot32(local_tid_225430,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225430, 32) == 0 &&\n                      ltid_in_bounds_225447);\n                \n                if (thread_active_225452) {\n                    // read operands\n                    {\n                        x_225444 = ((volatile __local\n                                     int64_t *) color_225014)[sext_i32_i64(local_tid_225430) -\n                                                              sext_i32_i64(skip_threads_225451)];\n                    }\n ",
                   "               }\n                // perform operation\n                {\n                    bool inactive_225453 =\n                         slt64(srem64(sext_i32_i64(local_tid_225430 * 32 + 32 -\n                                      1), defunc_0_f_res_196740),\n                               sext_i32_i64(local_tid_225430 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225430 -\n                                             skip_threads_225451) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225452 && inactive_225453) {\n                        x_225444 = x_225445;\n                    }\n                    if (thread_active_225452) {\n                        if (!inactive_225453) {\n                            int64_t defunc_1_op_res_225446 = add64(x_225444,\n                                                                   x_225445);\n                            \n                            x_225444 = defunc_1_op_res_225446;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225432, skip_threads_225451)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225452) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225014)[sext_i32_i64(local_tid_225430)] =\n                            x_225444;\n                        x_225445 = x_225444;\n                    }\n                }\n                if (sle32(wave_sizze_225432, skip_threads_225451)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225451 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225454 = squot32(local_tid_225430, 32) == 0 ||\n         !ltid_in_bounds_225447;\n    \n    // carry-in for every block except the first\n    {\n        // read oper",
                   "ands\n        {\n            if (!no_carry_in_225454) {\n                x_200339 = x_200338;\n                x_200338 = ((__local\n                             int64_t *) color_225014)[sext_i32_i64(squot32(local_tid_225430,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225455 = slt64(srem64(sext_i32_i64(local_tid_225430),\n                                                defunc_0_f_res_196740),\n                                         sext_i32_i64(local_tid_225430) -\n                                         sext_i32_i64(squot32(local_tid_225430,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225454) {\n                if (inactive_225455) {\n                    x_200338 = x_200339;\n                }\n            }\n            if (!no_carry_in_225454) {\n                if (!inactive_225455) {\n                    int64_t defunc_1_op_res_200340 = add64(x_200338, x_200339);\n                    \n                    x_200338 = defunc_1_op_res_200340;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225454) {\n                ((__local\n                  int64_t *) color_225014)[sext_i32_i64(local_tid_225430)] =\n                    x_200338;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225430, 32) == 0 && ltid_in_bounds_225447) {\n            ((__local int64_t *) color_225014)[sext_i32_i64(local_tid_225430)] =\n                x_200339;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225456 = 0; i_225456 < sdiv_up64(n_p_196694 *\n                                                    defunc_0_f_res_196740 -\n                                        ",
                   "            sext_i32_i64(local_tid_225430),\n                                                    computed_group_sizze_200270);\n         i_225456++) {\n        ((__local int64_t *) color_225013)[squot64(i_225456 *\n                                                   computed_group_sizze_200270 +\n                                                   sext_i32_i64(local_tid_225430),\n                                                   defunc_0_f_res_196740) *\n                                           defunc_0_f_res_196740 + (i_225456 *\n                                                                    computed_group_sizze_200270 +\n                                                                    sext_i32_i64(local_tid_225430) -\n                                                                    squot64(i_225456 *\n                                                                            computed_group_sizze_200270 +\n                                                                            sext_i32_i64(local_tid_225430),\n                                                                            defunc_0_f_res_196740) *\n                                                                    defunc_0_f_res_196740)] =\n            (int64_t) -1;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_200357 = sext_i32_i64(sext_i64_i32(ltid_pre_225434));\n    int64_t gtid_200358 = sext_i32_i64(sext_i64_i32(ltid_pre_225435));\n    int32_t phys_tid_200359 = local_tid_225430;\n    \n    if (slt64(gtid_200357, n_p_196694) && slt64(gtid_200358,\n                                                defunc_0_f_res_196740)) {\n        float x_200360;\n        \n        x_200360 = ((__global float *) mem_222263)[gtid_200330 *\n                                                   (defunc_0_f_res_196740 *\n                                                    n_p_196694) + gtid_200357 *\n                                                   defunc_0_f_res_196740 +\n                                             ",
                   "      gtid_200358];\n        \n        bool isnan_res_200363;\n        \n        isnan_res_200363 = futrts_isnan32(x_200360);\n        \n        bool defunc_0_p_res_200364 = !isnan_res_200363;\n        int64_t defunc_1_f_res_200365;\n        \n        if (defunc_0_p_res_200364) {\n            int64_t x_200361;\n            \n            x_200361 = ((__local int64_t *) color_225014)[gtid_200357 *\n                                                          defunc_0_f_res_196740 +\n                                                          gtid_200358];\n            \n            int64_t defunc_1_f_res_t_res_200366 = sub64(x_200361, (int64_t) 1);\n            \n            defunc_1_f_res_200365 = defunc_1_f_res_t_res_200366;\n        } else {\n            defunc_1_f_res_200365 = (int64_t) -1;\n        }\n        if ((sle64((int64_t) 0, gtid_200357) && slt64(gtid_200357,\n                                                      n_p_196694)) &&\n            (sle64((int64_t) 0, defunc_1_f_res_200365) &&\n             slt64(defunc_1_f_res_200365, defunc_0_f_res_196740))) {\n            ((__local int64_t *) color_225013)[gtid_200357 *\n                                               defunc_0_f_res_196740 +\n                                               defunc_1_f_res_200365] =\n                gtid_200358;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225457 = 0; i_225457 < sdiv_up64(n_p_196694 *\n                                                    defunc_0_f_res_196740 -\n                                                    sext_i32_i64(local_tid_225430),\n                                                    computed_group_sizze_200270);\n         i_225457++) {\n        int64_t tmp_225458;\n        \n        tmp_225458 = ((__local int64_t *) color_225013)[squot64(i_225457 *\n                                                                computed_group_sizze_200270 +\n                                                                sext_i32_i64(local_tid_225430),\n                                ",
                   "                                defunc_0_f_res_196740) *\n                                                        defunc_0_f_res_196740 +\n                                                        (i_225457 *\n                                                         computed_group_sizze_200270 +\n                                                         sext_i32_i64(local_tid_225430) -\n                                                         squot64(i_225457 *\n                                                                 computed_group_sizze_200270 +\n                                                                 sext_i32_i64(local_tid_225430),\n                                                                 defunc_0_f_res_196740) *\n                                                         defunc_0_f_res_196740)];\n        ((__global int64_t *) mem_222279)[gtid_200330 * (defunc_0_f_res_196740 *\n                                                         n_p_196694) +\n                                          squot64(i_225457 *\n                                                  computed_group_sizze_200270 +\n                                                  sext_i32_i64(local_tid_225430),\n                                                  defunc_0_f_res_196740) *\n                                          defunc_0_f_res_196740 + (i_225457 *\n                                                                   computed_group_sizze_200270 +\n                                                                   sext_i32_i64(local_tid_225430) -\n                                                                   squot64(i_225457 *\n                                                                           computed_group_sizze_200270 +\n                                                                           sext_i32_i64(local_tid_225430),\n                                                                           defunc_0_f_res_196740) *\n                                                       ",
                   "            defunc_0_f_res_196740)] =\n            tmp_225458;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225459 = 0; i_225459 < sdiv_up64(n_p_196694 -\n                                                    sext_i32_i64(local_tid_225430),\n                                                    computed_group_sizze_200270);\n         i_225459++) {\n        int64_t tmp_225460;\n        \n        tmp_225460 = ((__local int64_t *) color_225014)[i_196831 + (i_225459 *\n                                                                    computed_group_sizze_200270 +\n                                                                    sext_i32_i64(local_tid_225430)) *\n                                                        defunc_0_f_res_196740];\n        ((__global int64_t *) mem_222283)[gtid_200330 * n_p_196694 + (i_225459 *\n                                                                      computed_group_sizze_200270 +\n                                                                      sext_i32_i64(local_tid_225430))] =\n            tmp_225460;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_200607(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *color_225016_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225015_backing_aligned_1,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t i_196831, __global\n                                             unsigned char *mem_222263, __global\n                                             unsigned char *mem_222297, __global\n                                             unsigned char ",
                   "*mem_222301)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225016_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225016_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225015_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225015_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225461;\n    int32_t local_tid_225462;\n    int64_t group_sizze_225465;\n    int32_t wave_sizze_225464;\n    int32_t group_tid_225463;\n    \n    global_tid_225461 = get_global_id(0);\n    local_tid_225462 = get_local_id(0);\n    group_sizze_225465 = get_local_size(0);\n    wave_sizze_225464 = LOCKSTEP_WIDTH;\n    group_tid_225463 = get_group_id(0);\n    \n    int32_t phys_tid_200607 = group_tid_225463;\n    int64_t slice_225467 = defunc_0_f_res_196740;\n    int64_t ltid_pre_225466 = sext_i32_i64(local_tid_225462);\n    int64_t remnant_225468 = sext_i32_i64(local_tid_225462) - ltid_pre_225466;\n    int64_t slice_225469 = n_p_196694;\n    int64_t slice_225470 = m_196691 * slice_225469;\n    int64_t gtid_200605 = squot64(sext_i32_i64(group_tid_225463), slice_225469);\n    int64_t remnant_225471 = sext_i32_i64(group_tid_225463) - gtid_200605 *\n            slice_225469;\n    int64_t gtid_200606 = remnant_225471;\n    int64_t remnant_225472 = remnant_225471 - gtid_200606;\n    __local unsigned char *color_225015;\n    \n    color_225015 = (__local unsigned char *) color_225015_backing_0;\n    \n    __local unsigned char *color_225016;\n    \n    color_225016 = (__local unsigned char *) color_225016_backing_1;\n    \n    int64_t gtid_200611 = sext_i32_i64(sext_i64_i32(ltid_pre_225466));\n    int32_t phys_tid_200612 = local_tid_225462;\n    float x_200616;\n    \n    x_200616 = ((__global float *) mem_222263)[gtid_200",
                   "605 *\n                                               (defunc_0_f_res_196740 *\n                                                n_p_196694) + gtid_200606 *\n                                               defunc_0_f_res_196740 +\n                                               gtid_200611];\n    \n    bool isnan_res_200617;\n    \n    isnan_res_200617 = futrts_isnan32(x_200616);\n    \n    bool defunc_0_p_res_200618 = !isnan_res_200617;\n    int64_t defunc_0_f_res_200619 = btoi_bool_i64(defunc_0_p_res_200618);\n    \n    ((__local int64_t *) color_225016)[gtid_200611] = defunc_0_f_res_200619;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_225473 = defunc_0_f_res_196740;\n    int64_t x_200613;\n    int64_t x_200614;\n    int64_t x_225475;\n    int64_t x_225476;\n    bool ltid_in_bounds_225478 = slt64(sext_i32_i64(local_tid_225462),\n                                       defunc_0_f_res_196740);\n    int32_t skip_threads_225479;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225478) {\n            x_200614 = ((volatile __local\n                         int64_t *) color_225016)[sext_i32_i64(local_tid_225462)];\n            if ((local_tid_225462 - squot32(local_tid_225462, 32) * 32) == 0) {\n                x_200613 = x_200614;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225479 = 1;\n        while (slt32(skip_threads_225479, 32)) {\n            bool thread_active_225480 = sle32(skip_threads_225479,\n                                              local_tid_225462 -\n                                              squot32(local_tid_225462, 32) *\n                                              32) && ltid_in_bounds_225478;\n            \n            if (thread_active_225480) {\n                // read operands\n                {\n                    x_200613 = ((volatile __local\n                                 int64_t *) color_225016)[sext_i32_i64(local_tid_225462) -\n                                        ",
                   "                  sext_i32_i64(skip_threads_225479)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225481 =\n                     slt64(srem64(sext_i32_i64(local_tid_225462),\n                                  defunc_0_f_res_196740),\n                           sext_i32_i64(local_tid_225462) -\n                           sext_i32_i64(local_tid_225462 -\n                           skip_threads_225479));\n                \n                if (thread_active_225480 && inactive_225481) {\n                    x_200613 = x_200614;\n                }\n                if (thread_active_225480) {\n                    if (!inactive_225481) {\n                        int64_t defunc_1_op_res_200615 = add64(x_200613,\n                                                               x_200614);\n                        \n                        x_200613 = defunc_1_op_res_200615;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225464, skip_threads_225479)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225480) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225016)[sext_i32_i64(local_tid_225462)] =\n                        x_200613;\n                    x_200614 = x_200613;\n                }\n            }\n            if (sle32(wave_sizze_225464, skip_threads_225479)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225479 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225462 - squot32(local_tid_225462, 32) * 32) == 31 &&\n            ltid_in_bounds_225478) {\n            ((volatile __local\n              int64_t *) color_225016)[sext_i32_i64(squot32(local_tid_225462,\n                                                            32))] = x_20061",
                   "3;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225482;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225462, 32) == 0 && ltid_in_bounds_225478) {\n                x_225476 = ((volatile __local\n                             int64_t *) color_225016)[sext_i32_i64(local_tid_225462)];\n                if ((local_tid_225462 - squot32(local_tid_225462, 32) * 32) ==\n                    0) {\n                    x_225475 = x_225476;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225482 = 1;\n            while (slt32(skip_threads_225482, 32)) {\n                bool thread_active_225483 = sle32(skip_threads_225482,\n                                                  local_tid_225462 -\n                                                  squot32(local_tid_225462,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225462, 32) == 0 &&\n                      ltid_in_bounds_225478);\n                \n                if (thread_active_225483) {\n                    // read operands\n                    {\n                        x_225475 = ((volatile __local\n                                     int64_t *) color_225016)[sext_i32_i64(local_tid_225462) -\n                                                              sext_i32_i64(skip_threads_225482)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225484 =\n                         slt64(srem64(sext_i32_i64(local_tid_225462 * 32 + 32 -\n                                      1), defunc_0_f_res_196740),\n                               sext_i32_i64(local_tid_225462 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225462 -\n                  ",
                   "                           skip_threads_225482) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225483 && inactive_225484) {\n                        x_225475 = x_225476;\n                    }\n                    if (thread_active_225483) {\n                        if (!inactive_225484) {\n                            int64_t defunc_1_op_res_225477 = add64(x_225475,\n                                                                   x_225476);\n                            \n                            x_225475 = defunc_1_op_res_225477;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225464, skip_threads_225482)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225483) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225016)[sext_i32_i64(local_tid_225462)] =\n                            x_225475;\n                        x_225476 = x_225475;\n                    }\n                }\n                if (sle32(wave_sizze_225464, skip_threads_225482)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225482 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225485 = squot32(local_tid_225462, 32) == 0 ||\n         !ltid_in_bounds_225478;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225485) {\n                x_200614 = x_200613;\n                x_200613 = ((__local\n                             int64_t *) color_225016)[sext_i32_i64(squot32(local_tid_225462,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operati",
                   "on\n        {\n            bool inactive_225486 = slt64(srem64(sext_i32_i64(local_tid_225462),\n                                                defunc_0_f_res_196740),\n                                         sext_i32_i64(local_tid_225462) -\n                                         sext_i32_i64(squot32(local_tid_225462,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225485) {\n                if (inactive_225486) {\n                    x_200613 = x_200614;\n                }\n            }\n            if (!no_carry_in_225485) {\n                if (!inactive_225486) {\n                    int64_t defunc_1_op_res_200615 = add64(x_200613, x_200614);\n                    \n                    x_200613 = defunc_1_op_res_200615;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225485) {\n                ((__local\n                  int64_t *) color_225016)[sext_i32_i64(local_tid_225462)] =\n                    x_200613;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225462, 32) == 0 && ltid_in_bounds_225478) {\n            ((__local int64_t *) color_225016)[sext_i32_i64(local_tid_225462)] =\n                x_200614;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t last_res_200620;\n    \n    last_res_200620 = ((__local int64_t *) color_225016)[i_196831];\n    ((__local int64_t *) color_225015)[sext_i32_i64(local_tid_225462)] =\n        (int64_t) -1;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t write_i_200623 = sext_i32_i64(sext_i64_i32(ltid_pre_225466));\n    int32_t phys_tid_200624 = local_tid_225462;\n    float x_200625;\n    \n    x_200625 = ((__global float *) mem_222263)[gtid_200605 *\n                                               (defunc_0_f_res_196740 *\n                                                n_p_196694) + gtid_200606 *\n     ",
                   "                                          defunc_0_f_res_196740 +\n                                               write_i_200623];\n    \n    bool isnan_res_200628;\n    \n    isnan_res_200628 = futrts_isnan32(x_200625);\n    \n    bool defunc_0_p_res_200629 = !isnan_res_200628;\n    int64_t defunc_1_f_res_200630;\n    \n    if (defunc_0_p_res_200629) {\n        int64_t x_200626;\n        \n        x_200626 = ((__local int64_t *) color_225016)[write_i_200623];\n        \n        int64_t defunc_1_f_res_t_res_200631 = sub64(x_200626, (int64_t) 1);\n        \n        defunc_1_f_res_200630 = defunc_1_f_res_t_res_200631;\n    } else {\n        defunc_1_f_res_200630 = (int64_t) -1;\n    }\n    if (sle64((int64_t) 0, defunc_1_f_res_200630) &&\n        slt64(defunc_1_f_res_200630, defunc_0_f_res_196740)) {\n        ((__local int64_t *) color_225015)[defunc_1_f_res_200630] =\n            write_i_200623;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t tmp_225487;\n    \n    tmp_225487 = ((__local\n                   int64_t *) color_225015)[sext_i32_i64(local_tid_225462)];\n    ((__global int64_t *) mem_222297)[gtid_200605 * (defunc_0_f_res_196740 *\n                                                     n_p_196694) + gtid_200606 *\n                                      defunc_0_f_res_196740 +\n                                      sext_i32_i64(local_tid_225462)] =\n        tmp_225487;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_tid_225462 == 0) {\n        ((__global int64_t *) mem_222301)[gtid_200605 * n_p_196694 +\n                                          gtid_200606] = last_res_200620;\n    }\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_200860(__global int *global_failure,\n                                             int failure_is_an_option, __global\n                                             int64_t *global_failure_args,\n                                             __local volatile\n                                             int64_t *color_225023_backing_aligned_0,\n  ",
                   "                                           __local volatile\n                                             int64_t *color_225022_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225021_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *color_225020_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *color_225019_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225018_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *color_225017_backing_aligned_6,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745,\n                                             int64_t i_196831,\n                                             unsigned char x_196832_bits,\n                                             int64_t min_res_196862,\n                                             unsigned char loop_cond_196867_bits,\n                                             float i64_res_196868,\n                                             int64_t computed_group_sizze_200702,\n                                             __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                ",
                   "                             unsigned char *ext_mem_222322,\n                                             __global unsigned char *mem_222355,\n                                             __global unsigned char *mem_222360)\n{\n    bool x_196832 = x_196832_bits;\n    bool loop_cond_196867 = loop_cond_196867_bits;\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225023_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) color_225023_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225022_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) color_225022_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225021_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) color_225021_backing_aligned_2;\n    __local volatile unsigned char *restrict color_225020_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225020_backing_aligned_3;\n    __local volatile unsigned char *restrict color_225019_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225019_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225018_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225018_backing_aligned_5;\n    __local volatile unsigned char *restrict color_225017_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225017_backing_aligned_6;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (fa",
                   "iled)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_225579;\n    int32_t local_tid_225580;\n    int64_t group_sizze_225583;\n    int32_t wave_sizze_225582;\n    int32_t group_tid_225581;\n    \n    global_tid_225579 = get_global_id(0);\n    local_tid_225580 = get_local_id(0);\n    group_sizze_225583 = get_local_size(0);\n    wave_sizze_225582 = LOCKSTEP_WIDTH;\n    group_tid_225581 = get_group_id(0);\n    \n    int32_t phys_tid_200860 = group_tid_225581;\n    int64_t slice_225585 = n_p_196694;\n    int64_t ltid_pre_225584 = sext_i32_i64(local_tid_225580);\n    int64_t remnant_225586 = sext_i32_i64(local_tid_225580) - ltid_pre_225584;\n    int64_t slice_225589 = defunc_0_f_res_196740;\n    int64_t slice_225590 = n_p_196694 * slice_225589;\n    int64_t ltid_pre_225587 = squot64(sext_i32_i64(local_tid_225580),\n                                      slice_225589);\n    int64_t remnant_225591 = sext_i32_i64(local_tid_225580) - ltid_pre_225587 *\n            slice_225589;\n    int64_t ltid_pre_225588 = remnant_225591;\n    int64_t remnant_225592 = remnant_225591 - ltid_pre_225588;\n    int64_t slice_225595 = s_n_m_196745;\n    int64_t slice_225596 = n_p_196694 * slice_225595;\n    int64_t ltid_pre_225593 = squot64(sext_i32_i64(local_tid_225580),\n                                      slice_225595);\n    int64_t remnant_225597 = sext_i32_i64(local_tid_225580) - ltid_pre_225593 *\n            slice_225595;\n    int64_t ltid_pre_225594 = remnant_225597;\n    int64_t remnant_225598 = remnant_225597 - ltid_pre_225594;\n    int64_t slice_225599 = m_196691;\n    int64_t gtid_200859 = sext_i32_i64(group_tid_225581);\n    int64_t remnant_225600 = sext_i32_i64(group_tid_225581) - gtid_200859;\n    __local unsigned char *color_225017;\n    \n    color_225017 = (__local unsigned char *) color_225017_backing_0;\n    \n    __local unsigned char *color_225018;\n    \n    color_225018 = (__local unsigned char *) color_225018_backing_1;\n    \n    __local unsigne",
                   "d char *color_225019;\n    \n    color_225019 = (__local unsigned char *) color_225019_backing_2;\n    \n    __local unsigned char *color_225020;\n    \n    color_225020 = (__local unsigned char *) color_225020_backing_3;\n    \n    __local unsigned char *color_225021;\n    \n    color_225021 = (__local unsigned char *) color_225021_backing_4;\n    \n    __local unsigned char *color_225022;\n    \n    color_225022 = (__local unsigned char *) color_225022_backing_5;\n    \n    __local unsigned char *color_225023;\n    \n    color_225023 = (__local unsigned char *) color_225023_backing_6;\n    \n    int64_t gtid_200866 = sext_i32_i64(sext_i64_i32(ltid_pre_225587));\n    int64_t gtid_200867 = sext_i32_i64(sext_i64_i32(ltid_pre_225588));\n    int32_t phys_tid_200868 = local_tid_225580;\n    \n    if (slt64(gtid_200866, n_p_196694) && slt64(gtid_200867,\n                                                defunc_0_f_res_196740)) {\n        int64_t x_200869;\n        \n        x_200869 = ((__global int64_t *) ext_mem_222322)[gtid_200859 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                                         gtid_200866 *\n                                                         defunc_0_f_res_196740 +\n                                                         gtid_200867];\n        \n        int64_t defunc_0_f_res_200870 = add64((int64_t) 1, x_200869);\n        \n        ((__local int64_t *) color_225023)[gtid_200866 * defunc_0_f_res_196740 +\n                                           gtid_200867] = defunc_0_f_res_200870;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_200875 = sext_i32_i64(sext_i64_i32(ltid_pre_225584));\n    int32_t phys_tid_200876 = local_tid_225580;\n    \n    if (slt64(gtid_200875, n_p_196694)) {\n        int64_t x_200877;\n        \n        x_200877 = ((__global int64_t *) ext_mem_222321)[gtid_200859 *\n                                       ",
                   "                  n_p_196694 +\n                                                         gtid_200875];\n        \n        int64_t min_arg_200878 = sub64(x_200877, (int64_t) 1);\n        int64_t min_arg_200879 = sub64(x_200877, min_res_196862);\n        int64_t min_res_200880 = smin64(q_s_196695, x_200877);\n        float i64_res_200881 = sitofp_i64_f32(x_200877);\n        float x_200882 = i64_res_196868 - i64_res_200881;\n        float max_arg_200883 = x_200882 / 2.0F;\n        float max_res_200884 = fmax32(0.0F, max_arg_200883);\n        \n        ((__local int64_t *) color_225022)[gtid_200875] = min_arg_200878;\n        ((__local int64_t *) color_225021)[gtid_200875] = min_arg_200879;\n        ((__local int64_t *) color_225020)[gtid_200875] = min_res_200880;\n        ((__local float *) color_225019)[gtid_200875] = max_res_200884;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_200887 = sext_i32_i64(sext_i64_i32(ltid_pre_225593));\n    int64_t gtid_200888 = sext_i32_i64(sext_i64_i32(ltid_pre_225594));\n    int32_t phys_tid_200889 = local_tid_225580;\n    \n    if (slt64(gtid_200887, n_p_196694) && slt64(gtid_200888, s_n_m_196745)) {\n        int64_t min_arg_200891;\n        \n        min_arg_200891 = ((__local int64_t *) color_225022)[gtid_200887];\n        \n        int64_t min_arg_200892;\n        \n        min_arg_200892 = ((__local int64_t *) color_225021)[gtid_200887];\n        \n        int64_t min_res_200893;\n        \n        min_res_200893 = ((__local int64_t *) color_225020)[gtid_200887];\n        \n        float max_res_200894;\n        \n        max_res_200894 = ((__local float *) color_225019)[gtid_200887];\n        \n        bool cond_200896 = gtid_200888 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_200897;\n        \n        if (cond_200896) {\n            defunc_0_m_fun_res_200897 = (int64_t) 0;\n        } else {\n            int64_t y_200898 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_200899 = gtid_200888 == y_200898;\n            int64_t defunc_0_m_fun_",
                   "res_f_res_200900;\n            \n            if (cond_200899) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_200901 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_200900 =\n                    defunc_0_m_fun_res_f_res_t_res_200901;\n            } else {\n                int64_t x_200902 = sub64(gtid_200888, (int64_t) 1);\n                int64_t x_200903 = mul64(jump_s_196701, x_200902);\n                int64_t min_arg_200904 = add64((int64_t) 1, x_200903);\n                int64_t min_res_200905 = smin64(defunc_0_f_res_196740,\n                                                min_arg_200904);\n                \n                defunc_0_m_fun_res_f_res_200900 = min_res_200905;\n            }\n            defunc_0_m_fun_res_200897 = defunc_0_m_fun_res_f_res_200900;\n        }\n        \n        bool init_idx_200906;\n        int64_t init_idx_200907;\n        int64_t init_idx_200908;\n        bool loop_while_200909;\n        int64_t low_200910;\n        int64_t high_200911;\n        \n        loop_while_200909 = x_196832;\n        low_200910 = (int64_t) 0;\n        high_200911 = i_196831;\n        while (loop_while_200909) {\n            int64_t x_200912 = add64(low_200910, high_200911);\n            int64_t mid_200913 = sdiv64(x_200912, (int64_t) 2);\n            bool x_200914 = sle64((int64_t) 0, mid_200913);\n            bool y_200915 = slt64(mid_200913, defunc_0_f_res_196740);\n            bool bounds_check_200916 = x_200914 && y_200915;\n            bool index_certs_200917;\n            \n            if (!bounds_check_200916) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 1) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_200913;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = t",
                   "rue;\n                    goto error_2;\n                }\n            }\n            \n            int64_t mid_id_200918;\n            \n            mid_id_200918 = ((__local int64_t *) color_225023)[gtid_200887 *\n                                                               defunc_0_f_res_196740 +\n                                                               mid_200913];\n            \n            bool cond_200919 = slt64(mid_id_200918, (int64_t) 0);\n            int64_t mid_idx_200920;\n            \n            if (cond_200919) {\n                mid_idx_200920 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_200920 = mid_id_200918;\n            }\n            \n            bool cond_200921 = sle64(defunc_0_m_fun_res_200897, mid_idx_200920);\n            int64_t loopres_200922;\n            int64_t loopres_200923;\n            \n            if (cond_200921) {\n                int64_t loopres_t_res_200924 = sub64(mid_200913, (int64_t) 1);\n                \n                loopres_200922 = low_200910;\n                loopres_200923 = loopres_t_res_200924;\n            } else {\n                int64_t loopres_f_res_200925 = add64((int64_t) 1, mid_200913);\n                \n                loopres_200922 = loopres_f_res_200925;\n                loopres_200923 = high_200911;\n            }\n            \n            bool loop_cond_200926 = sle64(loopres_200922, loopres_200923);\n            bool loop_while_tmp_225601 = loop_cond_200926;\n            int64_t low_tmp_225602 = loopres_200922;\n            int64_t high_tmp_225603 = loopres_200923;\n            \n            loop_while_200909 = loop_while_tmp_225601;\n            low_200910 = low_tmp_225602;\n            high_200911 = high_tmp_225603;\n        }\n        init_idx_200906 = loop_while_200909;\n        init_idx_200907 = low_200910;\n        init_idx_200908 = high_200911;\n        \n        bool idx_200927;\n        int64_t idx_200928;\n        int64_t idx_200929;\n        int64_t idx_200930;\n        bool loop_while_2009",
                   "31;\n        int64_t l_idx_200932;\n        int64_t r_idx_200933;\n        int64_t span_200934;\n        \n        loop_while_200931 = loop_cond_196867;\n        l_idx_200932 = init_idx_200907;\n        r_idx_200933 = init_idx_200907;\n        span_200934 = (int64_t) 1;\n        while (loop_while_200931) {\n            int64_t max_arg_200935 = sub64(l_idx_200932, (int64_t) 1);\n            int64_t max_res_200936 = smax64((int64_t) 0, max_arg_200935);\n            int64_t min_arg_200937 = add64((int64_t) 1, r_idx_200933);\n            int64_t min_res_200938 = smin64(min_arg_200891, min_arg_200937);\n            bool x_200939 = sle64((int64_t) 0, max_res_200936);\n            bool y_200940 = slt64(max_res_200936, defunc_0_f_res_196740);\n            bool bounds_check_200941 = x_200939 && y_200940;\n            bool index_certs_200942;\n            \n            if (!bounds_check_200941) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 2) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_200936;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_2;\n                }\n            }\n            \n            int64_t x_200943;\n            \n            x_200943 = ((__local int64_t *) color_225023)[gtid_200887 *\n                                                          defunc_0_f_res_196740 +\n                                                          max_res_200936];\n            \n            int64_t abs_arg_200944 = sub64(x_200943, defunc_0_m_fun_res_200897);\n            int64_t abs_res_200945 = abs64(abs_arg_200944);\n            bool x_200946 = sle64((int64_t) 0, min_res_200938);\n            bool y_200947 = slt64(min_res_200938, defunc_0_f_res_196740);\n            bool bounds_check_200948 = x_200946 && y_200947;\n            bool",
                   " index_certs_200949;\n            \n            if (!bounds_check_200948) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 3) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_200938;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_2;\n                }\n            }\n            \n            int64_t x_200950;\n            \n            x_200950 = ((__local int64_t *) color_225023)[gtid_200887 *\n                                                          defunc_0_f_res_196740 +\n                                                          min_res_200938];\n            \n            int64_t abs_arg_200951 = sub64(x_200950, defunc_0_m_fun_res_200897);\n            int64_t abs_res_200952 = abs64(abs_arg_200951);\n            bool cond_200953 = max_res_200936 == l_idx_200932;\n            int64_t loopres_200954;\n            int64_t loopres_200955;\n            int64_t loopres_200956;\n            \n            if (cond_200953) {\n                loopres_200954 = l_idx_200932;\n                loopres_200955 = r_idx_200933;\n                loopres_200956 = min_res_196862;\n            } else {\n                bool cond_200957 = slt64(abs_res_200945, abs_res_200952);\n                bool cond_f_res_200958 = min_res_200938 == r_idx_200933;\n                bool x_200959 = !cond_200957;\n                bool y_200960 = cond_f_res_200958 && x_200959;\n                bool cond_200961 = cond_200957 || y_200960;\n                int64_t loopres_f_res_200962;\n                \n                if (cond_200961) {\n                    loopres_f_res_200962 = max_res_200936;\n                } else {\n                    loopres_f_res_200962 = l_idx_200932;\n                }\n                \n                int64_t loopres_f_res_200963;\n       ",
                   "         \n                if (cond_200961) {\n                    loopres_f_res_200963 = r_idx_200933;\n                } else {\n                    loopres_f_res_200963 = min_res_200938;\n                }\n                \n                int64_t loopres_f_res_200964;\n                \n                if (cond_200961) {\n                    int64_t loopres_f_res_t_res_200965 = add64((int64_t) 1,\n                                                               span_200934);\n                    \n                    loopres_f_res_200964 = loopres_f_res_t_res_200965;\n                } else {\n                    int64_t loopres_f_res_f_res_200966 = add64((int64_t) 1,\n                                                               span_200934);\n                    \n                    loopres_f_res_200964 = loopres_f_res_f_res_200966;\n                }\n                loopres_200954 = loopres_f_res_200962;\n                loopres_200955 = loopres_f_res_200963;\n                loopres_200956 = loopres_f_res_200964;\n            }\n            \n            bool loop_cond_200967 = slt64(loopres_200956, min_res_196862);\n            bool loop_while_tmp_225604 = loop_cond_200967;\n            int64_t l_idx_tmp_225605 = loopres_200954;\n            int64_t r_idx_tmp_225606 = loopres_200955;\n            int64_t span_tmp_225607 = loopres_200956;\n            \n            loop_while_200931 = loop_while_tmp_225604;\n            l_idx_200932 = l_idx_tmp_225605;\n            r_idx_200933 = r_idx_tmp_225606;\n            span_200934 = span_tmp_225607;\n        }\n        idx_200927 = loop_while_200931;\n        idx_200928 = l_idx_200932;\n        idx_200929 = r_idx_200933;\n        idx_200930 = span_200934;\n        \n        int64_t min_res_200968 = smin64(min_arg_200892, idx_200928);\n        int64_t max_res_200969 = smax64((int64_t) 0, min_res_200968);\n        int64_t defunc_0_m_fun_res_200970;\n        \n        if (cond_200896) {\n            defunc_0_m_fun_res_200970 = (int64_t) 0;\n        } else {\n      ",
                   "      int64_t y_200971 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_200972 = gtid_200888 == y_200971;\n            int64_t defunc_0_m_fun_res_f_res_200973;\n            \n            if (cond_200972) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_200974 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_200973 =\n                    defunc_0_m_fun_res_f_res_t_res_200974;\n            } else {\n                int64_t x_200975 = sub64(gtid_200888, (int64_t) 1);\n                int64_t x_200976 = mul64(jump_s_196701, x_200975);\n                int64_t min_arg_200977 = add64((int64_t) 1, x_200976);\n                int64_t min_res_200978 = smin64(defunc_0_f_res_196740,\n                                                min_arg_200977);\n                \n                defunc_0_m_fun_res_f_res_200973 = min_res_200978;\n            }\n            defunc_0_m_fun_res_200970 = defunc_0_m_fun_res_f_res_200973;\n        }\n        \n        int64_t x_200979 = add64(min_res_200893, max_res_200969);\n        int64_t r_200980 = sub64(x_200979, (int64_t) 1);\n        bool x_200981 = sle64((int64_t) 0, r_200980);\n        bool y_200982 = slt64(r_200980, defunc_0_f_res_196740);\n        bool bounds_check_200983 = x_200981 && y_200982;\n        bool index_certs_200984;\n        \n        if (!bounds_check_200983) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 4) == -1) {\n                    global_failure_args[0] = (int64_t) r_200980;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                local_failure = true;\n                goto error_2;\n            }\n        }\n        \n        int64_t x_200985;\n        \n        x_200985 = ((__local int64_t *) color_225023)[gtid_200887 *\n                                                      defunc_0_f_res_196740 +\n                                                 ",
                   "     r_200980];\n        \n        int64_t abs_arg_200986 = sub64(x_200985, defunc_0_m_fun_res_200970);\n        int64_t abs_res_200987 = abs64(abs_arg_200986);\n        bool x_200988 = sle64((int64_t) 0, max_res_200969);\n        bool y_200989 = slt64(max_res_200969, defunc_0_f_res_196740);\n        bool bounds_check_200990 = x_200988 && y_200989;\n        bool index_certs_200991;\n        \n        if (!bounds_check_200990) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 5) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_200969;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                local_failure = true;\n                goto error_2;\n            }\n        }\n        \n        int64_t x_200992;\n        \n        x_200992 = ((__local int64_t *) color_225023)[gtid_200887 *\n                                                      defunc_0_f_res_196740 +\n                                                      max_res_200969];\n        \n        int64_t abs_arg_200993 = sub64(x_200992, defunc_0_m_fun_res_200970);\n        int64_t abs_res_200994 = abs64(abs_arg_200993);\n        int64_t max_res_200995 = smax64(abs_res_200987, abs_res_200994);\n        float defunc_0_f_res_200996 = sitofp_i64_f32(max_res_200995);\n        float defunc_1_f_res_200997 = max_res_200894 + defunc_0_f_res_200996;\n        \n        ((__local float *) color_225018)[gtid_200887 * s_n_m_196745 +\n                                         gtid_200888] = defunc_1_f_res_200997;\n        ((__local int64_t *) color_225017)[gtid_200887 * s_n_m_196745 +\n                                           gtid_200888] = max_res_200969;\n    }\n    \n  error_2:\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_failure)\n        return;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225608 = 0; i_225608 < sdiv_up64(n_p_196694 * s_n_m_196745 -\n                                                    sext_i32_i64(lo",
                   "cal_tid_225580),\n                                                    computed_group_sizze_200702);\n         i_225608++) {\n        int64_t tmp_225609;\n        \n        tmp_225609 = ((__local int64_t *) color_225017)[squot64(i_225608 *\n                                                                computed_group_sizze_200702 +\n                                                                sext_i32_i64(local_tid_225580),\n                                                                s_n_m_196745) *\n                                                        s_n_m_196745 +\n                                                        (i_225608 *\n                                                         computed_group_sizze_200702 +\n                                                         sext_i32_i64(local_tid_225580) -\n                                                         squot64(i_225608 *\n                                                                 computed_group_sizze_200702 +\n                                                                 sext_i32_i64(local_tid_225580),\n                                                                 s_n_m_196745) *\n                                                         s_n_m_196745)];\n        ((__global int64_t *) mem_222355)[gtid_200859 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          squot64(i_225608 *\n                                                  computed_group_sizze_200702 +\n                                                  sext_i32_i64(local_tid_225580),\n                                                  s_n_m_196745) * s_n_m_196745 +\n                                          (i_225608 *\n                                           computed_group_sizze_200702 +\n                                           sext_i32_i64(local_tid_225580) -\n                                           squot64(i_225608 *\n                                              ",
                   "     computed_group_sizze_200702 +\n                                                   sext_i32_i64(local_tid_225580),\n                                                   s_n_m_196745) *\n                                           s_n_m_196745)] = tmp_225609;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225610 = 0; i_225610 < sdiv_up64(n_p_196694 * s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225580),\n                                                    computed_group_sizze_200702);\n         i_225610++) {\n        float tmp_225611;\n        \n        tmp_225611 = ((__local float *) color_225018)[squot64(i_225610 *\n                                                              computed_group_sizze_200702 +\n                                                              sext_i32_i64(local_tid_225580),\n                                                              s_n_m_196745) *\n                                                      s_n_m_196745 + (i_225610 *\n                                                                      computed_group_sizze_200702 +\n                                                                      sext_i32_i64(local_tid_225580) -\n                                                                      squot64(i_225610 *\n                                                                              computed_group_sizze_200702 +\n                                                                              sext_i32_i64(local_tid_225580),\n                                                                              s_n_m_196745) *\n                                                                      s_n_m_196745)];\n        ((__global float *) mem_222360)[gtid_200859 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        squot64(i_225610 *\n                                                computed_group_sizze_200702 +\n               ",
                   "                                 sext_i32_i64(local_tid_225580),\n                                                s_n_m_196745) * s_n_m_196745 +\n                                        (i_225610 *\n                                         computed_group_sizze_200702 +\n                                         sext_i32_i64(local_tid_225580) -\n                                         squot64(i_225610 *\n                                                 computed_group_sizze_200702 +\n                                                 sext_i32_i64(local_tid_225580),\n                                                 s_n_m_196745) *\n                                         s_n_m_196745)] = tmp_225611;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_3:\n    return;\n}\n__kernel void mainzisegmap_intragroup_201764(__global int *global_failure,\n                                             int failure_is_an_option, __global\n                                             int64_t *global_failure_args,\n                                             __local volatile\n                                             int64_t *color_225026_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225025_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225024_backing_aligned_2,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745,\n                                             int64_t i_196831,\n                    ",
                   "                         unsigned char x_196832_bits,\n                                             int64_t min_res_196862,\n                                             unsigned char loop_cond_196867_bits,\n                                             float i64_res_196868,\n                                             int64_t computed_group_sizze_201750,\n                                             __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global unsigned char *mem_222377,\n                                             __global unsigned char *mem_222382)\n{\n    bool x_196832 = x_196832_bits;\n    bool loop_cond_196867 = loop_cond_196867_bits;\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225026_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225026_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225025_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225025_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225024_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225024_backing_aligned_2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_225612;\n    int32_t local_tid_225613;\n    int64_t group_sizze_225616;\n    int32_t wave_sizze_225615;\n    int32_t group_tid_225614;\n    \n    global_tid_225612",
                   " = get_global_id(0);\n    local_tid_225613 = get_local_id(0);\n    group_sizze_225616 = get_local_size(0);\n    wave_sizze_225615 = LOCKSTEP_WIDTH;\n    group_tid_225614 = get_group_id(0);\n    \n    int32_t phys_tid_201764 = group_tid_225614;\n    int64_t slice_225618 = defunc_0_f_res_196740;\n    int64_t ltid_pre_225617 = sext_i32_i64(local_tid_225613);\n    int64_t remnant_225619 = sext_i32_i64(local_tid_225613) - ltid_pre_225617;\n    int64_t slice_225621 = s_n_m_196745;\n    int64_t ltid_pre_225620 = sext_i32_i64(local_tid_225613);\n    int64_t remnant_225622 = sext_i32_i64(local_tid_225613) - ltid_pre_225620;\n    int64_t slice_225623 = n_p_196694;\n    int64_t slice_225624 = m_196691 * slice_225623;\n    int64_t gtid_201762 = squot64(sext_i32_i64(group_tid_225614), slice_225623);\n    int64_t remnant_225625 = sext_i32_i64(group_tid_225614) - gtid_201762 *\n            slice_225623;\n    int64_t gtid_201763 = remnant_225625;\n    int64_t remnant_225626 = remnant_225625 - gtid_201763;\n    __local unsigned char *color_225024;\n    \n    color_225024 = (__local unsigned char *) color_225024_backing_0;\n    \n    __local unsigned char *color_225025;\n    \n    color_225025 = (__local unsigned char *) color_225025_backing_1;\n    \n    __local unsigned char *color_225026;\n    \n    color_225026 = (__local unsigned char *) color_225026_backing_2;\n    \n    int64_t x_201767;\n    \n    x_201767 = ((__global int64_t *) ext_mem_222321)[gtid_201762 * n_p_196694 +\n                                                     gtid_201763];\n    \n    int64_t gtid_201769 = sext_i32_i64(sext_i64_i32(ltid_pre_225617));\n    int32_t phys_tid_201770 = local_tid_225613;\n    \n    if (slt64(gtid_201769, defunc_0_f_res_196740)) {\n        int64_t x_201771;\n        \n        x_201771 = ((__global int64_t *) ext_mem_222322)[gtid_201762 *\n                                                         (defunc_0_f_res_196740 *\n                                                          n_p_196694) +\n                                      ",
                   "                   gtid_201763 *\n                                                         defunc_0_f_res_196740 +\n                                                         gtid_201769];\n        \n        int64_t defunc_0_f_res_201772 = add64((int64_t) 1, x_201771);\n        \n        ((__local int64_t *) color_225026)[gtid_201769] = defunc_0_f_res_201772;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t min_arg_201773 = sub64(x_201767, (int64_t) 1);\n    int64_t min_arg_201774 = sub64(x_201767, min_res_196862);\n    int64_t min_res_201775 = smin64(q_s_196695, x_201767);\n    float i64_res_201776 = sitofp_i64_f32(x_201767);\n    float x_201777 = i64_res_196868 - i64_res_201776;\n    float max_arg_201778 = x_201777 / 2.0F;\n    float max_res_201779 = fmax32(0.0F, max_arg_201778);\n    int64_t gtid_201782 = sext_i32_i64(sext_i64_i32(ltid_pre_225620));\n    int32_t phys_tid_201783 = local_tid_225613;\n    \n    if (slt64(gtid_201782, s_n_m_196745)) {\n        bool cond_201785 = gtid_201782 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_201786;\n        \n        if (cond_201785) {\n            defunc_0_m_fun_res_201786 = (int64_t) 0;\n        } else {\n            int64_t y_201787 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_201788 = gtid_201782 == y_201787;\n            int64_t defunc_0_m_fun_res_f_res_201789;\n            \n            if (cond_201788) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_201790 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_201789 =\n                    defunc_0_m_fun_res_f_res_t_res_201790;\n            } else {\n                int64_t x_201791 = sub64(gtid_201782, (int64_t) 1);\n                int64_t x_201792 = mul64(jump_s_196701, x_201791);\n                int64_t min_arg_201793 = add64((int64_t) 1, x_201792);\n                int64_t min_res_201794 = smin64(defunc_0_f_res_196740,\n                                                min_arg_201793);\n      ",
                   "          \n                defunc_0_m_fun_res_f_res_201789 = min_res_201794;\n            }\n            defunc_0_m_fun_res_201786 = defunc_0_m_fun_res_f_res_201789;\n        }\n        \n        bool init_idx_201795;\n        int64_t init_idx_201796;\n        int64_t init_idx_201797;\n        bool loop_while_201798;\n        int64_t low_201799;\n        int64_t high_201800;\n        \n        loop_while_201798 = x_196832;\n        low_201799 = (int64_t) 0;\n        high_201800 = i_196831;\n        while (loop_while_201798) {\n            int64_t x_201801 = add64(low_201799, high_201800);\n            int64_t mid_201802 = sdiv64(x_201801, (int64_t) 2);\n            bool x_201803 = sle64((int64_t) 0, mid_201802);\n            bool y_201804 = slt64(mid_201802, defunc_0_f_res_196740);\n            bool bounds_check_201805 = x_201803 && y_201804;\n            bool index_certs_201806;\n            \n            if (!bounds_check_201805) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 6) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_201802;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t mid_id_201807;\n            \n            mid_id_201807 = ((__local int64_t *) color_225026)[mid_201802];\n            \n            bool cond_201808 = slt64(mid_id_201807, (int64_t) 0);\n            int64_t mid_idx_201809;\n            \n            if (cond_201808) {\n                mid_idx_201809 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_201809 = mid_id_201807;\n            }\n            \n            bool cond_201810 = sle64(defunc_0_m_fun_res_201786, mid_idx_201809);\n            int64_t loopres_201811;\n            int64_t loopres_201812;\n     ",
                   "       \n            if (cond_201810) {\n                int64_t loopres_t_res_201813 = sub64(mid_201802, (int64_t) 1);\n                \n                loopres_201811 = low_201799;\n                loopres_201812 = loopres_t_res_201813;\n            } else {\n                int64_t loopres_f_res_201814 = add64((int64_t) 1, mid_201802);\n                \n                loopres_201811 = loopres_f_res_201814;\n                loopres_201812 = high_201800;\n            }\n            \n            bool loop_cond_201815 = sle64(loopres_201811, loopres_201812);\n            bool loop_while_tmp_225627 = loop_cond_201815;\n            int64_t low_tmp_225628 = loopres_201811;\n            int64_t high_tmp_225629 = loopres_201812;\n            \n            loop_while_201798 = loop_while_tmp_225627;\n            low_201799 = low_tmp_225628;\n            high_201800 = high_tmp_225629;\n        }\n        init_idx_201795 = loop_while_201798;\n        init_idx_201796 = low_201799;\n        init_idx_201797 = high_201800;\n        \n        bool idx_201816;\n        int64_t idx_201817;\n        int64_t idx_201818;\n        int64_t idx_201819;\n        bool loop_while_201820;\n        int64_t l_idx_201821;\n        int64_t r_idx_201822;\n        int64_t span_201823;\n        \n        loop_while_201820 = loop_cond_196867;\n        l_idx_201821 = init_idx_201796;\n        r_idx_201822 = init_idx_201796;\n        span_201823 = (int64_t) 1;\n        while (loop_while_201820) {\n            int64_t max_arg_201824 = sub64(l_idx_201821, (int64_t) 1);\n            int64_t max_res_201825 = smax64((int64_t) 0, max_arg_201824);\n            int64_t min_arg_201826 = add64((int64_t) 1, r_idx_201822);\n            int64_t min_res_201827 = smin64(min_arg_201773, min_arg_201826);\n            bool x_201828 = sle64((int64_t) 0, max_res_201825);\n            bool y_201829 = slt64(max_res_201825, defunc_0_f_res_196740);\n            bool bounds_check_201830 = x_201828 && y_201829;\n            bool index_certs_201831;\n            \n        ",
                   "    if (!bounds_check_201830) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 7) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_201825;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_201832;\n            \n            x_201832 = ((__local int64_t *) color_225026)[max_res_201825];\n            \n            int64_t abs_arg_201833 = sub64(x_201832, defunc_0_m_fun_res_201786);\n            int64_t abs_res_201834 = abs64(abs_arg_201833);\n            bool x_201835 = sle64((int64_t) 0, min_res_201827);\n            bool y_201836 = slt64(min_res_201827, defunc_0_f_res_196740);\n            bool bounds_check_201837 = x_201835 && y_201836;\n            bool index_certs_201838;\n            \n            if (!bounds_check_201837) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 8) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_201827;\n                        global_failure_args[1] =\n                            (int64_t) defunc_0_f_res_196740;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_201839;\n            \n            x_201839 = ((__local int64_t *) color_225026)[min_res_201827];\n            \n            int64_t abs_arg_201840 = sub64(x_201839, defunc_0_m_fun_res_201786);\n            int64_t abs_res_201841 = abs64(abs_arg_201840);\n            bool cond_201842 = max_res_201825 == l_idx_201821;\n            int64_t loopres_201843;\n            int64_t loopres_201844;\n            int64_t loopres_201845;\n        ",
                   "    \n            if (cond_201842) {\n                loopres_201843 = l_idx_201821;\n                loopres_201844 = r_idx_201822;\n                loopres_201845 = min_res_196862;\n            } else {\n                bool cond_201846 = slt64(abs_res_201834, abs_res_201841);\n                bool cond_f_res_201847 = min_res_201827 == r_idx_201822;\n                bool x_201848 = !cond_201846;\n                bool y_201849 = cond_f_res_201847 && x_201848;\n                bool cond_201850 = cond_201846 || y_201849;\n                int64_t loopres_f_res_201851;\n                \n                if (cond_201850) {\n                    loopres_f_res_201851 = max_res_201825;\n                } else {\n                    loopres_f_res_201851 = l_idx_201821;\n                }\n                \n                int64_t loopres_f_res_201852;\n                \n                if (cond_201850) {\n                    loopres_f_res_201852 = r_idx_201822;\n                } else {\n                    loopres_f_res_201852 = min_res_201827;\n                }\n                \n                int64_t loopres_f_res_201853;\n                \n                if (cond_201850) {\n                    int64_t loopres_f_res_t_res_201854 = add64((int64_t) 1,\n                                                               span_201823);\n                    \n                    loopres_f_res_201853 = loopres_f_res_t_res_201854;\n                } else {\n                    int64_t loopres_f_res_f_res_201855 = add64((int64_t) 1,\n                                                               span_201823);\n                    \n                    loopres_f_res_201853 = loopres_f_res_f_res_201855;\n                }\n                loopres_201843 = loopres_f_res_201851;\n                loopres_201844 = loopres_f_res_201852;\n                loopres_201845 = loopres_f_res_201853;\n            }\n            \n            bool loop_cond_201856 = slt64(loopres_201845, min_res_196862);\n            bool loop_while_tmp_225630",
                   " = loop_cond_201856;\n            int64_t l_idx_tmp_225631 = loopres_201843;\n            int64_t r_idx_tmp_225632 = loopres_201844;\n            int64_t span_tmp_225633 = loopres_201845;\n            \n            loop_while_201820 = loop_while_tmp_225630;\n            l_idx_201821 = l_idx_tmp_225631;\n            r_idx_201822 = r_idx_tmp_225632;\n            span_201823 = span_tmp_225633;\n        }\n        idx_201816 = loop_while_201820;\n        idx_201817 = l_idx_201821;\n        idx_201818 = r_idx_201822;\n        idx_201819 = span_201823;\n        \n        int64_t min_res_201857 = smin64(min_arg_201774, idx_201817);\n        int64_t max_res_201858 = smax64((int64_t) 0, min_res_201857);\n        int64_t defunc_0_m_fun_res_201859;\n        \n        if (cond_201785) {\n            defunc_0_m_fun_res_201859 = (int64_t) 0;\n        } else {\n            int64_t y_201860 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_201861 = gtid_201782 == y_201860;\n            int64_t defunc_0_m_fun_res_f_res_201862;\n            \n            if (cond_201861) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_201863 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_201862 =\n                    defunc_0_m_fun_res_f_res_t_res_201863;\n            } else {\n                int64_t x_201864 = sub64(gtid_201782, (int64_t) 1);\n                int64_t x_201865 = mul64(jump_s_196701, x_201864);\n                int64_t min_arg_201866 = add64((int64_t) 1, x_201865);\n                int64_t min_res_201867 = smin64(defunc_0_f_res_196740,\n                                                min_arg_201866);\n                \n                defunc_0_m_fun_res_f_res_201862 = min_res_201867;\n            }\n            defunc_0_m_fun_res_201859 = defunc_0_m_fun_res_f_res_201862;\n        }\n        \n        int64_t x_201868 = add64(min_res_201775, max_res_201858);\n        int64_t r_201869 = sub64(x_201868, (int64_t) 1);\n        bool x_2",
                   "01870 = sle64((int64_t) 0, r_201869);\n        bool y_201871 = slt64(r_201869, defunc_0_f_res_196740);\n        bool bounds_check_201872 = x_201870 && y_201871;\n        bool index_certs_201873;\n        \n        if (!bounds_check_201872) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 9) == -1) {\n                    global_failure_args[0] = (int64_t) r_201869;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_201874;\n        \n        x_201874 = ((__local int64_t *) color_225026)[r_201869];\n        \n        int64_t abs_arg_201875 = sub64(x_201874, defunc_0_m_fun_res_201859);\n        int64_t abs_res_201876 = abs64(abs_arg_201875);\n        bool x_201877 = sle64((int64_t) 0, max_res_201858);\n        bool y_201878 = slt64(max_res_201858, defunc_0_f_res_196740);\n        bool bounds_check_201879 = x_201877 && y_201878;\n        bool index_certs_201880;\n        \n        if (!bounds_check_201879) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 10) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_201858;\n                    global_failure_args[1] = (int64_t) defunc_0_f_res_196740;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_201881;\n        \n        x_201881 = ((__local int64_t *) color_225026)[max_res_201858];\n        \n        int64_t abs_arg_201882 = sub64(x_201881, defunc_0_m_fun_res_201859);\n        int64_t abs_res_201883 = abs64(abs_arg_201882);\n        int64_t max_res_201884 = smax64(abs_res_201876, abs_res_201883);\n        float defunc_0_f_res_201885 = sitofp_i64_f32(max_res_201884);\n        float defunc_1_f_res_201886 = max_res_201779 + defunc_0_f_res_201885;\n        \n        ((__local f",
                   "loat *) color_225025)[gtid_201782] = defunc_1_f_res_201886;\n        ((__local int64_t *) color_225024)[gtid_201782] = max_res_201858;\n    }\n    \n  error_1:\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_failure)\n        return;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225634 = 0; i_225634 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225613),\n                                                    computed_group_sizze_201750);\n         i_225634++) {\n        int64_t tmp_225635;\n        \n        tmp_225635 = ((__local int64_t *) color_225024)[i_225634 *\n                                                        computed_group_sizze_201750 +\n                                                        sext_i32_i64(local_tid_225613)];\n        ((__global int64_t *) mem_222377)[gtid_201762 * (s_n_m_196745 *\n                                                         n_p_196694) +\n                                          gtid_201763 * s_n_m_196745 +\n                                          (i_225634 *\n                                           computed_group_sizze_201750 +\n                                           sext_i32_i64(local_tid_225613))] =\n            tmp_225635;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225636 = 0; i_225636 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225613),\n                                                    computed_group_sizze_201750);\n         i_225636++) {\n        float tmp_225637;\n        \n        tmp_225637 = ((__local float *) color_225025)[i_225636 *\n                                                      computed_group_sizze_201750 +\n                                                      sext_i32_i64(local_tid_225613)];\n        ((__global float *) mem_222382)[gtid_201762 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_201763 *",
                   " s_n_m_196745 + (i_225636 *\n                                                                      computed_group_sizze_201750 +\n                                                                      sext_i32_i64(local_tid_225613))] =\n            tmp_225637;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_202165(__global int *global_failure,\n                                             int failure_is_an_option, __global\n                                             int64_t *global_failure_args,\n                                             __local volatile\n                                             int64_t *color_225029_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225028_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225027_backing_aligned_2,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_l_196697,\n                                             int64_t jump_l_196703,\n                                             int64_t l_n_m_196752,\n                                             int64_t i_196779,\n                                             unsigned char x_196780_bits,\n                                             int64_t min_res_196994,\n                                             unsigned char loop_cond_196999_bits,\n                                             float i64_res_197000,\n                                             int64_t computed_group_sizze_202056,\n                                             __global\n                                             unsigned char *ext_mem_222256,\n                                             __global\n                                             unsigned char *ext_mem_222257,\n                     ",
                   "                        __global unsigned char *mem_222436,\n                                             __global unsigned char *mem_222440)\n{\n    bool x_196780 = x_196780_bits;\n    bool loop_cond_196999 = loop_cond_196999_bits;\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225029_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225029_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225028_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225028_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225027_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225027_backing_aligned_2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_225681;\n    int32_t local_tid_225682;\n    int64_t group_sizze_225685;\n    int32_t wave_sizze_225684;\n    int32_t group_tid_225683;\n    \n    global_tid_225681 = get_global_id(0);\n    local_tid_225682 = get_local_id(0);\n    group_sizze_225685 = get_local_size(0);\n    wave_sizze_225684 = LOCKSTEP_WIDTH;\n    group_tid_225683 = get_group_id(0);\n    \n    int32_t phys_tid_202165 = group_tid_225683;\n    int64_t slice_225687 = n_196692;\n    int64_t ltid_pre_225686 = sext_i32_i64(local_tid_225682);\n    int64_t remnant_225688 = sext_i32_i64(local_tid_225682) - ltid_pre_225686;\n    int64_t slice_225690 = l_n_m_196752;\n    int64_t ltid_pre_225689 = sext_i32_i64(local_tid_225682);\n    int64_t remnant_225691 = sext_i32_i64(local_tid_225682) - ltid_pre_225689;\n    int64_t slice_225692 = m_196691;\n",
                   "    int64_t gtid_202164 = sext_i32_i64(group_tid_225683);\n    int64_t remnant_225693 = sext_i32_i64(group_tid_225683) - gtid_202164;\n    __local unsigned char *color_225027;\n    \n    color_225027 = (__local unsigned char *) color_225027_backing_0;\n    \n    __local unsigned char *color_225028;\n    \n    color_225028 = (__local unsigned char *) color_225028_backing_1;\n    \n    __local unsigned char *color_225029;\n    \n    color_225029 = (__local unsigned char *) color_225029_backing_2;\n    \n    int64_t x_202168;\n    \n    x_202168 = ((__global int64_t *) ext_mem_222256)[gtid_202164];\n    \n    int64_t gtid_202170 = sext_i32_i64(sext_i64_i32(ltid_pre_225686));\n    int32_t phys_tid_202171 = local_tid_225682;\n    \n    if (slt64(gtid_202170, n_196692)) {\n        int64_t x_202172;\n        \n        x_202172 = ((__global int64_t *) ext_mem_222257)[gtid_202164 *\n                                                         n_196692 +\n                                                         gtid_202170];\n        \n        int64_t defunc_0_f_res_202173 = add64((int64_t) 1, x_202172);\n        \n        ((__local int64_t *) color_225029)[gtid_202170] = defunc_0_f_res_202173;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t min_arg_202174 = sub64(x_202168, (int64_t) 1);\n    int64_t min_arg_202175 = sub64(x_202168, min_res_196994);\n    int64_t min_res_202176 = smin64(q_l_196697, x_202168);\n    float i64_res_202177 = sitofp_i64_f32(x_202168);\n    float x_202178 = i64_res_197000 - i64_res_202177;\n    float max_arg_202179 = x_202178 / 2.0F;\n    float max_res_202180 = fmax32(0.0F, max_arg_202179);\n    int64_t gtid_202183 = sext_i32_i64(sext_i64_i32(ltid_pre_225689));\n    int32_t phys_tid_202184 = local_tid_225682;\n    \n    if (slt64(gtid_202183, l_n_m_196752)) {\n        int64_t min_arg_202186 = mul64(jump_l_196703, gtid_202183);\n        int64_t min_res_202187 = smin64(i_196779, min_arg_202186);\n        int64_t defunc_0_g_res_202188 = add64((int64_t) 1, min_res_202187);\n        bool init_",
                   "idx_202189;\n        int64_t init_idx_202190;\n        int64_t init_idx_202191;\n        bool loop_while_202192;\n        int64_t low_202193;\n        int64_t high_202194;\n        \n        loop_while_202192 = x_196780;\n        low_202193 = (int64_t) 0;\n        high_202194 = i_196779;\n        while (loop_while_202192) {\n            int64_t x_202195 = add64(low_202193, high_202194);\n            int64_t mid_202196 = sdiv64(x_202195, (int64_t) 2);\n            bool x_202197 = sle64((int64_t) 0, mid_202196);\n            bool y_202198 = slt64(mid_202196, n_196692);\n            bool bounds_check_202199 = x_202197 && y_202198;\n            bool index_certs_202200;\n            \n            if (!bounds_check_202199) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 16) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_202196;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t mid_id_202201;\n            \n            mid_id_202201 = ((__local int64_t *) color_225029)[mid_202196];\n            \n            bool cond_202202 = slt64(mid_id_202201, (int64_t) 0);\n            int64_t mid_idx_202203;\n            \n            if (cond_202202) {\n                mid_idx_202203 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_202203 = mid_id_202201;\n            }\n            \n            bool cond_202204 = sle64(defunc_0_g_res_202188, mid_idx_202203);\n            int64_t loopres_202205;\n            int64_t loopres_202206;\n            \n            if (cond_202204) {\n                int64_t loopres_t_res_202207 = sub64(mid_202196, (int64_t) 1);\n                \n                loopres_202205 = low_202193;\n                loopres_202206 = loopres_t_res_202207;\n            } else {\n  ",
                   "              int64_t loopres_f_res_202208 = add64((int64_t) 1, mid_202196);\n                \n                loopres_202205 = loopres_f_res_202208;\n                loopres_202206 = high_202194;\n            }\n            \n            bool loop_cond_202209 = sle64(loopres_202205, loopres_202206);\n            bool loop_while_tmp_225694 = loop_cond_202209;\n            int64_t low_tmp_225695 = loopres_202205;\n            int64_t high_tmp_225696 = loopres_202206;\n            \n            loop_while_202192 = loop_while_tmp_225694;\n            low_202193 = low_tmp_225695;\n            high_202194 = high_tmp_225696;\n        }\n        init_idx_202189 = loop_while_202192;\n        init_idx_202190 = low_202193;\n        init_idx_202191 = high_202194;\n        \n        bool idx_202210;\n        int64_t idx_202211;\n        int64_t idx_202212;\n        int64_t idx_202213;\n        bool loop_while_202214;\n        int64_t l_idx_202215;\n        int64_t r_idx_202216;\n        int64_t span_202217;\n        \n        loop_while_202214 = loop_cond_196999;\n        l_idx_202215 = init_idx_202190;\n        r_idx_202216 = init_idx_202190;\n        span_202217 = (int64_t) 1;\n        while (loop_while_202214) {\n            int64_t max_arg_202218 = sub64(l_idx_202215, (int64_t) 1);\n            int64_t max_res_202219 = smax64((int64_t) 0, max_arg_202218);\n            int64_t min_arg_202220 = add64((int64_t) 1, r_idx_202216);\n            int64_t min_res_202221 = smin64(min_arg_202174, min_arg_202220);\n            bool x_202222 = sle64((int64_t) 0, max_res_202219);\n            bool y_202223 = slt64(max_res_202219, n_196692);\n            bool bounds_check_202224 = x_202222 && y_202223;\n            bool index_certs_202225;\n            \n            if (!bounds_check_202224) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 17) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_202219;\n                        global_failure_",
                   "args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_202226;\n            \n            x_202226 = ((__local int64_t *) color_225029)[max_res_202219];\n            \n            int64_t abs_arg_202227 = sub64(x_202226, defunc_0_g_res_202188);\n            int64_t abs_res_202228 = abs64(abs_arg_202227);\n            bool x_202229 = sle64((int64_t) 0, min_res_202221);\n            bool y_202230 = slt64(min_res_202221, n_196692);\n            bool bounds_check_202231 = x_202229 && y_202230;\n            bool index_certs_202232;\n            \n            if (!bounds_check_202231) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 18) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_202221;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_202233;\n            \n            x_202233 = ((__local int64_t *) color_225029)[min_res_202221];\n            \n            int64_t abs_arg_202234 = sub64(x_202233, defunc_0_g_res_202188);\n            int64_t abs_res_202235 = abs64(abs_arg_202234);\n            bool cond_202236 = max_res_202219 == l_idx_202215;\n            int64_t loopres_202237;\n            int64_t loopres_202238;\n            int64_t loopres_202239;\n            \n            if (cond_202236) {\n                loopres_202237 = l_idx_202215;\n                loopres_202238 = r_idx_202216;\n                loopres_202239 = min_res_196994;\n            } else {\n                bool cond_202240 = slt64(abs_res_202228, abs_res_202235);\n                bool cond_f_res_202241 = min_res_202221 == r_idx_202216;\n                bool x_20",
                   "2242 = !cond_202240;\n                bool y_202243 = cond_f_res_202241 && x_202242;\n                bool cond_202244 = cond_202240 || y_202243;\n                int64_t loopres_f_res_202245;\n                \n                if (cond_202244) {\n                    loopres_f_res_202245 = max_res_202219;\n                } else {\n                    loopres_f_res_202245 = l_idx_202215;\n                }\n                \n                int64_t loopres_f_res_202246;\n                \n                if (cond_202244) {\n                    loopres_f_res_202246 = r_idx_202216;\n                } else {\n                    loopres_f_res_202246 = min_res_202221;\n                }\n                \n                int64_t loopres_f_res_202247;\n                \n                if (cond_202244) {\n                    int64_t loopres_f_res_t_res_202248 = add64((int64_t) 1,\n                                                               span_202217);\n                    \n                    loopres_f_res_202247 = loopres_f_res_t_res_202248;\n                } else {\n                    int64_t loopres_f_res_f_res_202249 = add64((int64_t) 1,\n                                                               span_202217);\n                    \n                    loopres_f_res_202247 = loopres_f_res_f_res_202249;\n                }\n                loopres_202237 = loopres_f_res_202245;\n                loopres_202238 = loopres_f_res_202246;\n                loopres_202239 = loopres_f_res_202247;\n            }\n            \n            bool loop_cond_202250 = slt64(loopres_202239, min_res_196994);\n            bool loop_while_tmp_225697 = loop_cond_202250;\n            int64_t l_idx_tmp_225698 = loopres_202237;\n            int64_t r_idx_tmp_225699 = loopres_202238;\n            int64_t span_tmp_225700 = loopres_202239;\n            \n            loop_while_202214 = loop_while_tmp_225697;\n            l_idx_202215 = l_idx_tmp_225698;\n            r_idx_202216 = r_idx_tmp_225699;\n            span_202217 = spa",
                   "n_tmp_225700;\n        }\n        idx_202210 = loop_while_202214;\n        idx_202211 = l_idx_202215;\n        idx_202212 = r_idx_202216;\n        idx_202213 = span_202217;\n        \n        int64_t min_res_202251 = smin64(min_arg_202175, idx_202211);\n        int64_t max_res_202252 = smax64((int64_t) 0, min_res_202251);\n        int64_t x_202253 = add64(min_res_202176, max_res_202252);\n        int64_t r_202254 = sub64(x_202253, (int64_t) 1);\n        bool x_202255 = sle64((int64_t) 0, r_202254);\n        bool y_202256 = slt64(r_202254, n_196692);\n        bool bounds_check_202257 = x_202255 && y_202256;\n        bool index_certs_202258;\n        \n        if (!bounds_check_202257) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 19) == -1) {\n                    global_failure_args[0] = (int64_t) r_202254;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_202259;\n        \n        x_202259 = ((__global int64_t *) ext_mem_222257)[gtid_202164 *\n                                                         n_196692 + r_202254];\n        \n        int64_t abs_arg_202260 = sub64(x_202259, min_res_202187);\n        int64_t abs_res_202261 = abs64(abs_arg_202260);\n        bool x_202262 = sle64((int64_t) 0, max_res_202252);\n        bool y_202263 = slt64(max_res_202252, n_196692);\n        bool bounds_check_202264 = x_202262 && y_202263;\n        bool index_certs_202265;\n        \n        if (!bounds_check_202264) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 20) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_202252;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_2",
                   "02266;\n        \n        x_202266 = ((__global int64_t *) ext_mem_222257)[gtid_202164 *\n                                                         n_196692 +\n                                                         max_res_202252];\n        \n        int64_t abs_arg_202267 = sub64(x_202266, min_res_202187);\n        int64_t abs_res_202268 = abs64(abs_arg_202267);\n        int64_t max_res_202269 = smax64(abs_res_202261, abs_res_202268);\n        float defunc_0_f_res_202270 = sitofp_i64_f32(max_res_202269);\n        float defunc_1_f_res_202271 = max_res_202180 + defunc_0_f_res_202270;\n        \n        ((__local float *) color_225028)[gtid_202183] = defunc_1_f_res_202271;\n        ((__local int64_t *) color_225027)[gtid_202183] = max_res_202252;\n    }\n    \n  error_1:\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_failure)\n        return;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225701 = 0; i_225701 < sdiv_up64(l_n_m_196752 -\n                                                    sext_i32_i64(local_tid_225682),\n                                                    computed_group_sizze_202056);\n         i_225701++) {\n        int64_t tmp_225702;\n        \n        tmp_225702 = ((__local int64_t *) color_225027)[i_225701 *\n                                                        computed_group_sizze_202056 +\n                                                        sext_i32_i64(local_tid_225682)];\n        ((__global int64_t *) mem_222436)[gtid_202164 * l_n_m_196752 +\n                                          (i_225701 *\n                                           computed_group_sizze_202056 +\n                                           sext_i32_i64(local_tid_225682))] =\n            tmp_225702;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225703 = 0; i_225703 < sdiv_up64(l_n_m_196752 -\n                                                    sext_i32_i64(local_tid_225682),\n                                                    computed_group_sizze_202056);\n         i_225703++)",
                   " {\n        float tmp_225704;\n        \n        tmp_225704 = ((__local float *) color_225028)[i_225703 *\n                                                      computed_group_sizze_202056 +\n                                                      sext_i32_i64(local_tid_225682)];\n        ((__global float *) mem_222440)[gtid_202164 * l_n_m_196752 + (i_225703 *\n                                                                      computed_group_sizze_202056 +\n                                                                      sext_i32_i64(local_tid_225682))] =\n            tmp_225704;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_202791(__global int *global_failure,\n                                             int failure_is_an_option, __global\n                                             int64_t *global_failure_args,\n                                             __local volatile\n                                             int64_t *color_225032_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225031_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225030_backing_aligned_2,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_t_196696,\n                                             int64_t jump_t_196702,\n                                             int64_t t_n_m_196759,\n                                             int64_t i_196779,\n                                             unsigned char x_196780_bits,\n                                             int64_t min_res_197106,\n                                             unsigned char loop_cond_197111_bits,\n                                             float i64_res_197112,\n                                    ",
                   "         int64_t computed_group_sizze_202682,\n                                             __global\n                                             unsigned char *ext_mem_222256,\n                                             __global\n                                             unsigned char *ext_mem_222257,\n                                             __global unsigned char *mem_222485,\n                                             __global unsigned char *mem_222489)\n{\n    bool x_196780 = x_196780_bits;\n    bool loop_cond_197111 = loop_cond_197111_bits;\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225032_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225032_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225031_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225031_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225030_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225030_backing_aligned_2;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_225741;\n    int32_t local_tid_225742;\n    int64_t group_sizze_225745;\n    int32_t wave_sizze_225744;\n    int32_t group_tid_225743;\n    \n    global_tid_225741 = get_global_id(0);\n    local_tid_225742 = get_local_id(0);\n    group_sizze_225745 = get_local_size(0);\n    wave_sizze_225744 = LOCKSTEP_WIDTH;\n    group_tid_225743 = get_group_id(0);\n    \n    int32_t phys_tid_202791 = group_tid_225743;\n    int64_t slice_225747 = n_196692;\n    int64_t ltid_pre_225746 = sex",
                   "t_i32_i64(local_tid_225742);\n    int64_t remnant_225748 = sext_i32_i64(local_tid_225742) - ltid_pre_225746;\n    int64_t slice_225750 = t_n_m_196759;\n    int64_t ltid_pre_225749 = sext_i32_i64(local_tid_225742);\n    int64_t remnant_225751 = sext_i32_i64(local_tid_225742) - ltid_pre_225749;\n    int64_t slice_225752 = m_196691;\n    int64_t gtid_202790 = sext_i32_i64(group_tid_225743);\n    int64_t remnant_225753 = sext_i32_i64(group_tid_225743) - gtid_202790;\n    __local unsigned char *color_225030;\n    \n    color_225030 = (__local unsigned char *) color_225030_backing_0;\n    \n    __local unsigned char *color_225031;\n    \n    color_225031 = (__local unsigned char *) color_225031_backing_1;\n    \n    __local unsigned char *color_225032;\n    \n    color_225032 = (__local unsigned char *) color_225032_backing_2;\n    \n    int64_t x_202794;\n    \n    x_202794 = ((__global int64_t *) ext_mem_222256)[gtid_202790];\n    \n    int64_t gtid_202796 = sext_i32_i64(sext_i64_i32(ltid_pre_225746));\n    int32_t phys_tid_202797 = local_tid_225742;\n    \n    if (slt64(gtid_202796, n_196692)) {\n        int64_t x_202798;\n        \n        x_202798 = ((__global int64_t *) ext_mem_222257)[gtid_202790 *\n                                                         n_196692 +\n                                                         gtid_202796];\n        \n        int64_t defunc_0_f_res_202799 = add64((int64_t) 1, x_202798);\n        \n        ((__local int64_t *) color_225032)[gtid_202796] = defunc_0_f_res_202799;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t min_arg_202800 = sub64(x_202794, (int64_t) 1);\n    int64_t min_arg_202801 = sub64(x_202794, min_res_197106);\n    int64_t min_res_202802 = smin64(q_t_196696, x_202794);\n    float i64_res_202803 = sitofp_i64_f32(x_202794);\n    float x_202804 = i64_res_197112 - i64_res_202803;\n    float max_arg_202805 = x_202804 / 2.0F;\n    float max_res_202806 = fmax32(0.0F, max_arg_202805);\n    int64_t gtid_202809 = sext_i32_i64(sext_i64_i32(ltid_pre_225749));",
                   "\n    int32_t phys_tid_202810 = local_tid_225742;\n    \n    if (slt64(gtid_202809, t_n_m_196759)) {\n        int64_t min_arg_202812 = mul64(jump_t_196702, gtid_202809);\n        int64_t min_res_202813 = smin64(i_196779, min_arg_202812);\n        int64_t defunc_0_g_res_202814 = add64((int64_t) 1, min_res_202813);\n        bool init_idx_202815;\n        int64_t init_idx_202816;\n        int64_t init_idx_202817;\n        bool loop_while_202818;\n        int64_t low_202819;\n        int64_t high_202820;\n        \n        loop_while_202818 = x_196780;\n        low_202819 = (int64_t) 0;\n        high_202820 = i_196779;\n        while (loop_while_202818) {\n            int64_t x_202821 = add64(low_202819, high_202820);\n            int64_t mid_202822 = sdiv64(x_202821, (int64_t) 2);\n            bool x_202823 = sle64((int64_t) 0, mid_202822);\n            bool y_202824 = slt64(mid_202822, n_196692);\n            bool bounds_check_202825 = x_202823 && y_202824;\n            bool index_certs_202826;\n            \n            if (!bounds_check_202825) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 26) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) mid_202822;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t mid_id_202827;\n            \n            mid_id_202827 = ((__local int64_t *) color_225032)[mid_202822];\n            \n            bool cond_202828 = slt64(mid_id_202827, (int64_t) 0);\n            int64_t mid_idx_202829;\n            \n            if (cond_202828) {\n                mid_idx_202829 = (int64_t) 9223372036854775807;\n            } else {\n                mid_idx_202829 = mid_id_202827;\n            }\n            \n            bool cond_202830 = sle64(defunc_0_g_res_202814, mid_idx_202829);\n        ",
                   "    int64_t loopres_202831;\n            int64_t loopres_202832;\n            \n            if (cond_202830) {\n                int64_t loopres_t_res_202833 = sub64(mid_202822, (int64_t) 1);\n                \n                loopres_202831 = low_202819;\n                loopres_202832 = loopres_t_res_202833;\n            } else {\n                int64_t loopres_f_res_202834 = add64((int64_t) 1, mid_202822);\n                \n                loopres_202831 = loopres_f_res_202834;\n                loopres_202832 = high_202820;\n            }\n            \n            bool loop_cond_202835 = sle64(loopres_202831, loopres_202832);\n            bool loop_while_tmp_225754 = loop_cond_202835;\n            int64_t low_tmp_225755 = loopres_202831;\n            int64_t high_tmp_225756 = loopres_202832;\n            \n            loop_while_202818 = loop_while_tmp_225754;\n            low_202819 = low_tmp_225755;\n            high_202820 = high_tmp_225756;\n        }\n        init_idx_202815 = loop_while_202818;\n        init_idx_202816 = low_202819;\n        init_idx_202817 = high_202820;\n        \n        bool idx_202836;\n        int64_t idx_202837;\n        int64_t idx_202838;\n        int64_t idx_202839;\n        bool loop_while_202840;\n        int64_t l_idx_202841;\n        int64_t r_idx_202842;\n        int64_t span_202843;\n        \n        loop_while_202840 = loop_cond_197111;\n        l_idx_202841 = init_idx_202816;\n        r_idx_202842 = init_idx_202816;\n        span_202843 = (int64_t) 1;\n        while (loop_while_202840) {\n            int64_t max_arg_202844 = sub64(l_idx_202841, (int64_t) 1);\n            int64_t max_res_202845 = smax64((int64_t) 0, max_arg_202844);\n            int64_t min_arg_202846 = add64((int64_t) 1, r_idx_202842);\n            int64_t min_res_202847 = smin64(min_arg_202800, min_arg_202846);\n            bool x_202848 = sle64((int64_t) 0, max_res_202845);\n            bool y_202849 = slt64(max_res_202845, n_196692);\n            bool bounds_check_202850 = x_202848 && y_202849;\n  ",
                   "          bool index_certs_202851;\n            \n            if (!bounds_check_202850) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 27) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) max_res_202845;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_202852;\n            \n            x_202852 = ((__local int64_t *) color_225032)[max_res_202845];\n            \n            int64_t abs_arg_202853 = sub64(x_202852, defunc_0_g_res_202814);\n            int64_t abs_res_202854 = abs64(abs_arg_202853);\n            bool x_202855 = sle64((int64_t) 0, min_res_202847);\n            bool y_202856 = slt64(min_res_202847, n_196692);\n            bool bounds_check_202857 = x_202855 && y_202856;\n            bool index_certs_202858;\n            \n            if (!bounds_check_202857) {\n                {\n                    if (atomic_cmpxchg_i32_global(global_failure, -1, 28) ==\n                        -1) {\n                        global_failure_args[0] = (int64_t) min_res_202847;\n                        global_failure_args[1] = (int64_t) n_196692;\n                        ;\n                    }\n                    local_failure = true;\n                    goto error_1;\n                }\n            }\n            \n            int64_t x_202859;\n            \n            x_202859 = ((__local int64_t *) color_225032)[min_res_202847];\n            \n            int64_t abs_arg_202860 = sub64(x_202859, defunc_0_g_res_202814);\n            int64_t abs_res_202861 = abs64(abs_arg_202860);\n            bool cond_202862 = max_res_202845 == l_idx_202841;\n            int64_t loopres_202863;\n            int64_t loopres_202864;\n            int64_t loopres_202865;\n            \n            if (cond_202862) {\n         ",
                   "       loopres_202863 = l_idx_202841;\n                loopres_202864 = r_idx_202842;\n                loopres_202865 = min_res_197106;\n            } else {\n                bool cond_202866 = slt64(abs_res_202854, abs_res_202861);\n                bool cond_f_res_202867 = min_res_202847 == r_idx_202842;\n                bool x_202868 = !cond_202866;\n                bool y_202869 = cond_f_res_202867 && x_202868;\n                bool cond_202870 = cond_202866 || y_202869;\n                int64_t loopres_f_res_202871;\n                \n                if (cond_202870) {\n                    loopres_f_res_202871 = max_res_202845;\n                } else {\n                    loopres_f_res_202871 = l_idx_202841;\n                }\n                \n                int64_t loopres_f_res_202872;\n                \n                if (cond_202870) {\n                    loopres_f_res_202872 = r_idx_202842;\n                } else {\n                    loopres_f_res_202872 = min_res_202847;\n                }\n                \n                int64_t loopres_f_res_202873;\n                \n                if (cond_202870) {\n                    int64_t loopres_f_res_t_res_202874 = add64((int64_t) 1,\n                                                               span_202843);\n                    \n                    loopres_f_res_202873 = loopres_f_res_t_res_202874;\n                } else {\n                    int64_t loopres_f_res_f_res_202875 = add64((int64_t) 1,\n                                                               span_202843);\n                    \n                    loopres_f_res_202873 = loopres_f_res_f_res_202875;\n                }\n                loopres_202863 = loopres_f_res_202871;\n                loopres_202864 = loopres_f_res_202872;\n                loopres_202865 = loopres_f_res_202873;\n            }\n            \n            bool loop_cond_202876 = slt64(loopres_202865, min_res_197106);\n            bool loop_while_tmp_225757 = loop_cond_202876;\n            int64_t l_id",
                   "x_tmp_225758 = loopres_202863;\n            int64_t r_idx_tmp_225759 = loopres_202864;\n            int64_t span_tmp_225760 = loopres_202865;\n            \n            loop_while_202840 = loop_while_tmp_225757;\n            l_idx_202841 = l_idx_tmp_225758;\n            r_idx_202842 = r_idx_tmp_225759;\n            span_202843 = span_tmp_225760;\n        }\n        idx_202836 = loop_while_202840;\n        idx_202837 = l_idx_202841;\n        idx_202838 = r_idx_202842;\n        idx_202839 = span_202843;\n        \n        int64_t min_res_202877 = smin64(min_arg_202801, idx_202837);\n        int64_t max_res_202878 = smax64((int64_t) 0, min_res_202877);\n        int64_t x_202879 = add64(min_res_202802, max_res_202878);\n        int64_t r_202880 = sub64(x_202879, (int64_t) 1);\n        bool x_202881 = sle64((int64_t) 0, r_202880);\n        bool y_202882 = slt64(r_202880, n_196692);\n        bool bounds_check_202883 = x_202881 && y_202882;\n        bool index_certs_202884;\n        \n        if (!bounds_check_202883) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 29) == -1) {\n                    global_failure_args[0] = (int64_t) r_202880;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_202885;\n        \n        x_202885 = ((__global int64_t *) ext_mem_222257)[gtid_202790 *\n                                                         n_196692 + r_202880];\n        \n        int64_t abs_arg_202886 = sub64(x_202885, min_res_202813);\n        int64_t abs_res_202887 = abs64(abs_arg_202886);\n        bool x_202888 = sle64((int64_t) 0, max_res_202878);\n        bool y_202889 = slt64(max_res_202878, n_196692);\n        bool bounds_check_202890 = x_202888 && y_202889;\n        bool index_certs_202891;\n        \n        if (!bounds_check_202890) {\n            {\n                if (atomic_cmpxchg_i32_global(gl",
                   "obal_failure, -1, 30) == -1) {\n                    global_failure_args[0] = (int64_t) max_res_202878;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        int64_t x_202892;\n        \n        x_202892 = ((__global int64_t *) ext_mem_222257)[gtid_202790 *\n                                                         n_196692 +\n                                                         max_res_202878];\n        \n        int64_t abs_arg_202893 = sub64(x_202892, min_res_202813);\n        int64_t abs_res_202894 = abs64(abs_arg_202893);\n        int64_t max_res_202895 = smax64(abs_res_202887, abs_res_202894);\n        float defunc_0_f_res_202896 = sitofp_i64_f32(max_res_202895);\n        float defunc_1_f_res_202897 = max_res_202806 + defunc_0_f_res_202896;\n        \n        ((__local float *) color_225031)[gtid_202809] = defunc_1_f_res_202897;\n        ((__local int64_t *) color_225030)[gtid_202809] = max_res_202878;\n    }\n    \n  error_1:\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_failure)\n        return;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225761 = 0; i_225761 < sdiv_up64(t_n_m_196759 -\n                                                    sext_i32_i64(local_tid_225742),\n                                                    computed_group_sizze_202682);\n         i_225761++) {\n        int64_t tmp_225762;\n        \n        tmp_225762 = ((__local int64_t *) color_225030)[i_225761 *\n                                                        computed_group_sizze_202682 +\n                                                        sext_i32_i64(local_tid_225742)];\n        ((__global int64_t *) mem_222485)[gtid_202790 * t_n_m_196759 +\n                                          (i_225761 *\n                                           computed_group_sizze_202682 +\n                                           sext_i32_i64(local_tid_22",
                   "5742))] =\n            tmp_225762;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225763 = 0; i_225763 < sdiv_up64(t_n_m_196759 -\n                                                    sext_i32_i64(local_tid_225742),\n                                                    computed_group_sizze_202682);\n         i_225763++) {\n        float tmp_225764;\n        \n        tmp_225764 = ((__local float *) color_225031)[i_225763 *\n                                                      computed_group_sizze_202682 +\n                                                      sext_i32_i64(local_tid_225742)];\n        ((__global float *) mem_222489)[gtid_202790 * t_n_m_196759 + (i_225763 *\n                                                                      computed_group_sizze_202682 +\n                                                                      sext_i32_i64(local_tid_225742))] =\n            tmp_225764;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_204851(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_225938_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_225920_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225038_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *color_225037_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *color_225036_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225035_backing_aligned_5,\n                                            ",
                   " int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745,\n                                             int64_t computed_group_sizze_204753,\n                                             __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n                                             unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_222732)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_225938_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_225938_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_225920_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_225920_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225038_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225038_b",
                   "acking_aligned_2;\n    __local volatile unsigned char *restrict color_225037_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225037_backing_aligned_3;\n    __local volatile unsigned char *restrict color_225036_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225036_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225035_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225035_backing_aligned_5;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225902;\n    int32_t local_tid_225903;\n    int64_t group_sizze_225906;\n    int32_t wave_sizze_225905;\n    int32_t group_tid_225904;\n    \n    global_tid_225902 = get_global_id(0);\n    local_tid_225903 = get_local_id(0);\n    group_sizze_225906 = get_local_size(0);\n    wave_sizze_225905 = LOCKSTEP_WIDTH;\n    group_tid_225904 = get_group_id(0);\n    \n    int32_t phys_tid_204851 = group_tid_225904;\n    int64_t slice_225908 = s_n_m_196745;\n    int64_t ltid_pre_225907 = sext_i32_i64(local_tid_225903);\n    int64_t remnant_225909 = sext_i32_i64(local_tid_225903) - ltid_pre_225907;\n    int64_t slice_225912 = q_s_196695;\n    int64_t slice_225913 = s_n_m_196745 * slice_225912;\n    int64_t ltid_pre_225910 = squot64(sext_i32_i64(local_tid_225903),\n                                      slice_225912);\n    int64_t remnant_225914 = sext_i32_i64(local_tid_225903) - ltid_pre_225910 *\n            slice_225912;\n    int64_t ltid_pre_225911 = remnant_225914;\n    int64_t remnant_225915 = remnant_225914 - ltid_pre_225911;\n    int64_t slice_225916 = n_p_196694;\n    int64_t slice_225917 = m_196691 * slice_225916;\n    int64_t gtid_204849 = squot64(sext_i32_i64(group_tid_225904), slice_225916);\n    int64_t remnant_225918 = sext_i32_i64(group_tid_225904) - gtid_204849 *\n            slice_225",
                   "916;\n    int64_t gtid_204850 = remnant_225918;\n    int64_t remnant_225919 = remnant_225918 - gtid_204850;\n    __local unsigned char *color_225035;\n    \n    color_225035 = (__local unsigned char *) color_225035_backing_0;\n    \n    __local unsigned char *color_225036;\n    \n    color_225036 = (__local unsigned char *) color_225036_backing_1;\n    \n    __local unsigned char *color_225037;\n    \n    color_225037 = (__local unsigned char *) color_225037_backing_2;\n    \n    __local unsigned char *color_225038;\n    \n    color_225038 = (__local unsigned char *) color_225038_backing_3;\n    \n    int64_t x_204858;\n    \n    x_204858 = ((__global int64_t *) ext_mem_222321)[gtid_204849 * n_p_196694 +\n                                                     gtid_204850];\n    \n    int64_t gtid_204865 = sext_i32_i64(sext_i64_i32(ltid_pre_225907));\n    int32_t phys_tid_204866 = local_tid_225903;\n    \n    if (slt64(gtid_204865, s_n_m_196745)) {\n        bool cond_204868 = gtid_204865 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_204869;\n        \n        if (cond_204868) {\n            defunc_0_m_fun_res_204869 = (int64_t) 0;\n        } else {\n            int64_t y_204870 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_204871 = gtid_204865 == y_204870;\n            int64_t defunc_0_m_fun_res_f_res_204872;\n            \n            if (cond_204871) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_204873 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_204872 =\n                    defunc_0_m_fun_res_f_res_t_res_204873;\n            } else {\n                int64_t x_204874 = sub64(gtid_204865, (int64_t) 1);\n                int64_t x_204875 = mul64(jump_s_196701, x_204874);\n                int64_t min_arg_204876 = add64((int64_t) 1, x_204875);\n                int64_t min_res_204877 = smin64(defunc_0_f_res_196740,\n                                                min_arg_204876);\n                \n           ",
                   "     defunc_0_m_fun_res_f_res_204872 = min_res_204877;\n            }\n            defunc_0_m_fun_res_204869 = defunc_0_m_fun_res_f_res_204872;\n        }\n        ((__local int64_t *) color_225036)[gtid_204865] =\n            defunc_0_m_fun_res_204869;\n        ((__local bool *) color_225038)[gtid_204865] = cond_204868;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_204879 = sext_i32_i64(sext_i64_i32(ltid_pre_225910));\n    int64_t gtid_204880 = sext_i32_i64(sext_i64_i32(ltid_pre_225911));\n    int32_t phys_tid_204881 = local_tid_225903;\n    __local unsigned char *red_arr_mem_225920;\n    \n    red_arr_mem_225920 = (__local unsigned char *) red_arr_mem_225920_backing_4;\n    if (slt64(gtid_204879, s_n_m_196745) && slt64(gtid_204880, q_s_196695)) {\n        int64_t x_204885;\n        \n        x_204885 = ((__global int64_t *) ext_mem_222420)[gtid_204849 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_204850 *\n                                                         s_n_m_196745 +\n                                                         gtid_204879];\n        \n        float x_204886;\n        \n        x_204886 = ((__global float *) ext_mem_222419)[gtid_204849 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_204850 *\n                                                       s_n_m_196745 +\n                                                       gtid_204879];\n        \n        int64_t defunc_0_m_fun_res_204887;\n        \n        defunc_0_m_fun_res_204887 = ((__local\n                                      int64_t *) color_225036)[gtid_204879];\n        \n        bool cond_204889 = sle64(x_204858, gtid_204880);\n        int64_t defunc_0_f_res_204890;\n        \n        if (co",
                   "nd_204889) {\n            defunc_0_f_res_204890 = (int64_t) 0;\n        } else {\n            int64_t i_204891 = add64(gtid_204880, x_204885);\n            int64_t defunc_0_add_arg_204892;\n            \n            defunc_0_add_arg_204892 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_204849 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_196694) +\n                                                                   gtid_204850 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_204891];\n            \n            int64_t defunc_1_add_res_204893 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_204892);\n            \n            defunc_0_f_res_204890 = defunc_1_add_res_204893;\n        }\n        \n        float defunc_0_f_res_204894;\n        \n        if (cond_204889) {\n            defunc_0_f_res_204894 = 0.0F;\n        } else {\n            int64_t i_204895 = add64(gtid_204880, x_204885);\n            float defunc_0_add_arg_204896;\n            \n            defunc_0_add_arg_204896 = ((__global\n                                        float *) mem_222588)[gtid_204849 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_204850 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_204895];\n            defunc_0_f_res_204894 = defunc_0_add_arg_204896;\n        }\n        \n        int64_t binop_p_204897 = sub64(defunc_0_f_res_204890,\n                                       defunc_0_m_fun_res_204887);\n        float defunc_0_",
                   "f_res_204898 = sitofp_i64_f32(binop_p_204897);\n        float abs_res_204899 = (float) fabs(defunc_0_f_res_204898);\n        float tmp1_204900 = abs_res_204899 / x_204886;\n        float x_204901 = tmp1_204900 * tmp1_204900;\n        float y_204902 = tmp1_204900 * x_204901;\n        float tmp2_204903 = 1.0F - y_204902;\n        float x_204904 = tmp2_204903 * tmp2_204903;\n        float tmp3_204905 = tmp2_204903 * x_204904;\n        float w_j_204906 = defunc_0_f_res_204894 * tmp3_204905;\n        \n        ((__local float *) red_arr_mem_225920)[gtid_204879 * q_s_196695 +\n                                               gtid_204880] = w_j_204906;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_225922 = s_n_m_196745 * q_s_196695;\n    float x_204882;\n    float x_204883;\n    float x_225924;\n    float x_225925;\n    bool ltid_in_bounds_225927 = slt64(sext_i32_i64(local_tid_225903),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_225928;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225927) {\n            x_204883 = ((volatile __local\n                         float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)];\n            if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) == 0) {\n                x_204882 = x_204883;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225928 = 1;\n        while (slt32(skip_threads_225928, 32)) {\n            bool thread_active_225929 = sle32(skip_threads_225928,\n                                              local_tid_225903 -\n                                              squot32(local_tid_225903, 32) *\n                                              32) && ltid_in_bounds_225927;\n            \n            if (thread_active_225929) {\n                // read operands\n                {\n                    x_204882 = ((volatile __local\n                                 float *) red_arr_mem_225920)[sex",
                   "t_i32_i64(local_tid_225903) -\n                                                              sext_i32_i64(skip_threads_225928)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225930 =\n                     slt64(srem64(sext_i32_i64(local_tid_225903), q_s_196695),\n                           sext_i32_i64(local_tid_225903) -\n                           sext_i32_i64(local_tid_225903 -\n                           skip_threads_225928));\n                \n                if (thread_active_225929 && inactive_225930) {\n                    x_204882 = x_204883;\n                }\n                if (thread_active_225929) {\n                    if (!inactive_225930) {\n                        float defunc_1_op_res_204884 = x_204882 + x_204883;\n                        \n                        x_204882 = defunc_1_op_res_204884;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_225905, skip_threads_225928)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225929) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)] =\n                        x_204882;\n                    x_204883 = x_204882;\n                }\n            }\n            if (sle32(wave_sizze_225905, skip_threads_225928)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225928 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) == 31 &&\n            ltid_in_bounds_225927) {\n            ((volatile __local\n              float *) red_arr_mem_225920)[sext_i32_i64(squot32(local_tid_225903,\n                                                                32))] =\n                x_204882;\n        }\n ",
                   "   }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225931;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225903, 32) == 0 && ltid_in_bounds_225927) {\n                x_225925 = ((volatile __local\n                             float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)];\n                if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) ==\n                    0) {\n                    x_225924 = x_225925;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225931 = 1;\n            while (slt32(skip_threads_225931, 32)) {\n                bool thread_active_225932 = sle32(skip_threads_225931,\n                                                  local_tid_225903 -\n                                                  squot32(local_tid_225903,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225903, 32) == 0 &&\n                      ltid_in_bounds_225927);\n                \n                if (thread_active_225932) {\n                    // read operands\n                    {\n                        x_225924 = ((volatile __local\n                                     float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903) -\n                                                                  sext_i32_i64(skip_threads_225931)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225933 =\n                         slt64(srem64(sext_i32_i64(local_tid_225903 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_225903 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225903 -\n                               ",
                   "              skip_threads_225931) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225932 && inactive_225933) {\n                        x_225924 = x_225925;\n                    }\n                    if (thread_active_225932) {\n                        if (!inactive_225933) {\n                            float defunc_1_op_res_225926 = x_225924 + x_225925;\n                            \n                            x_225924 = defunc_1_op_res_225926;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225905, skip_threads_225931)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225932) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)] =\n                            x_225924;\n                        x_225925 = x_225924;\n                    }\n                }\n                if (sle32(wave_sizze_225905, skip_threads_225931)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225931 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225934 = squot32(local_tid_225903, 32) == 0 ||\n         !ltid_in_bounds_225927;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225934) {\n                x_204883 = x_204882;\n                x_204882 = ((__local\n                             float *) red_arr_mem_225920)[sext_i32_i64(squot32(local_tid_225903,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225935 = slt64(srem64(sext_i32_i6",
                   "4(local_tid_225903),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_225903) -\n                                         sext_i32_i64(squot32(local_tid_225903,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225934) {\n                if (inactive_225935) {\n                    x_204882 = x_204883;\n                }\n            }\n            if (!no_carry_in_225934) {\n                if (!inactive_225935) {\n                    float defunc_1_op_res_204884 = x_204882 + x_204883;\n                    \n                    x_204882 = defunc_1_op_res_204884;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225934) {\n                ((__local\n                  float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)] =\n                    x_204882;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225903, 32) == 0 && ltid_in_bounds_225927) {\n            ((__local\n              float *) red_arr_mem_225920)[sext_i32_i64(local_tid_225903)] =\n                x_204883;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225936 = 0; i_225936 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225903),\n                                                    computed_group_sizze_204753);\n         i_225936++) {\n        float tmp_225937;\n        \n        tmp_225937 = ((__local float *) red_arr_mem_225920)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_225936 *\n                                                             computed_group_sizze_204753 +\n                                    ",
                   "                         sext_i32_i64(local_tid_225903)) *\n                                                            q_s_196695];\n        ((__local float *) color_225035)[i_225936 *\n                                         computed_group_sizze_204753 +\n                                         sext_i32_i64(local_tid_225903)] =\n            tmp_225937;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_204909 = sext_i32_i64(sext_i64_i32(ltid_pre_225907));\n    int32_t phys_tid_204910 = local_tid_225903;\n    \n    if (slt64(gtid_204909, s_n_m_196745)) {\n        bool index_primexp_221807 = gtid_204909 == (int64_t) 0;\n        float defunc_2_reduce_res_204913;\n        \n        defunc_2_reduce_res_204913 = ((__local\n                                       float *) color_225035)[gtid_204909];\n        \n        float a0_204914 = 1.0F / defunc_2_reduce_res_204913;\n        int64_t defunc_0_m_fun_res_204915;\n        \n        if (index_primexp_221807) {\n            defunc_0_m_fun_res_204915 = (int64_t) 0;\n        } else {\n            int64_t y_204916 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_204917 = gtid_204909 == y_204916;\n            int64_t defunc_0_m_fun_res_f_res_204918;\n            \n            if (cond_204917) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_204919 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_204918 =\n                    defunc_0_m_fun_res_f_res_t_res_204919;\n            } else {\n                int64_t x_204920 = sub64(gtid_204909, (int64_t) 1);\n                int64_t x_204921 = mul64(jump_s_196701, x_204920);\n                int64_t min_arg_204922 = add64((int64_t) 1, x_204921);\n                int64_t min_res_204923 = smin64(defunc_0_f_res_196740,\n                                                min_arg_204922);\n                \n                defunc_0_m_fun_res_f_res_204918 = min_res_204923;\n            }\n ",
                   "           defunc_0_m_fun_res_204915 = defunc_0_m_fun_res_f_res_204918;\n        }\n        ((__local float *) color_225037)[gtid_204909] = a0_204914;\n        ((__local int64_t *) color_225036)[gtid_204909] =\n            defunc_0_m_fun_res_204915;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_204925 = sext_i32_i64(sext_i64_i32(ltid_pre_225910));\n    int64_t gtid_204926 = sext_i32_i64(sext_i64_i32(ltid_pre_225911));\n    int32_t phys_tid_204927 = local_tid_225903;\n    __local unsigned char *red_arr_mem_225938;\n    \n    red_arr_mem_225938 = (__local unsigned char *) red_arr_mem_225938_backing_5;\n    if (slt64(gtid_204925, s_n_m_196745) && slt64(gtid_204926, q_s_196695)) {\n        int64_t x_204931;\n        \n        x_204931 = ((__global int64_t *) ext_mem_222420)[gtid_204849 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_204850 *\n                                                         s_n_m_196745 +\n                                                         gtid_204925];\n        \n        float x_204932;\n        \n        x_204932 = ((__global float *) ext_mem_222419)[gtid_204849 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_204850 *\n                                                       s_n_m_196745 +\n                                                       gtid_204925];\n        \n        float a0_204933;\n        \n        a0_204933 = ((__local float *) color_225037)[gtid_204925];\n        \n        int64_t defunc_0_m_fun_res_204934;\n        \n        defunc_0_m_fun_res_204934 = ((__local\n                                      int64_t *) color_225036)[gtid_204925];\n        \n        bool cond_204936 = sle64(x_204858, gtid_204926);\n        int64_t defunc_",
                   "0_f_res_204937;\n        \n        if (cond_204936) {\n            defunc_0_f_res_204937 = (int64_t) 0;\n        } else {\n            int64_t i_204938 = add64(gtid_204926, x_204931);\n            int64_t defunc_0_add_arg_204939;\n            \n            defunc_0_add_arg_204939 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_204849 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_196694) +\n                                                                   gtid_204850 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_204938];\n            \n            int64_t defunc_1_add_res_204940 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_204939);\n            \n            defunc_0_f_res_204937 = defunc_1_add_res_204940;\n        }\n        \n        float defunc_0_f_res_204941;\n        \n        if (cond_204936) {\n            defunc_0_f_res_204941 = 0.0F;\n        } else {\n            int64_t i_204942 = add64(gtid_204926, x_204931);\n            float defunc_0_add_arg_204943;\n            \n            defunc_0_add_arg_204943 = ((__global\n                                        float *) mem_222588)[gtid_204849 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_204850 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_204942];\n            defunc_0_f_res_204941 = defunc_0_add_arg_204943;\n        }\n        \n        int64_t binop_p_204944 = sub64(defunc_0_f_res_204937,\n                                       defunc_0_m_f",
                   "un_res_204934);\n        float defunc_0_f_res_204945 = sitofp_i64_f32(binop_p_204944);\n        float abs_res_204946 = (float) fabs(defunc_0_f_res_204945);\n        float tmp1_204947 = abs_res_204946 / x_204932;\n        float x_204948 = tmp1_204947 * tmp1_204947;\n        float y_204949 = tmp1_204947 * x_204948;\n        float tmp2_204950 = 1.0F - y_204949;\n        float x_204951 = tmp2_204950 * tmp2_204950;\n        float tmp3_204952 = tmp2_204950 * x_204951;\n        float tmp4_204953 = defunc_0_f_res_204941 * tmp3_204952;\n        float defunc_0_f_res_204954;\n        \n        if (cond_204936) {\n            defunc_0_f_res_204954 = 0.0F;\n        } else {\n            int64_t i_204955 = add64(gtid_204926, x_204931);\n            float defunc_0_add_arg_204956;\n            \n            defunc_0_add_arg_204956 = ((__global\n                                        float *) mem_222583)[gtid_204849 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_204850 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_204955];\n            defunc_0_f_res_204954 = defunc_0_add_arg_204956;\n        }\n        \n        float x_204957 = a0_204933 * tmp4_204953;\n        float defunc_9_fit_fun_res_204958 = defunc_0_f_res_204954 * x_204957;\n        \n        ((__local float *) red_arr_mem_225938)[gtid_204925 * q_s_196695 +\n                                               gtid_204926] =\n            defunc_9_fit_fun_res_204958;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_225940 = s_n_m_196745 * q_s_196695;\n    float x_204928;\n    float x_204929;\n    float x_225942;\n    float x_225943;\n    bool ltid_in_bounds_225945 = slt64(sext_i32_i64(local_tid_225903),\n                                       s_n_m_196745 * q_s_196",
                   "695);\n    int32_t skip_threads_225946;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_225945) {\n            x_204929 = ((volatile __local\n                         float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)];\n            if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) == 0) {\n                x_204928 = x_204929;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_225946 = 1;\n        while (slt32(skip_threads_225946, 32)) {\n            bool thread_active_225947 = sle32(skip_threads_225946,\n                                              local_tid_225903 -\n                                              squot32(local_tid_225903, 32) *\n                                              32) && ltid_in_bounds_225945;\n            \n            if (thread_active_225947) {\n                // read operands\n                {\n                    x_204928 = ((volatile __local\n                                 float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903) -\n                                                              sext_i32_i64(skip_threads_225946)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_225948 =\n                     slt64(srem64(sext_i32_i64(local_tid_225903), q_s_196695),\n                           sext_i32_i64(local_tid_225903) -\n                           sext_i32_i64(local_tid_225903 -\n                           skip_threads_225946));\n                \n                if (thread_active_225947 && inactive_225948) {\n                    x_204928 = x_204929;\n                }\n                if (thread_active_225947) {\n                    if (!inactive_225948) {\n                        float defunc_1_op_res_204930 = x_204928 + x_204929;\n                        \n                        x_204928 = defunc_1_op_res_204930;\n                    }\n                }\n            }\n            if (sle32",
                   "(wave_sizze_225905, skip_threads_225946)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_225947) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)] =\n                        x_204928;\n                    x_204929 = x_204928;\n                }\n            }\n            if (sle32(wave_sizze_225905, skip_threads_225946)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_225946 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) == 31 &&\n            ltid_in_bounds_225945) {\n            ((volatile __local\n              float *) red_arr_mem_225938)[sext_i32_i64(squot32(local_tid_225903,\n                                                                32))] =\n                x_204928;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_225949;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_225903, 32) == 0 && ltid_in_bounds_225945) {\n                x_225943 = ((volatile __local\n                             float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)];\n                if ((local_tid_225903 - squot32(local_tid_225903, 32) * 32) ==\n                    0) {\n                    x_225942 = x_225943;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_225949 = 1;\n            while (slt32(skip_threads_225949, 32)) {\n                bool thread_active_225950 = sle32(skip_threads_225949,\n                                                  local_tid_225903 -\n                              ",
                   "                    squot32(local_tid_225903,\n                                                          32) * 32) &&\n                     (squot32(local_tid_225903, 32) == 0 &&\n                      ltid_in_bounds_225945);\n                \n                if (thread_active_225950) {\n                    // read operands\n                    {\n                        x_225942 = ((volatile __local\n                                     float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903) -\n                                                                  sext_i32_i64(skip_threads_225949)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_225951 =\n                         slt64(srem64(sext_i32_i64(local_tid_225903 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_225903 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_225903 -\n                                             skip_threads_225949) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_225950 && inactive_225951) {\n                        x_225942 = x_225943;\n                    }\n                    if (thread_active_225950) {\n                        if (!inactive_225951) {\n                            float defunc_1_op_res_225944 = x_225942 + x_225943;\n                            \n                            x_225942 = defunc_1_op_res_225944;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_225905, skip_threads_225949)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_225950) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)] =\n             ",
                   "               x_225942;\n                        x_225943 = x_225942;\n                    }\n                }\n                if (sle32(wave_sizze_225905, skip_threads_225949)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_225949 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_225952 = squot32(local_tid_225903, 32) == 0 ||\n         !ltid_in_bounds_225945;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_225952) {\n                x_204929 = x_204928;\n                x_204928 = ((__local\n                             float *) red_arr_mem_225938)[sext_i32_i64(squot32(local_tid_225903,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_225953 = slt64(srem64(sext_i32_i64(local_tid_225903),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_225903) -\n                                         sext_i32_i64(squot32(local_tid_225903,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_225952) {\n                if (inactive_225953) {\n                    x_204928 = x_204929;\n                }\n            }\n            if (!no_carry_in_225952) {\n                if (!inactive_225953) {\n                    float defunc_1_op_res_204930 = x_204928 + x_204929;\n                    \n                    x_204928 = defunc_1_op_res_204930;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_225952) {\n                ((__local\n                  float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)] =\n                    x_2",
                   "04928;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_225903, 32) == 0 && ltid_in_bounds_225945) {\n            ((__local\n              float *) red_arr_mem_225938)[sext_i32_i64(local_tid_225903)] =\n                x_204929;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225954 = 0; i_225954 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225903),\n                                                    computed_group_sizze_204753);\n         i_225954++) {\n        float tmp_225955;\n        \n        tmp_225955 = ((__local float *) red_arr_mem_225938)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_225954 *\n                                                             computed_group_sizze_204753 +\n                                                             sext_i32_i64(local_tid_225903)) *\n                                                            q_s_196695];\n        ((__local float *) color_225035)[i_225954 *\n                                         computed_group_sizze_204753 +\n                                         sext_i32_i64(local_tid_225903)] =\n            tmp_225955;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_225956 = 0; i_225956 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_225903),\n                                                    computed_group_sizze_204753);\n         i_225956++) {\n        float tmp_225957;\n        \n        tmp_225957 = ((__local float *) color_225035)[i_225956 *\n                                                      computed_group_sizze_204753 +\n                                                      sext_i32_i64(local_tid_225903)];\n ",
                   "       ((__global float *) mem_222732)[gtid_204849 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_204850 * s_n_m_196745 + (i_225956 *\n                                                                      computed_group_sizze_204753 +\n                                                                      sext_i32_i64(local_tid_225903))] =\n            tmp_225957;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_6:\n    return;\n}\n__kernel void mainzisegmap_intragroup_206919(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226260_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226258_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226228_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226226_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226224_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225050_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *color_225049_backing_aligned_6,\n                                             __local volatile\n                                             int64_t *color_225048_backing_aligned_7,\n                                             __local volatile\n                                             int64_t *color_225047_backing_aligned_8,\n                                             ",
                   "__local volatile\n                                             int64_t *color_225046_backing_aligned_9,\n                                             __local volatile\n                                             int64_t *color_225045_backing_aligned_10,\n                                             __local volatile\n                                             int64_t *color_225044_backing_aligned_11,\n                                             __local volatile\n                                             int64_t *color_225043_backing_aligned_12,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745,\n                                             int64_t computed_group_sizze_206788,\n                                             __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n                                             unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_223008,\n                                             __global unsigned char *mem_223013)\n{\n    const int block_dim0 = 0;\n    const int b",
                   "lock_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226260_backing_12 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226260_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226258_backing_11 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226258_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226228_backing_10 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226228_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226226_backing_9 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226226_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_226224_backing_8 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226224_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225050_backing_7 =\n                                   (__local volatile\n                                    unsigned char *) color_225050_backing_aligned_5;\n    __local volatile unsigned char *restrict color_225049_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) color_225049_backing_aligned_6;\n    __local volatile unsigned char *restrict color_225048_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) color_225048_backing_aligned_7;\n    __local volatile unsigned char *restrict color_225047_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) color_225047_backing_aligned_8;\n    __local volatile",
                   " unsigned char *restrict color_225046_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225046_backing_aligned_9;\n    __local volatile unsigned char *restrict color_225045_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225045_backing_aligned_10;\n    __local volatile unsigned char *restrict color_225044_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225044_backing_aligned_11;\n    __local volatile unsigned char *restrict color_225043_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225043_backing_aligned_12;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226206;\n    int32_t local_tid_226207;\n    int64_t group_sizze_226210;\n    int32_t wave_sizze_226209;\n    int32_t group_tid_226208;\n    \n    global_tid_226206 = get_global_id(0);\n    local_tid_226207 = get_local_id(0);\n    group_sizze_226210 = get_local_size(0);\n    wave_sizze_226209 = LOCKSTEP_WIDTH;\n    group_tid_226208 = get_group_id(0);\n    \n    int32_t phys_tid_206919 = group_tid_226208;\n    int64_t slice_226212 = s_n_m_196745;\n    int64_t ltid_pre_226211 = sext_i32_i64(local_tid_226207);\n    int64_t remnant_226213 = sext_i32_i64(local_tid_226207) - ltid_pre_226211;\n    int64_t slice_226216 = q_s_196695;\n    int64_t slice_226217 = s_n_m_196745 * slice_226216;\n    int64_t ltid_pre_226214 = squot64(sext_i32_i64(local_tid_226207),\n                                      slice_226216);\n    int64_t remnant_226218 = sext_i32_i64(local_tid_226207) - ltid_pre_226214 *\n            slice_226216;\n    int64_t ltid_pre_226215 = remnant_226218;\n    int64_t remnant_226219 = remnant_226218 - ltid_pre_226215;\n    int64_t slice_226220 = n_p_196694;\n    int64_t slice_226221 = m_196691 * slice_226220;\n    i",
                   "nt64_t gtid_206917 = squot64(sext_i32_i64(group_tid_226208), slice_226220);\n    int64_t remnant_226222 = sext_i32_i64(group_tid_226208) - gtid_206917 *\n            slice_226220;\n    int64_t gtid_206918 = remnant_226222;\n    int64_t remnant_226223 = remnant_226222 - gtid_206918;\n    __local unsigned char *color_225043;\n    \n    color_225043 = (__local unsigned char *) color_225043_backing_0;\n    \n    __local unsigned char *color_225044;\n    \n    color_225044 = (__local unsigned char *) color_225044_backing_1;\n    \n    __local unsigned char *color_225045;\n    \n    color_225045 = (__local unsigned char *) color_225045_backing_2;\n    \n    __local unsigned char *color_225046;\n    \n    color_225046 = (__local unsigned char *) color_225046_backing_3;\n    \n    __local unsigned char *color_225047;\n    \n    color_225047 = (__local unsigned char *) color_225047_backing_4;\n    \n    __local unsigned char *color_225048;\n    \n    color_225048 = (__local unsigned char *) color_225048_backing_5;\n    \n    __local unsigned char *color_225049;\n    \n    color_225049 = (__local unsigned char *) color_225049_backing_6;\n    \n    __local unsigned char *color_225050;\n    \n    color_225050 = (__local unsigned char *) color_225050_backing_7;\n    \n    int64_t x_206926;\n    \n    x_206926 = ((__global int64_t *) ext_mem_222321)[gtid_206917 * n_p_196694 +\n                                                     gtid_206918];\n    \n    int64_t gtid_206933 = sext_i32_i64(sext_i64_i32(ltid_pre_226211));\n    int32_t phys_tid_206934 = local_tid_226207;\n    \n    if (slt64(gtid_206933, s_n_m_196745)) {\n        bool cond_206936 = gtid_206933 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_206937;\n        \n        if (cond_206936) {\n            defunc_0_m_fun_res_206937 = (int64_t) 0;\n        } else {\n            int64_t y_206938 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_206939 = gtid_206933 == y_206938;\n            int64_t defunc_0_m_fun_res_f_res_206940;\n            \n            if (cond_20",
                   "6939) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_206941 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_206940 =\n                    defunc_0_m_fun_res_f_res_t_res_206941;\n            } else {\n                int64_t x_206942 = sub64(gtid_206933, (int64_t) 1);\n                int64_t x_206943 = mul64(jump_s_196701, x_206942);\n                int64_t min_arg_206944 = add64((int64_t) 1, x_206943);\n                int64_t min_res_206945 = smin64(defunc_0_f_res_196740,\n                                                min_arg_206944);\n                \n                defunc_0_m_fun_res_f_res_206940 = min_res_206945;\n            }\n            defunc_0_m_fun_res_206937 = defunc_0_m_fun_res_f_res_206940;\n        }\n        ((__local int64_t *) color_225045)[gtid_206933] =\n            defunc_0_m_fun_res_206937;\n        ((__local bool *) color_225050)[gtid_206933] = cond_206936;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_206949 = sext_i32_i64(sext_i64_i32(ltid_pre_226214));\n    int64_t gtid_206950 = sext_i32_i64(sext_i64_i32(ltid_pre_226215));\n    int32_t phys_tid_206951 = local_tid_226207;\n    __local unsigned char *red_arr_mem_226224;\n    \n    red_arr_mem_226224 = (__local unsigned char *) red_arr_mem_226224_backing_8;\n    \n    __local unsigned char *red_arr_mem_226226;\n    \n    red_arr_mem_226226 = (__local unsigned char *) red_arr_mem_226226_backing_9;\n    \n    __local unsigned char *red_arr_mem_226228;\n    \n    red_arr_mem_226228 = (__local\n                          unsigned char *) red_arr_mem_226228_backing_10;\n    if (slt64(gtid_206949, s_n_m_196745) && slt64(gtid_206950, q_s_196695)) {\n        int64_t x_206961;\n        \n        x_206961 = ((__global int64_t *) ext_mem_222420)[gtid_206917 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                              ",
                   "                           gtid_206918 *\n                                                         s_n_m_196745 +\n                                                         gtid_206949];\n        \n        float x_206962;\n        \n        x_206962 = ((__global float *) ext_mem_222419)[gtid_206917 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_206918 *\n                                                       s_n_m_196745 +\n                                                       gtid_206949];\n        \n        int64_t defunc_0_m_fun_res_206963;\n        \n        defunc_0_m_fun_res_206963 = ((__local\n                                      int64_t *) color_225045)[gtid_206949];\n        \n        bool cond_206965 = sle64(x_206926, gtid_206950);\n        int64_t defunc_0_f_res_206966;\n        \n        if (cond_206965) {\n            defunc_0_f_res_206966 = (int64_t) 0;\n        } else {\n            int64_t i_206967 = add64(gtid_206950, x_206961);\n            int64_t defunc_0_add_arg_206968;\n            \n            defunc_0_add_arg_206968 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_206917 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_196694) +\n                                                                   gtid_206918 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_206967];\n            \n            int64_t defunc_1_add_res_206969 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_206968);\n            \n            defunc_0_f_res_206966 = defunc_1_add_res_206969;\n        }\n        \n        float defunc_0_f_res_206970;\n      ",
                   "  \n        if (cond_206965) {\n            defunc_0_f_res_206970 = 0.0F;\n        } else {\n            int64_t i_206971 = add64(gtid_206950, x_206961);\n            float defunc_0_add_arg_206972;\n            \n            defunc_0_add_arg_206972 = ((__global\n                                        float *) mem_222588)[gtid_206917 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_206918 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_206971];\n            defunc_0_f_res_206970 = defunc_0_add_arg_206972;\n        }\n        \n        int64_t binop_p_206973 = sub64(defunc_0_f_res_206966,\n                                       defunc_0_m_fun_res_206963);\n        float defunc_0_f_res_206974 = sitofp_i64_f32(binop_p_206973);\n        float abs_res_206975 = (float) fabs(defunc_0_f_res_206974);\n        float tmp1_206976 = abs_res_206975 / x_206962;\n        float x_206977 = tmp1_206976 * tmp1_206976;\n        float y_206978 = tmp1_206976 * x_206977;\n        float tmp2_206979 = 1.0F - y_206978;\n        float x_206980 = tmp2_206979 * tmp2_206979;\n        float tmp3_206981 = tmp2_206979 * x_206980;\n        float w_j_206982 = defunc_0_f_res_206970 * tmp3_206981;\n        float xw_j_206983 = defunc_0_f_res_206974 * w_j_206982;\n        float x2w_j_206984 = defunc_0_f_res_206974 * xw_j_206983;\n        \n        ((__local float *) red_arr_mem_226224)[gtid_206949 * q_s_196695 +\n                                               gtid_206950] = w_j_206982;\n        ((__local float *) red_arr_mem_226226)[gtid_206949 * q_s_196695 +\n                                               gtid_206950] = xw_j_206983;\n        ((__local float *) red_arr_mem_226228)[gtid_206949 * q_s_196695 +\n                                               gti",
                   "d_206950] = x2w_j_206984;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226230 = s_n_m_196745 * q_s_196695;\n    float x_206952;\n    float x_206953;\n    float x_206954;\n    float x_206955;\n    float x_206956;\n    float x_206957;\n    float x_226234;\n    float x_226235;\n    float x_226236;\n    float x_226237;\n    float x_226238;\n    float x_226239;\n    bool ltid_in_bounds_226243 = slt64(sext_i32_i64(local_tid_226207),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226244;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226243) {\n            x_206955 = ((volatile __local\n                         float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)];\n            x_206956 = ((volatile __local\n                         float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)];\n            x_206957 = ((volatile __local\n                         float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)];\n            if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) == 0) {\n                x_206952 = x_206955;\n                x_206953 = x_206956;\n                x_206954 = x_206957;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226244 = 1;\n        while (slt32(skip_threads_226244, 32)) {\n            bool thread_active_226245 = sle32(skip_threads_226244,\n                                              local_tid_226207 -\n                                              squot32(local_tid_226207, 32) *\n                                              32) && ltid_in_bounds_226243;\n            \n            if (thread_active_226245) {\n                // read operands\n                {\n                    x_206952 = ((volatile __local\n                                 float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207) -\n                                                              sext_i32_i64(skip_threads_22624",
                   "4)];\n                    x_206953 = ((volatile __local\n                                 float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207) -\n                                                              sext_i32_i64(skip_threads_226244)];\n                    x_206954 = ((volatile __local\n                                 float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207) -\n                                                              sext_i32_i64(skip_threads_226244)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226246 =\n                     slt64(srem64(sext_i32_i64(local_tid_226207), q_s_196695),\n                           sext_i32_i64(local_tid_226207) -\n                           sext_i32_i64(local_tid_226207 -\n                           skip_threads_226244));\n                \n                if (thread_active_226245 && inactive_226246) {\n                    x_206952 = x_206955;\n                    x_206953 = x_206956;\n                    x_206954 = x_206957;\n                }\n                if (thread_active_226245) {\n                    if (!inactive_226246) {\n                        float defunc_1_op_res_206958 = x_206952 + x_206955;\n                        float defunc_1_op_res_206959 = x_206953 + x_206956;\n                        float defunc_1_op_res_206960 = x_206954 + x_206957;\n                        \n                        x_206952 = defunc_1_op_res_206958;\n                        x_206953 = defunc_1_op_res_206959;\n                        x_206954 = defunc_1_op_res_206960;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_226209, skip_threads_226244)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226245) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)] =\n           ",
                   "             x_206952;\n                    x_206955 = x_206952;\n                    ((volatile __local\n                      float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)] =\n                        x_206953;\n                    x_206956 = x_206953;\n                    ((volatile __local\n                      float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)] =\n                        x_206954;\n                    x_206957 = x_206954;\n                }\n            }\n            if (sle32(wave_sizze_226209, skip_threads_226244)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226244 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) == 31 &&\n            ltid_in_bounds_226243) {\n            ((volatile __local\n              float *) red_arr_mem_226224)[sext_i32_i64(squot32(local_tid_226207,\n                                                                32))] =\n                x_206952;\n            ((volatile __local\n              float *) red_arr_mem_226226)[sext_i32_i64(squot32(local_tid_226207,\n                                                                32))] =\n                x_206953;\n            ((volatile __local\n              float *) red_arr_mem_226228)[sext_i32_i64(squot32(local_tid_226207,\n                                                                32))] =\n                x_206954;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_226247;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226207, 32) == 0 && ltid_in_bounds_226243) {\n                x_226237 = ((volatile __local\n                             float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)];\n                x_2262",
                   "38 = ((volatile __local\n                             float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)];\n                x_226239 = ((volatile __local\n                             float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)];\n                if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) ==\n                    0) {\n                    x_226234 = x_226237;\n                    x_226235 = x_226238;\n                    x_226236 = x_226239;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226247 = 1;\n            while (slt32(skip_threads_226247, 32)) {\n                bool thread_active_226248 = sle32(skip_threads_226247,\n                                                  local_tid_226207 -\n                                                  squot32(local_tid_226207,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226207, 32) == 0 &&\n                      ltid_in_bounds_226243);\n                \n                if (thread_active_226248) {\n                    // read operands\n                    {\n                        x_226234 = ((volatile __local\n                                     float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207) -\n                                                                  sext_i32_i64(skip_threads_226247)];\n                        x_226235 = ((volatile __local\n                                     float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207) -\n                                                                  sext_i32_i64(skip_threads_226247)];\n                        x_226236 = ((volatile __local\n                                     float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207) -\n                                                                  sext_i32_i64(skip_threads_226247)];\n                    }\n                }\n     ",
                   "           // perform operation\n                {\n                    bool inactive_226249 =\n                         slt64(srem64(sext_i32_i64(local_tid_226207 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226207 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226207 -\n                                             skip_threads_226247) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226248 && inactive_226249) {\n                        x_226234 = x_226237;\n                        x_226235 = x_226238;\n                        x_226236 = x_226239;\n                    }\n                    if (thread_active_226248) {\n                        if (!inactive_226249) {\n                            float defunc_1_op_res_226240 = x_226234 + x_226237;\n                            float defunc_1_op_res_226241 = x_226235 + x_226238;\n                            float defunc_1_op_res_226242 = x_226236 + x_226239;\n                            \n                            x_226234 = defunc_1_op_res_226240;\n                            x_226235 = defunc_1_op_res_226241;\n                            x_226236 = defunc_1_op_res_226242;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226209, skip_threads_226247)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226248) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)] =\n                            x_226234;\n                        x_226237 = x_226234;\n                        ((volatile __local\n                          float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)] =\n                            x_226235;\n                        x_2",
                   "26238 = x_226235;\n                        ((volatile __local\n                          float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)] =\n                            x_226236;\n                        x_226239 = x_226236;\n                    }\n                }\n                if (sle32(wave_sizze_226209, skip_threads_226247)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226247 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226250 = squot32(local_tid_226207, 32) == 0 ||\n         !ltid_in_bounds_226243;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226250) {\n                x_206955 = x_206952;\n                x_206956 = x_206953;\n                x_206957 = x_206954;\n                x_206952 = ((__local\n                             float *) red_arr_mem_226224)[sext_i32_i64(squot32(local_tid_226207,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_206953 = ((__local\n                             float *) red_arr_mem_226226)[sext_i32_i64(squot32(local_tid_226207,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_206954 = ((__local\n                             float *) red_arr_mem_226228)[sext_i32_i64(squot32(local_tid_226207,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226251 = slt64(srem64(sext_i32_i64(local_tid_226207),\n                                                q_s_196695),\n                                         sext_i32_i64",
                   "(local_tid_226207) -\n                                         sext_i32_i64(squot32(local_tid_226207,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226250) {\n                if (inactive_226251) {\n                    x_206952 = x_206955;\n                    x_206953 = x_206956;\n                    x_206954 = x_206957;\n                }\n            }\n            if (!no_carry_in_226250) {\n                if (!inactive_226251) {\n                    float defunc_1_op_res_206958 = x_206952 + x_206955;\n                    float defunc_1_op_res_206959 = x_206953 + x_206956;\n                    float defunc_1_op_res_206960 = x_206954 + x_206957;\n                    \n                    x_206952 = defunc_1_op_res_206958;\n                    x_206953 = defunc_1_op_res_206959;\n                    x_206954 = defunc_1_op_res_206960;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_226250) {\n                ((__local\n                  float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)] =\n                    x_206952;\n                ((__local\n                  float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)] =\n                    x_206953;\n                ((__local\n                  float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)] =\n                    x_206954;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_226207, 32) == 0 && ltid_in_bounds_226243) {\n            ((__local\n              float *) red_arr_mem_226224)[sext_i32_i64(local_tid_226207)] =\n                x_206955;\n            ((__local\n              float *) red_arr_mem_226226)[sext_i32_i64(local_tid_226207)] =\n                x_206956;\n            ((__local\n              float *) red_arr_mem_226228)[sext_i32_i64(local_tid_226207)] =\n                x_2069",
                   "57;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226252 = 0; i_226252 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226252++) {\n        float tmp_226253;\n        \n        tmp_226253 = ((__local float *) red_arr_mem_226224)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226252 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226207)) *\n                                                            q_s_196695];\n        ((__local float *) color_225049)[i_226252 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226207)] =\n            tmp_226253;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226254 = 0; i_226254 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226254++) {\n        float tmp_226255;\n        \n        tmp_226255 = ((__local float *) red_arr_mem_226226)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226254 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226207)) *\n                                                            q_s_196695];\n        ((__local float *) color_225044)[i_226254 *\n                                         computed_group_sizz",
                   "e_206788 +\n                                         sext_i32_i64(local_tid_226207)] =\n            tmp_226255;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226256 = 0; i_226256 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226256++) {\n        float tmp_226257;\n        \n        tmp_226257 = ((__local float *) red_arr_mem_226228)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226256 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226207)) *\n                                                            q_s_196695];\n        ((__local float *) color_225043)[i_226256 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226207)] =\n            tmp_226257;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_206989 = sext_i32_i64(sext_i64_i32(ltid_pre_226211));\n    int32_t phys_tid_206990 = local_tid_226207;\n    \n    if (slt64(gtid_206989, s_n_m_196745)) {\n        bool index_primexp_221813 = gtid_206989 == (int64_t) 0;\n        float defunc_2_reduce_res_206993;\n        \n        defunc_2_reduce_res_206993 = ((__local\n                                       float *) color_225049)[gtid_206989];\n        \n        float defunc_2_reduce_res_206994;\n        \n        defunc_2_reduce_res_206994 = ((__local\n                                       float *) color_225044)[gtid_206989];\n        \n        float defunc_2_reduce_res_206995;\n        \n        defunc_2_reduce_res_206995 = ((__local\n                                       float *) color_225043)[gtid_206989];\n        ",
                   "\n        float x_206996 = defunc_2_reduce_res_206993 *\n              defunc_2_reduce_res_206995;\n        float y_206997 = defunc_2_reduce_res_206994 *\n              defunc_2_reduce_res_206994;\n        float y_206998 = x_206996 - y_206997;\n        float det1_206999 = 1.0F / y_206998;\n        float a11_207000 = defunc_2_reduce_res_206995 * det1_206999;\n        float x_207001 = 0.0F - defunc_2_reduce_res_206994;\n        float b11_207002 = det1_206999 * x_207001;\n        float c11_207003 = defunc_2_reduce_res_206993 * det1_206999;\n        int64_t defunc_0_m_fun_res_207004;\n        \n        if (index_primexp_221813) {\n            defunc_0_m_fun_res_207004 = (int64_t) 0;\n        } else {\n            int64_t y_207005 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_207006 = gtid_206989 == y_207005;\n            int64_t defunc_0_m_fun_res_f_res_207007;\n            \n            if (cond_207006) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_207008 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_207007 =\n                    defunc_0_m_fun_res_f_res_t_res_207008;\n            } else {\n                int64_t x_207009 = sub64(gtid_206989, (int64_t) 1);\n                int64_t x_207010 = mul64(jump_s_196701, x_207009);\n                int64_t min_arg_207011 = add64((int64_t) 1, x_207010);\n                int64_t min_res_207012 = smin64(defunc_0_f_res_196740,\n                                                min_arg_207011);\n                \n                defunc_0_m_fun_res_f_res_207007 = min_res_207012;\n            }\n            defunc_0_m_fun_res_207004 = defunc_0_m_fun_res_f_res_207007;\n        }\n        ((__local float *) color_225048)[gtid_206989] = a11_207000;\n        ((__local float *) color_225047)[gtid_206989] = b11_207002;\n        ((__local float *) color_225046)[gtid_206989] = c11_207003;\n        ((__local int64_t *) color_225045)[gtid_206989] =\n            defunc_0_m_fun_res_2",
                   "07004;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_207015 = sext_i32_i64(sext_i64_i32(ltid_pre_226214));\n    int64_t gtid_207016 = sext_i32_i64(sext_i64_i32(ltid_pre_226215));\n    int32_t phys_tid_207017 = local_tid_226207;\n    __local unsigned char *red_arr_mem_226258;\n    \n    red_arr_mem_226258 = (__local\n                          unsigned char *) red_arr_mem_226258_backing_11;\n    \n    __local unsigned char *red_arr_mem_226260;\n    \n    red_arr_mem_226260 = (__local\n                          unsigned char *) red_arr_mem_226260_backing_12;\n    if (slt64(gtid_207015, s_n_m_196745) && slt64(gtid_207016, q_s_196695)) {\n        int64_t x_207024;\n        \n        x_207024 = ((__global int64_t *) ext_mem_222420)[gtid_206917 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_206918 *\n                                                         s_n_m_196745 +\n                                                         gtid_207015];\n        \n        float x_207025;\n        \n        x_207025 = ((__global float *) ext_mem_222419)[gtid_206917 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_206918 *\n                                                       s_n_m_196745 +\n                                                       gtid_207015];\n        \n        float a11_207026;\n        \n        a11_207026 = ((__local float *) color_225048)[gtid_207015];\n        \n        float b11_207027;\n        \n        b11_207027 = ((__local float *) color_225047)[gtid_207015];\n        \n        float c11_207028;\n        \n        c11_207028 = ((__local float *) color_225046)[gtid_207015];\n        \n        int64_t defunc_0_m_fun_res_207029;\n        \n        defunc_0_m_fun_res_207029",
                   " = ((__local\n                                      int64_t *) color_225045)[gtid_207015];\n        \n        bool cond_207031 = sle64(x_206926, gtid_207016);\n        int64_t defunc_0_f_res_207032;\n        \n        if (cond_207031) {\n            defunc_0_f_res_207032 = (int64_t) 0;\n        } else {\n            int64_t i_207033 = add64(gtid_207016, x_207024);\n            int64_t defunc_0_add_arg_207034;\n            \n            defunc_0_add_arg_207034 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_206917 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_196694) +\n                                                                   gtid_206918 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_207033];\n            \n            int64_t defunc_1_add_res_207035 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_207034);\n            \n            defunc_0_f_res_207032 = defunc_1_add_res_207035;\n        }\n        \n        float defunc_0_f_res_207036;\n        \n        if (cond_207031) {\n            defunc_0_f_res_207036 = 0.0F;\n        } else {\n            int64_t i_207037 = add64(gtid_207016, x_207024);\n            float defunc_0_add_arg_207038;\n            \n            defunc_0_add_arg_207038 = ((__global\n                                        float *) mem_222588)[gtid_206917 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_206918 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_207037];\n            de",
                   "func_0_f_res_207036 = defunc_0_add_arg_207038;\n        }\n        \n        int64_t binop_p_207039 = sub64(defunc_0_f_res_207032,\n                                       defunc_0_m_fun_res_207029);\n        float defunc_0_f_res_207040 = sitofp_i64_f32(binop_p_207039);\n        float abs_res_207041 = (float) fabs(defunc_0_f_res_207040);\n        float tmp1_207042 = abs_res_207041 / x_207025;\n        float x_207043 = tmp1_207042 * tmp1_207042;\n        float y_207044 = tmp1_207042 * x_207043;\n        float tmp2_207045 = 1.0F - y_207044;\n        float x_207046 = tmp2_207045 * tmp2_207045;\n        float tmp3_207047 = tmp2_207045 * x_207046;\n        float tmp4_207048 = defunc_0_f_res_207036 * tmp3_207047;\n        float defunc_1_f_res_207049 = defunc_0_f_res_207040 * tmp4_207048;\n        float defunc_0_f_res_207050;\n        \n        if (cond_207031) {\n            defunc_0_f_res_207050 = 0.0F;\n        } else {\n            int64_t i_207051 = add64(gtid_207016, x_207024);\n            float defunc_0_add_arg_207052;\n            \n            defunc_0_add_arg_207052 = ((__global\n                                        float *) mem_222583)[gtid_206917 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_206918 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_207051];\n            defunc_0_f_res_207050 = defunc_0_add_arg_207052;\n        }\n        \n        float x_207053 = a11_207026 * tmp4_207048;\n        float y_207054 = b11_207027 * defunc_1_f_res_207049;\n        float x_207055 = x_207053 + y_207054;\n        float defunc_9_fit_fun_res_207056 = defunc_0_f_res_207050 * x_207055;\n        float x_207057 = b11_207027 * tmp4_207048;\n        float y_207058 = c11_207028 * defunc_1_f_res_207049;\n        float x_207059 = x_",
                   "207057 + y_207058;\n        float defunc_9_slope_fun_res_207060 = defunc_0_f_res_207050 * x_207059;\n        \n        ((__local float *) red_arr_mem_226258)[gtid_207015 * q_s_196695 +\n                                               gtid_207016] =\n            defunc_9_fit_fun_res_207056;\n        ((__local float *) red_arr_mem_226260)[gtid_207015 * q_s_196695 +\n                                               gtid_207016] =\n            defunc_9_slope_fun_res_207060;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226262 = s_n_m_196745 * q_s_196695;\n    float x_207018;\n    float x_207019;\n    float x_207020;\n    float x_207021;\n    float x_226265;\n    float x_226266;\n    float x_226267;\n    float x_226268;\n    bool ltid_in_bounds_226271 = slt64(sext_i32_i64(local_tid_226207),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226272;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226271) {\n            x_207020 = ((volatile __local\n                         float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)];\n            x_207021 = ((volatile __local\n                         float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)];\n            if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) == 0) {\n                x_207018 = x_207020;\n                x_207019 = x_207021;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226272 = 1;\n        while (slt32(skip_threads_226272, 32)) {\n            bool thread_active_226273 = sle32(skip_threads_226272,\n                                              local_tid_226207 -\n                                              squot32(local_tid_226207, 32) *\n                                              32) && ltid_in_bounds_226271;\n            \n            if (thread_active_226273) {\n                // read operands\n                {\n                    x_207018 = ((volatile __lo",
                   "cal\n                                 float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207) -\n                                                              sext_i32_i64(skip_threads_226272)];\n                    x_207019 = ((volatile __local\n                                 float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207) -\n                                                              sext_i32_i64(skip_threads_226272)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226274 =\n                     slt64(srem64(sext_i32_i64(local_tid_226207), q_s_196695),\n                           sext_i32_i64(local_tid_226207) -\n                           sext_i32_i64(local_tid_226207 -\n                           skip_threads_226272));\n                \n                if (thread_active_226273 && inactive_226274) {\n                    x_207018 = x_207020;\n                    x_207019 = x_207021;\n                }\n                if (thread_active_226273) {\n                    if (!inactive_226274) {\n                        float defunc_1_op_res_207022 = x_207018 + x_207020;\n                        float defunc_1_op_res_207023 = x_207019 + x_207021;\n                        \n                        x_207018 = defunc_1_op_res_207022;\n                        x_207019 = defunc_1_op_res_207023;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_226209, skip_threads_226272)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226273) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)] =\n                        x_207018;\n                    x_207020 = x_207018;\n                    ((volatile __local\n                      float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)] =\n                        x_207019;\n     ",
                   "               x_207021 = x_207019;\n                }\n            }\n            if (sle32(wave_sizze_226209, skip_threads_226272)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226272 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) == 31 &&\n            ltid_in_bounds_226271) {\n            ((volatile __local\n              float *) red_arr_mem_226258)[sext_i32_i64(squot32(local_tid_226207,\n                                                                32))] =\n                x_207018;\n            ((volatile __local\n              float *) red_arr_mem_226260)[sext_i32_i64(squot32(local_tid_226207,\n                                                                32))] =\n                x_207019;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_226275;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226207, 32) == 0 && ltid_in_bounds_226271) {\n                x_226267 = ((volatile __local\n                             float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)];\n                x_226268 = ((volatile __local\n                             float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)];\n                if ((local_tid_226207 - squot32(local_tid_226207, 32) * 32) ==\n                    0) {\n                    x_226265 = x_226267;\n                    x_226266 = x_226268;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226275 = 1;\n            while (slt32(skip_threads_226275, 32)) {\n                bool thread_active_226276 = sle32(skip_threads_226275,\n                                                  local_tid_226207 ",
                   "-\n                                                  squot32(local_tid_226207,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226207, 32) == 0 &&\n                      ltid_in_bounds_226271);\n                \n                if (thread_active_226276) {\n                    // read operands\n                    {\n                        x_226265 = ((volatile __local\n                                     float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207) -\n                                                                  sext_i32_i64(skip_threads_226275)];\n                        x_226266 = ((volatile __local\n                                     float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207) -\n                                                                  sext_i32_i64(skip_threads_226275)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226277 =\n                         slt64(srem64(sext_i32_i64(local_tid_226207 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226207 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226207 -\n                                             skip_threads_226275) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226276 && inactive_226277) {\n                        x_226265 = x_226267;\n                        x_226266 = x_226268;\n                    }\n                    if (thread_active_226276) {\n                        if (!inactive_226277) {\n                            float defunc_1_op_res_226269 = x_226265 + x_226267;\n                            float defunc_1_op_res_226270 = x_226266 + x_226268;\n                            \n                            x_226265 = defunc_1_op_res_226269;\n                            x_226266 =",
                   " defunc_1_op_res_226270;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226209, skip_threads_226275)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226276) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)] =\n                            x_226265;\n                        x_226267 = x_226265;\n                        ((volatile __local\n                          float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)] =\n                            x_226266;\n                        x_226268 = x_226266;\n                    }\n                }\n                if (sle32(wave_sizze_226209, skip_threads_226275)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226275 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226278 = squot32(local_tid_226207, 32) == 0 ||\n         !ltid_in_bounds_226271;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226278) {\n                x_207020 = x_207018;\n                x_207021 = x_207019;\n                x_207018 = ((__local\n                             float *) red_arr_mem_226258)[sext_i32_i64(squot32(local_tid_226207,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_207019 = ((__local\n                             float *) red_arr_mem_226260)[sext_i32_i64(squot32(local_tid_226207,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n      ",
                   "  {\n            bool inactive_226279 = slt64(srem64(sext_i32_i64(local_tid_226207),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226207) -\n                                         sext_i32_i64(squot32(local_tid_226207,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226278) {\n                if (inactive_226279) {\n                    x_207018 = x_207020;\n                    x_207019 = x_207021;\n                }\n            }\n            if (!no_carry_in_226278) {\n                if (!inactive_226279) {\n                    float defunc_1_op_res_207022 = x_207018 + x_207020;\n                    float defunc_1_op_res_207023 = x_207019 + x_207021;\n                    \n                    x_207018 = defunc_1_op_res_207022;\n                    x_207019 = defunc_1_op_res_207023;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_226278) {\n                ((__local\n                  float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)] =\n                    x_207018;\n                ((__local\n                  float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)] =\n                    x_207019;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_226207, 32) == 0 && ltid_in_bounds_226271) {\n            ((__local\n              float *) red_arr_mem_226258)[sext_i32_i64(local_tid_226207)] =\n                x_207020;\n            ((__local\n              float *) red_arr_mem_226260)[sext_i32_i64(local_tid_226207)] =\n                x_207021;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226280 = 0; i_226280 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_22",
                   "6207),\n                                                    computed_group_sizze_206788);\n         i_226280++) {\n        float tmp_226281;\n        \n        tmp_226281 = ((__local float *) red_arr_mem_226258)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226280 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226207)) *\n                                                            q_s_196695];\n        ((__local float *) color_225044)[i_226280 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226207)] =\n            tmp_226281;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226282 = 0; i_226282 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226282++) {\n        float tmp_226283;\n        \n        tmp_226283 = ((__local float *) red_arr_mem_226260)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226282 *\n                                                             computed_group_sizze_206788 +\n                                                             sext_i32_i64(local_tid_226207)) *\n                                                            q_s_196695];\n        ((__local float *) color_225043)[i_226282 *\n                                         computed_group_sizze_206788 +\n                                         sext_i32_i64(local_tid_226207)] =\n            tmp_226283;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226284 = 0; i_226284 < sdiv_u",
                   "p64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226284++) {\n        float tmp_226285;\n        \n        tmp_226285 = ((__local float *) color_225044)[i_226284 *\n                                                      computed_group_sizze_206788 +\n                                                      sext_i32_i64(local_tid_226207)];\n        ((__global float *) mem_223008)[gtid_206917 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_206918 * s_n_m_196745 + (i_226284 *\n                                                                      computed_group_sizze_206788 +\n                                                                      sext_i32_i64(local_tid_226207))] =\n            tmp_226285;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226286 = 0; i_226286 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226207),\n                                                    computed_group_sizze_206788);\n         i_226286++) {\n        float tmp_226287;\n        \n        tmp_226287 = ((__local float *) color_225043)[i_226286 *\n                                                      computed_group_sizze_206788 +\n                                                      sext_i32_i64(local_tid_226207)];\n        ((__global float *) mem_223013)[gtid_206917 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_206918 * s_n_m_196745 + (i_226286 *\n                                                                      computed_group_sizze_206788 +\n                                                                      sext_i32_i64(local_tid_226207))] =\n            tmp_226287;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_6:\n",
                   "    return;\n}\n__kernel void mainzisegmap_intragroup_209494(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226655_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226653_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226611_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226609_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226607_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226605_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226603_backing_aligned_6,\n                                             __local volatile\n                                             int64_t *color_225066_backing_aligned_7,\n                                             __local volatile\n                                             int64_t *color_225065_backing_aligned_8,\n                                             __local volatile\n                                             int64_t *color_225064_backing_aligned_9,\n                                             __local volatile\n                                             int64_t *color_225063_backing_aligned_10,\n                                             __local volatile\n                                             int64_t *color_225062_backing_aligned_11,\n                                             __local volatile\n                             ",
                   "                int64_t *color_225061_backing_aligned_12,\n                                             __local volatile\n                                             int64_t *color_225060_backing_aligned_13,\n                                             __local volatile\n                                             int64_t *color_225059_backing_aligned_14,\n                                             __local volatile\n                                             int64_t *color_225058_backing_aligned_15,\n                                             __local volatile\n                                             int64_t *color_225057_backing_aligned_16,\n                                             __local volatile\n                                             int64_t *color_225056_backing_aligned_17,\n                                             __local volatile\n                                             int64_t *color_225055_backing_aligned_18,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745,\n                                             int64_t computed_group_sizze_209331,\n                                             __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n                                             ",
                   "unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_223347,\n                                             __global unsigned char *mem_223352)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226655_backing_18 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226655_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226653_backing_17 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226653_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226611_backing_16 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226611_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226609_backing_15 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226609_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_226607_backing_14 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226607_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_226605_backing_13 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226605_backing_aligned_5;\n    __local volatile unsigned char *restrict red_arr_mem_226603_backing_12 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226603_backing_aligned_6;\n    __",
                   "local volatile unsigned char *restrict color_225066_backing_11 =\n                                   (__local volatile\n                                    unsigned char *) color_225066_backing_aligned_7;\n    __local volatile unsigned char *restrict color_225065_backing_10 =\n                                   (__local volatile\n                                    unsigned char *) color_225065_backing_aligned_8;\n    __local volatile unsigned char *restrict color_225064_backing_9 =\n                                   (__local volatile\n                                    unsigned char *) color_225064_backing_aligned_9;\n    __local volatile unsigned char *restrict color_225063_backing_8 =\n                                   (__local volatile\n                                    unsigned char *) color_225063_backing_aligned_10;\n    __local volatile unsigned char *restrict color_225062_backing_7 =\n                                   (__local volatile\n                                    unsigned char *) color_225062_backing_aligned_11;\n    __local volatile unsigned char *restrict color_225061_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) color_225061_backing_aligned_12;\n    __local volatile unsigned char *restrict color_225060_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) color_225060_backing_aligned_13;\n    __local volatile unsigned char *restrict color_225059_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) color_225059_backing_aligned_14;\n    __local volatile unsigned char *restrict color_225058_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225058_backing_aligned_15;\n    __local volatile unsigned char *restrict color_225057_backing_2 =\n                                   (__local volatile\n   ",
                   "                                 unsigned char *) color_225057_backing_aligned_16;\n    __local volatile unsigned char *restrict color_225056_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225056_backing_aligned_17;\n    __local volatile unsigned char *restrict color_225055_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225055_backing_aligned_18;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226585;\n    int32_t local_tid_226586;\n    int64_t group_sizze_226589;\n    int32_t wave_sizze_226588;\n    int32_t group_tid_226587;\n    \n    global_tid_226585 = get_global_id(0);\n    local_tid_226586 = get_local_id(0);\n    group_sizze_226589 = get_local_size(0);\n    wave_sizze_226588 = LOCKSTEP_WIDTH;\n    group_tid_226587 = get_group_id(0);\n    \n    int32_t phys_tid_209494 = group_tid_226587;\n    int64_t slice_226591 = s_n_m_196745;\n    int64_t ltid_pre_226590 = sext_i32_i64(local_tid_226586);\n    int64_t remnant_226592 = sext_i32_i64(local_tid_226586) - ltid_pre_226590;\n    int64_t slice_226595 = q_s_196695;\n    int64_t slice_226596 = s_n_m_196745 * slice_226595;\n    int64_t ltid_pre_226593 = squot64(sext_i32_i64(local_tid_226586),\n                                      slice_226595);\n    int64_t remnant_226597 = sext_i32_i64(local_tid_226586) - ltid_pre_226593 *\n            slice_226595;\n    int64_t ltid_pre_226594 = remnant_226597;\n    int64_t remnant_226598 = remnant_226597 - ltid_pre_226594;\n    int64_t slice_226599 = n_p_196694;\n    int64_t slice_226600 = m_196691 * slice_226599;\n    int64_t gtid_209492 = squot64(sext_i32_i64(group_tid_226587), slice_226599);\n    int64_t remnant_226601 = sext_i32_i64(group_tid_226587) - gtid_209492 *\n            slice_226599;\n    int64_t gtid_209493 = remnant_226601;\n    int64_t remnant_226602 = remnant_226601 - gtid_209493;\n    __local unsigned char *color_22",
                   "5055;\n    \n    color_225055 = (__local unsigned char *) color_225055_backing_0;\n    \n    __local unsigned char *color_225056;\n    \n    color_225056 = (__local unsigned char *) color_225056_backing_1;\n    \n    __local unsigned char *color_225057;\n    \n    color_225057 = (__local unsigned char *) color_225057_backing_2;\n    \n    __local unsigned char *color_225058;\n    \n    color_225058 = (__local unsigned char *) color_225058_backing_3;\n    \n    __local unsigned char *color_225059;\n    \n    color_225059 = (__local unsigned char *) color_225059_backing_4;\n    \n    __local unsigned char *color_225060;\n    \n    color_225060 = (__local unsigned char *) color_225060_backing_5;\n    \n    __local unsigned char *color_225061;\n    \n    color_225061 = (__local unsigned char *) color_225061_backing_6;\n    \n    __local unsigned char *color_225062;\n    \n    color_225062 = (__local unsigned char *) color_225062_backing_7;\n    \n    __local unsigned char *color_225063;\n    \n    color_225063 = (__local unsigned char *) color_225063_backing_8;\n    \n    __local unsigned char *color_225064;\n    \n    color_225064 = (__local unsigned char *) color_225064_backing_9;\n    \n    __local unsigned char *color_225065;\n    \n    color_225065 = (__local unsigned char *) color_225065_backing_10;\n    \n    __local unsigned char *color_225066;\n    \n    color_225066 = (__local unsigned char *) color_225066_backing_11;\n    \n    int64_t x_209501;\n    \n    x_209501 = ((__global int64_t *) ext_mem_222321)[gtid_209492 * n_p_196694 +\n                                                     gtid_209493];\n    \n    int64_t gtid_209508 = sext_i32_i64(sext_i64_i32(ltid_pre_226590));\n    int32_t phys_tid_209509 = local_tid_226586;\n    \n    if (slt64(gtid_209508, s_n_m_196745)) {\n        bool cond_209511 = gtid_209508 == (int64_t) 0;\n        int64_t defunc_0_m_fun_res_209512;\n        \n        if (cond_209511) {\n            defunc_0_m_fun_res_209512 = (int64_t) 0;\n        } else {\n            int64_t y_209513 = sub64(s_n_m",
                   "_196745, (int64_t) 1);\n            bool cond_209514 = gtid_209508 == y_209513;\n            int64_t defunc_0_m_fun_res_f_res_209515;\n            \n            if (cond_209514) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209516 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209515 =\n                    defunc_0_m_fun_res_f_res_t_res_209516;\n            } else {\n                int64_t x_209517 = sub64(gtid_209508, (int64_t) 1);\n                int64_t x_209518 = mul64(jump_s_196701, x_209517);\n                int64_t min_arg_209519 = add64((int64_t) 1, x_209518);\n                int64_t min_res_209520 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209519);\n                \n                defunc_0_m_fun_res_f_res_209515 = min_res_209520;\n            }\n            defunc_0_m_fun_res_209512 = defunc_0_m_fun_res_f_res_209515;\n        }\n        ((__local int64_t *) color_225057)[gtid_209508] =\n            defunc_0_m_fun_res_209512;\n        ((__local bool *) color_225066)[gtid_209508] = cond_209511;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_209526 = sext_i32_i64(sext_i64_i32(ltid_pre_226593));\n    int64_t gtid_209527 = sext_i32_i64(sext_i64_i32(ltid_pre_226594));\n    int32_t phys_tid_209528 = local_tid_226586;\n    __local unsigned char *red_arr_mem_226603;\n    \n    red_arr_mem_226603 = (__local\n                          unsigned char *) red_arr_mem_226603_backing_12;\n    \n    __local unsigned char *red_arr_mem_226605;\n    \n    red_arr_mem_226605 = (__local\n                          unsigned char *) red_arr_mem_226605_backing_13;\n    \n    __local unsigned char *red_arr_mem_226607;\n    \n    red_arr_mem_226607 = (__local\n                          unsigned char *) red_arr_mem_226607_backing_14;\n    \n    __local unsigned char *red_arr_mem_226609;\n    \n    red_arr_mem_226609 = (__local\n                          unsigned char *) red",
                   "_arr_mem_226609_backing_15;\n    \n    __local unsigned char *red_arr_mem_226611;\n    \n    red_arr_mem_226611 = (__local\n                          unsigned char *) red_arr_mem_226611_backing_16;\n    if (slt64(gtid_209526, s_n_m_196745) && slt64(gtid_209527, q_s_196695)) {\n        int64_t x_209544;\n        \n        x_209544 = ((__global int64_t *) ext_mem_222420)[gtid_209492 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_209493 *\n                                                         s_n_m_196745 +\n                                                         gtid_209526];\n        \n        float x_209545;\n        \n        x_209545 = ((__global float *) ext_mem_222419)[gtid_209492 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_209493 *\n                                                       s_n_m_196745 +\n                                                       gtid_209526];\n        \n        int64_t defunc_0_m_fun_res_209546;\n        \n        defunc_0_m_fun_res_209546 = ((__local\n                                      int64_t *) color_225057)[gtid_209526];\n        \n        bool cond_209548 = sle64(x_209501, gtid_209527);\n        int64_t defunc_0_f_res_209549;\n        \n        if (cond_209548) {\n            defunc_0_f_res_209549 = (int64_t) 0;\n        } else {\n            int64_t i_209550 = add64(gtid_209527, x_209544);\n            int64_t defunc_0_add_arg_209551;\n            \n            defunc_0_add_arg_209551 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_209492 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_",
                   "196694) +\n                                                                   gtid_209493 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_209550];\n            \n            int64_t defunc_1_add_res_209552 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_209551);\n            \n            defunc_0_f_res_209549 = defunc_1_add_res_209552;\n        }\n        \n        float defunc_0_f_res_209553;\n        \n        if (cond_209548) {\n            defunc_0_f_res_209553 = 0.0F;\n        } else {\n            int64_t i_209554 = add64(gtid_209527, x_209544);\n            float defunc_0_add_arg_209555;\n            \n            defunc_0_add_arg_209555 = ((__global\n                                        float *) mem_222588)[gtid_209492 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_209493 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_209554];\n            defunc_0_f_res_209553 = defunc_0_add_arg_209555;\n        }\n        \n        int64_t binop_p_209556 = sub64(defunc_0_f_res_209549,\n                                       defunc_0_m_fun_res_209546);\n        float defunc_0_f_res_209557 = sitofp_i64_f32(binop_p_209556);\n        float abs_res_209558 = (float) fabs(defunc_0_f_res_209557);\n        float tmp1_209559 = abs_res_209558 / x_209545;\n        float x_209560 = tmp1_209559 * tmp1_209559;\n        float y_209561 = tmp1_209559 * x_209560;\n        float tmp2_209562 = 1.0F - y_209561;\n        float x_209563 = tmp2_209562 * tmp2_209562;\n        float tmp3_209564 = tmp2_209562 * x_209563;\n        float w_j_209565 = defunc_0_f_res_209553 * tmp3_209564;\n        ",
                   "float xw_j_209566 = defunc_0_f_res_209557 * w_j_209565;\n        float x2w_j_209567 = defunc_0_f_res_209557 * xw_j_209566;\n        float x3w_j_209568 = defunc_0_f_res_209557 * x2w_j_209567;\n        float x4w_j_209569 = defunc_0_f_res_209557 * x3w_j_209568;\n        \n        ((__local float *) red_arr_mem_226603)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = w_j_209565;\n        ((__local float *) red_arr_mem_226605)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = xw_j_209566;\n        ((__local float *) red_arr_mem_226607)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x2w_j_209567;\n        ((__local float *) red_arr_mem_226609)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x3w_j_209568;\n        ((__local float *) red_arr_mem_226611)[gtid_209526 * q_s_196695 +\n                                               gtid_209527] = x4w_j_209569;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226613 = s_n_m_196745 * q_s_196695;\n    float x_209529;\n    float x_209530;\n    float x_209531;\n    float x_209532;\n    float x_209533;\n    float x_209534;\n    float x_209535;\n    float x_209536;\n    float x_209537;\n    float x_209538;\n    float x_226619;\n    float x_226620;\n    float x_226621;\n    float x_226622;\n    float x_226623;\n    float x_226624;\n    float x_226625;\n    float x_226626;\n    float x_226627;\n    float x_226628;\n    bool ltid_in_bounds_226634 = slt64(sext_i32_i64(local_tid_226586),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226635;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226634) {\n            x_209534 = ((volatile __local\n                         float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)];\n            x_209535 = ((volatile __local\n                         float *) red_arr_mem_226605)[sext_",
                   "i32_i64(local_tid_226586)];\n            x_209536 = ((volatile __local\n                         float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586)];\n            x_209537 = ((volatile __local\n                         float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)];\n            x_209538 = ((volatile __local\n                         float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)];\n            if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) == 0) {\n                x_209529 = x_209534;\n                x_209530 = x_209535;\n                x_209531 = x_209536;\n                x_209532 = x_209537;\n                x_209533 = x_209538;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226635 = 1;\n        while (slt32(skip_threads_226635, 32)) {\n            bool thread_active_226636 = sle32(skip_threads_226635,\n                                              local_tid_226586 -\n                                              squot32(local_tid_226586, 32) *\n                                              32) && ltid_in_bounds_226634;\n            \n            if (thread_active_226636) {\n                // read operands\n                {\n                    x_209529 = ((volatile __local\n                                 float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226635)];\n                    x_209530 = ((volatile __local\n                                 float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226635)];\n                    x_209531 = ((volatile __local\n                                 float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226635)];\n                    x_209532 = ",
                   "((volatile __local\n                                 float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226635)];\n                    x_209533 = ((volatile __local\n                                 float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226635)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226637 =\n                     slt64(srem64(sext_i32_i64(local_tid_226586), q_s_196695),\n                           sext_i32_i64(local_tid_226586) -\n                           sext_i32_i64(local_tid_226586 -\n                           skip_threads_226635));\n                \n                if (thread_active_226636 && inactive_226637) {\n                    x_209529 = x_209534;\n                    x_209530 = x_209535;\n                    x_209531 = x_209536;\n                    x_209532 = x_209537;\n                    x_209533 = x_209538;\n                }\n                if (thread_active_226636) {\n                    if (!inactive_226637) {\n                        float defunc_1_op_res_209539 = x_209529 + x_209534;\n                        float defunc_1_op_res_209540 = x_209530 + x_209535;\n                        float defunc_1_op_res_209541 = x_209531 + x_209536;\n                        float defunc_1_op_res_209542 = x_209532 + x_209537;\n                        float defunc_1_op_res_209543 = x_209533 + x_209538;\n                        \n                        x_209529 = defunc_1_op_res_209539;\n                        x_209530 = defunc_1_op_res_209540;\n                        x_209531 = defunc_1_op_res_209541;\n                        x_209532 = defunc_1_op_res_209542;\n                        x_209533 = defunc_1_op_res_209543;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_2",
                   "26588, skip_threads_226635)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226636) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)] =\n                        x_209529;\n                    x_209534 = x_209529;\n                    ((volatile __local\n                      float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586)] =\n                        x_209530;\n                    x_209535 = x_209530;\n                    ((volatile __local\n                      float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586)] =\n                        x_209531;\n                    x_209536 = x_209531;\n                    ((volatile __local\n                      float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)] =\n                        x_209532;\n                    x_209537 = x_209532;\n                    ((volatile __local\n                      float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)] =\n                        x_209533;\n                    x_209538 = x_209533;\n                }\n            }\n            if (sle32(wave_sizze_226588, skip_threads_226635)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226635 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) == 31 &&\n            ltid_in_bounds_226634) {\n            ((volatile __local\n              float *) red_arr_mem_226603)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209529;\n            ((volatile __local\n              float *) red_arr_mem_226605)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =",
                   "\n                x_209530;\n            ((volatile __local\n              float *) red_arr_mem_226607)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209531;\n            ((volatile __local\n              float *) red_arr_mem_226609)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209532;\n            ((volatile __local\n              float *) red_arr_mem_226611)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209533;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_226638;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226586, 32) == 0 && ltid_in_bounds_226634) {\n                x_226624 = ((volatile __local\n                             float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)];\n                x_226625 = ((volatile __local\n                             float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586)];\n                x_226626 = ((volatile __local\n                             float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586)];\n                x_226627 = ((volatile __local\n                             float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)];\n                x_226628 = ((volatile __local\n                             float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)];\n                if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) ==\n                    0) {\n                    x_226619 = x_226624;\n                    x_226620 = x_226625;\n                    x_226621 = x_226626;\n                    x_226622 = x_226627;\n                    x_226623 = x_226628;\n                }\n           ",
                   " }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226638 = 1;\n            while (slt32(skip_threads_226638, 32)) {\n                bool thread_active_226639 = sle32(skip_threads_226638,\n                                                  local_tid_226586 -\n                                                  squot32(local_tid_226586,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226586, 32) == 0 &&\n                      ltid_in_bounds_226634);\n                \n                if (thread_active_226639) {\n                    // read operands\n                    {\n                        x_226619 = ((volatile __local\n                                     float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226638)];\n                        x_226620 = ((volatile __local\n                                     float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226638)];\n                        x_226621 = ((volatile __local\n                                     float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226638)];\n                        x_226622 = ((volatile __local\n                                     float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226638)];\n                        x_226623 = ((volatile __local\n                                     float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226638)];\n                    }\n                }\n   ",
                   "             // perform operation\n                {\n                    bool inactive_226640 =\n                         slt64(srem64(sext_i32_i64(local_tid_226586 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226586 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226586 -\n                                             skip_threads_226638) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_226639 && inactive_226640) {\n                        x_226619 = x_226624;\n                        x_226620 = x_226625;\n                        x_226621 = x_226626;\n                        x_226622 = x_226627;\n                        x_226623 = x_226628;\n                    }\n                    if (thread_active_226639) {\n                        if (!inactive_226640) {\n                            float defunc_1_op_res_226629 = x_226619 + x_226624;\n                            float defunc_1_op_res_226630 = x_226620 + x_226625;\n                            float defunc_1_op_res_226631 = x_226621 + x_226626;\n                            float defunc_1_op_res_226632 = x_226622 + x_226627;\n                            float defunc_1_op_res_226633 = x_226623 + x_226628;\n                            \n                            x_226619 = defunc_1_op_res_226629;\n                            x_226620 = defunc_1_op_res_226630;\n                            x_226621 = defunc_1_op_res_226631;\n                            x_226622 = defunc_1_op_res_226632;\n                            x_226623 = defunc_1_op_res_226633;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226588, skip_threads_226638)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226639) {\n                    // write result\n                    {\n                        ((volatile",
                   " __local\n                          float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)] =\n                            x_226619;\n                        x_226624 = x_226619;\n                        ((volatile __local\n                          float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586)] =\n                            x_226620;\n                        x_226625 = x_226620;\n                        ((volatile __local\n                          float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586)] =\n                            x_226621;\n                        x_226626 = x_226621;\n                        ((volatile __local\n                          float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)] =\n                            x_226622;\n                        x_226627 = x_226622;\n                        ((volatile __local\n                          float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)] =\n                            x_226623;\n                        x_226628 = x_226623;\n                    }\n                }\n                if (sle32(wave_sizze_226588, skip_threads_226638)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226638 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226641 = squot32(local_tid_226586, 32) == 0 ||\n         !ltid_in_bounds_226634;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226641) {\n                x_209534 = x_209529;\n                x_209535 = x_209530;\n                x_209536 = x_209531;\n                x_209537 = x_209532;\n                x_209538 = x_209533;\n                x_209529 = ((__local\n                             float *) red_arr_mem_226603)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                               ",
                   "                           (int64_t) 1];\n                x_209530 = ((__local\n                             float *) red_arr_mem_226605)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209531 = ((__local\n                             float *) red_arr_mem_226607)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209532 = ((__local\n                             float *) red_arr_mem_226609)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209533 = ((__local\n                             float *) red_arr_mem_226611)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226642 = slt64(srem64(sext_i32_i64(local_tid_226586),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226586) -\n                                         sext_i32_i64(squot32(local_tid_226586,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226641) {\n                if (inactive_226642) {\n                    x_209529 = x_209534;\n                    x_209530 = x_209535;\n                    x_209531 = x_209536;\n                    x_209532 = x_209537;\n                    x_209533 = x_209538;\n                }\n            }\n            if (!no_carry_i",
                   "n_226641) {\n                if (!inactive_226642) {\n                    float defunc_1_op_res_209539 = x_209529 + x_209534;\n                    float defunc_1_op_res_209540 = x_209530 + x_209535;\n                    float defunc_1_op_res_209541 = x_209531 + x_209536;\n                    float defunc_1_op_res_209542 = x_209532 + x_209537;\n                    float defunc_1_op_res_209543 = x_209533 + x_209538;\n                    \n                    x_209529 = defunc_1_op_res_209539;\n                    x_209530 = defunc_1_op_res_209540;\n                    x_209531 = defunc_1_op_res_209541;\n                    x_209532 = defunc_1_op_res_209542;\n                    x_209533 = defunc_1_op_res_209543;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_226641) {\n                ((__local\n                  float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)] =\n                    x_209529;\n                ((__local\n                  float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586)] =\n                    x_209530;\n                ((__local\n                  float *) red_arr_mem_226607)[sext_i32_i64(local_tid_226586)] =\n                    x_209531;\n                ((__local\n                  float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)] =\n                    x_209532;\n                ((__local\n                  float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)] =\n                    x_209533;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_226586, 32) == 0 && ltid_in_bounds_226634) {\n            ((__local\n              float *) red_arr_mem_226603)[sext_i32_i64(local_tid_226586)] =\n                x_209534;\n            ((__local\n              float *) red_arr_mem_226605)[sext_i32_i64(local_tid_226586)] =\n                x_209535;\n            ((__local\n              float *) ",
                   "red_arr_mem_226607)[sext_i32_i64(local_tid_226586)] =\n                x_209536;\n            ((__local\n              float *) red_arr_mem_226609)[sext_i32_i64(local_tid_226586)] =\n                x_209537;\n            ((__local\n              float *) red_arr_mem_226611)[sext_i32_i64(local_tid_226586)] =\n                x_209538;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226643 = 0; i_226643 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226643++) {\n        float tmp_226644;\n        \n        tmp_226644 = ((__local float *) red_arr_mem_226603)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226643 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225065)[i_226643 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226644;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226645 = 0; i_226645 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226645++) {\n        float tmp_226646;\n        \n        tmp_226646 = ((__local float *) red_arr_mem_226605)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226645 *\n                                             ",
                   "                computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225064)[i_226645 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226646;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226647 = 0; i_226647 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226647++) {\n        float tmp_226648;\n        \n        tmp_226648 = ((__local float *) red_arr_mem_226607)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226647 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225063)[i_226647 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226648;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226649 = 0; i_226649 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226649++) {\n        float tmp_226650;\n        \n        tmp_226650 = ((__local float *) red_arr_mem_226609)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                       ",
                   "     (i_226649 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225056)[i_226649 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226650;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226651 = 0; i_226651 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226651++) {\n        float tmp_226652;\n        \n        tmp_226652 = ((__local float *) red_arr_mem_226611)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226651 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225055)[i_226651 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226652;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_209576 = sext_i32_i64(sext_i64_i32(ltid_pre_226590));\n    int32_t phys_tid_209577 = local_tid_226586;\n    \n    if (slt64(gtid_209576, s_n_m_196745)) {\n        bool index_primexp_221819 = gtid_209576 == (int64_t) 0;\n        float defunc_2_reduce_res_209580;\n        \n        defunc_2_reduce_res_209580 = ((__local\n                                       float *) color_225065)[",
                   "gtid_209576];\n        \n        float defunc_2_reduce_res_209581;\n        \n        defunc_2_reduce_res_209581 = ((__local\n                                       float *) color_225064)[gtid_209576];\n        \n        float defunc_2_reduce_res_209582;\n        \n        defunc_2_reduce_res_209582 = ((__local\n                                       float *) color_225063)[gtid_209576];\n        \n        float defunc_2_reduce_res_209583;\n        \n        defunc_2_reduce_res_209583 = ((__local\n                                       float *) color_225056)[gtid_209576];\n        \n        float defunc_2_reduce_res_209584;\n        \n        defunc_2_reduce_res_209584 = ((__local\n                                       float *) color_225055)[gtid_209576];\n        \n        float x_209585 = defunc_2_reduce_res_209582 *\n              defunc_2_reduce_res_209584;\n        float y_209586 = defunc_2_reduce_res_209583 *\n              defunc_2_reduce_res_209583;\n        float a12_209587 = x_209585 - y_209586;\n        float x_209588 = defunc_2_reduce_res_209582 *\n              defunc_2_reduce_res_209583;\n        float y_209589 = defunc_2_reduce_res_209581 *\n              defunc_2_reduce_res_209584;\n        float b12_209590 = x_209588 - y_209589;\n        float x_209591 = defunc_2_reduce_res_209581 *\n              defunc_2_reduce_res_209583;\n        float y_209592 = defunc_2_reduce_res_209582 *\n              defunc_2_reduce_res_209582;\n        float c12_209593 = x_209591 - y_209592;\n        float x_209594 = defunc_2_reduce_res_209580 *\n              defunc_2_reduce_res_209584;\n        float b2_209595 = x_209594 - y_209592;\n        float x_209596 = defunc_2_reduce_res_209581 *\n              defunc_2_reduce_res_209582;\n        float y_209597 = defunc_2_reduce_res_209580 *\n              defunc_2_reduce_res_209583;\n        float c2_209598 = x_209596 - y_209597;\n        float x_209599 = defunc_2_reduce_res_209580 * a12_209587;\n        float y_209600 = defunc_2_reduce_res_209581 * b12_209590;\n        flo",
                   "at x_209601 = x_209599 + y_209600;\n        float y_209602 = defunc_2_reduce_res_209582 * c12_209593;\n        float y_209603 = x_209601 + y_209602;\n        float det_209604 = 1.0F / y_209603;\n        float a12_209605 = a12_209587 * det_209604;\n        float b12_209606 = b12_209590 * det_209604;\n        float c12_209607 = c12_209593 * det_209604;\n        float b2_209608 = b2_209595 * det_209604;\n        float c2_209609 = c2_209598 * det_209604;\n        int64_t defunc_0_m_fun_res_209610;\n        \n        if (index_primexp_221819) {\n            defunc_0_m_fun_res_209610 = (int64_t) 0;\n        } else {\n            int64_t y_209611 = sub64(s_n_m_196745, (int64_t) 1);\n            bool cond_209612 = gtid_209576 == y_209611;\n            int64_t defunc_0_m_fun_res_f_res_209613;\n            \n            if (cond_209612) {\n                int64_t defunc_0_m_fun_res_f_res_t_res_209614 =\n                        sub64(pad_css_len_196741, (int64_t) 1);\n                \n                defunc_0_m_fun_res_f_res_209613 =\n                    defunc_0_m_fun_res_f_res_t_res_209614;\n            } else {\n                int64_t x_209615 = sub64(gtid_209576, (int64_t) 1);\n                int64_t x_209616 = mul64(jump_s_196701, x_209615);\n                int64_t min_arg_209617 = add64((int64_t) 1, x_209616);\n                int64_t min_res_209618 = smin64(defunc_0_f_res_196740,\n                                                min_arg_209617);\n                \n                defunc_0_m_fun_res_f_res_209613 = min_res_209618;\n            }\n            defunc_0_m_fun_res_209610 = defunc_0_m_fun_res_f_res_209613;\n        }\n        ((__local float *) color_225062)[gtid_209576] = a12_209605;\n        ((__local float *) color_225061)[gtid_209576] = b12_209606;\n        ((__local float *) color_225060)[gtid_209576] = c12_209607;\n        ((__local float *) color_225059)[gtid_209576] = b2_209608;\n        ((__local float *) color_225058)[gtid_209576] = c2_209609;\n        ((__local int64_t *) color_225057)",
                   "[gtid_209576] =\n            defunc_0_m_fun_res_209610;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_209621 = sext_i32_i64(sext_i64_i32(ltid_pre_226593));\n    int64_t gtid_209622 = sext_i32_i64(sext_i64_i32(ltid_pre_226594));\n    int32_t phys_tid_209623 = local_tid_226586;\n    __local unsigned char *red_arr_mem_226653;\n    \n    red_arr_mem_226653 = (__local\n                          unsigned char *) red_arr_mem_226653_backing_17;\n    \n    __local unsigned char *red_arr_mem_226655;\n    \n    red_arr_mem_226655 = (__local\n                          unsigned char *) red_arr_mem_226655_backing_18;\n    if (slt64(gtid_209621, s_n_m_196745) && slt64(gtid_209622, q_s_196695)) {\n        int64_t x_209630;\n        \n        x_209630 = ((__global int64_t *) ext_mem_222420)[gtid_209492 *\n                                                         (s_n_m_196745 *\n                                                          n_p_196694) +\n                                                         gtid_209493 *\n                                                         s_n_m_196745 +\n                                                         gtid_209621];\n        \n        float x_209631;\n        \n        x_209631 = ((__global float *) ext_mem_222419)[gtid_209492 *\n                                                       (s_n_m_196745 *\n                                                        n_p_196694) +\n                                                       gtid_209493 *\n                                                       s_n_m_196745 +\n                                                       gtid_209621];\n        \n        float a12_209632;\n        \n        a12_209632 = ((__local float *) color_225062)[gtid_209621];\n        \n        float b12_209633;\n        \n        b12_209633 = ((__local float *) color_225061)[gtid_209621];\n        \n        float c12_209634;\n        \n        c12_209634 = ((__local float *) color_225060)[gtid_209621];\n        \n        float b2_209635;\n        \n   ",
                   "     b2_209635 = ((__local float *) color_225059)[gtid_209621];\n        \n        float c2_209636;\n        \n        c2_209636 = ((__local float *) color_225058)[gtid_209621];\n        \n        int64_t defunc_0_m_fun_res_209637;\n        \n        defunc_0_m_fun_res_209637 = ((__local\n                                      int64_t *) color_225057)[gtid_209621];\n        \n        bool cond_209639 = sle64(x_209501, gtid_209622);\n        int64_t defunc_0_f_res_209640;\n        \n        if (cond_209639) {\n            defunc_0_f_res_209640 = (int64_t) 0;\n        } else {\n            int64_t i_209641 = add64(gtid_209622, x_209630);\n            int64_t defunc_0_add_arg_209642;\n            \n            defunc_0_add_arg_209642 = ((__global\n                                        int64_t *) ext_mem_222322)[gtid_209492 *\n                                                                   (defunc_0_f_res_196740 *\n                                                                    n_p_196694) +\n                                                                   gtid_209493 *\n                                                                   defunc_0_f_res_196740 +\n                                                                   i_209641];\n            \n            int64_t defunc_1_add_res_209643 = add64((int64_t) 1,\n                                                    defunc_0_add_arg_209642);\n            \n            defunc_0_f_res_209640 = defunc_1_add_res_209643;\n        }\n        \n        float defunc_0_f_res_209644;\n        \n        if (cond_209639) {\n            defunc_0_f_res_209644 = 0.0F;\n        } else {\n            int64_t i_209645 = add64(gtid_209622, x_209630);\n            float defunc_0_add_arg_209646;\n            \n            defunc_0_add_arg_209646 = ((__global\n                                        float *) mem_222588)[gtid_209492 *\n                                                             (defunc_0_f_res_196740 *\n                                                      ",
                   "        n_p_196694) +\n                                                             gtid_209493 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_209645];\n            defunc_0_f_res_209644 = defunc_0_add_arg_209646;\n        }\n        \n        int64_t binop_p_209647 = sub64(defunc_0_f_res_209640,\n                                       defunc_0_m_fun_res_209637);\n        float defunc_0_f_res_209648 = sitofp_i64_f32(binop_p_209647);\n        float abs_res_209649 = (float) fabs(defunc_0_f_res_209648);\n        float tmp1_209650 = abs_res_209649 / x_209631;\n        float x_209651 = tmp1_209650 * tmp1_209650;\n        float y_209652 = tmp1_209650 * x_209651;\n        float tmp2_209653 = 1.0F - y_209652;\n        float x_209654 = tmp2_209653 * tmp2_209653;\n        float tmp3_209655 = tmp2_209653 * x_209654;\n        float tmp4_209656 = defunc_0_f_res_209644 * tmp3_209655;\n        float defunc_1_f_res_209657 = defunc_0_f_res_209648 * tmp4_209656;\n        float defunc_1_f_res_209658 = defunc_0_f_res_209648 *\n              defunc_1_f_res_209657;\n        float defunc_0_f_res_209659;\n        \n        if (cond_209639) {\n            defunc_0_f_res_209659 = 0.0F;\n        } else {\n            int64_t i_209660 = add64(gtid_209622, x_209630);\n            float defunc_0_add_arg_209661;\n            \n            defunc_0_add_arg_209661 = ((__global\n                                        float *) mem_222583)[gtid_209492 *\n                                                             (defunc_0_f_res_196740 *\n                                                              n_p_196694) +\n                                                             gtid_209493 *\n                                                             defunc_0_f_res_196740 +\n                                                             i_209660];\n            defunc_0_f_res_209659 = defunc_0_add_arg_209661;\n        }\n        \n        ",
                   "float x_209662 = a12_209632 * tmp4_209656;\n        float y_209663 = b12_209633 * defunc_1_f_res_209657;\n        float x_209664 = x_209662 + y_209663;\n        float y_209665 = c12_209634 * defunc_1_f_res_209658;\n        float x_209666 = x_209664 + y_209665;\n        float defunc_9_fit_fun_res_209667 = defunc_0_f_res_209659 * x_209666;\n        float x_209668 = b12_209633 * tmp4_209656;\n        float y_209669 = b2_209635 * defunc_1_f_res_209657;\n        float x_209670 = x_209668 + y_209669;\n        float y_209671 = c2_209636 * defunc_1_f_res_209658;\n        float x_209672 = x_209670 + y_209671;\n        float defunc_9_slope_fun_res_209673 = defunc_0_f_res_209659 * x_209672;\n        \n        ((__local float *) red_arr_mem_226653)[gtid_209621 * q_s_196695 +\n                                               gtid_209622] =\n            defunc_9_fit_fun_res_209667;\n        ((__local float *) red_arr_mem_226655)[gtid_209621 * q_s_196695 +\n                                               gtid_209622] =\n            defunc_9_slope_fun_res_209673;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_226657 = s_n_m_196745 * q_s_196695;\n    float x_209624;\n    float x_209625;\n    float x_209626;\n    float x_209627;\n    float x_226660;\n    float x_226661;\n    float x_226662;\n    float x_226663;\n    bool ltid_in_bounds_226666 = slt64(sext_i32_i64(local_tid_226586),\n                                       s_n_m_196745 * q_s_196695);\n    int32_t skip_threads_226667;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_226666) {\n            x_209626 = ((volatile __local\n                         float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)];\n            x_209627 = ((volatile __local\n                         float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)];\n            if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) == 0) {\n                x_209624 = x_209626;\n                x_209625 = x_209627;\n            }\n        }\n   ",
                   " }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_226667 = 1;\n        while (slt32(skip_threads_226667, 32)) {\n            bool thread_active_226668 = sle32(skip_threads_226667,\n                                              local_tid_226586 -\n                                              squot32(local_tid_226586, 32) *\n                                              32) && ltid_in_bounds_226666;\n            \n            if (thread_active_226668) {\n                // read operands\n                {\n                    x_209624 = ((volatile __local\n                                 float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226667)];\n                    x_209625 = ((volatile __local\n                                 float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586) -\n                                                              sext_i32_i64(skip_threads_226667)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_226669 =\n                     slt64(srem64(sext_i32_i64(local_tid_226586), q_s_196695),\n                           sext_i32_i64(local_tid_226586) -\n                           sext_i32_i64(local_tid_226586 -\n                           skip_threads_226667));\n                \n                if (thread_active_226668 && inactive_226669) {\n                    x_209624 = x_209626;\n                    x_209625 = x_209627;\n                }\n                if (thread_active_226668) {\n                    if (!inactive_226669) {\n                        float defunc_1_op_res_209628 = x_209624 + x_209626;\n                        float defunc_1_op_res_209629 = x_209625 + x_209627;\n                        \n                        x_209624 = defunc_1_op_res_209628;\n                        x_209625 = defunc_1_op_res_209629;\n                    }\n                }\n            ",
                   "}\n            if (sle32(wave_sizze_226588, skip_threads_226667)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_226668) {\n                // write result\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)] =\n                        x_209624;\n                    x_209626 = x_209624;\n                    ((volatile __local\n                      float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)] =\n                        x_209625;\n                    x_209627 = x_209625;\n                }\n            }\n            if (sle32(wave_sizze_226588, skip_threads_226667)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_226667 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) == 31 &&\n            ltid_in_bounds_226666) {\n            ((volatile __local\n              float *) red_arr_mem_226653)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209624;\n            ((volatile __local\n              float *) red_arr_mem_226655)[sext_i32_i64(squot32(local_tid_226586,\n                                                                32))] =\n                x_209625;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_226670;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_226586, 32) == 0 && ltid_in_bounds_226666) {\n                x_226662 = ((volatile __local\n                             float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)];\n                x_226663 = ((volatile __local\n                             float",
                   " *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)];\n                if ((local_tid_226586 - squot32(local_tid_226586, 32) * 32) ==\n                    0) {\n                    x_226660 = x_226662;\n                    x_226661 = x_226663;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_226670 = 1;\n            while (slt32(skip_threads_226670, 32)) {\n                bool thread_active_226671 = sle32(skip_threads_226670,\n                                                  local_tid_226586 -\n                                                  squot32(local_tid_226586,\n                                                          32) * 32) &&\n                     (squot32(local_tid_226586, 32) == 0 &&\n                      ltid_in_bounds_226666);\n                \n                if (thread_active_226671) {\n                    // read operands\n                    {\n                        x_226660 = ((volatile __local\n                                     float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226670)];\n                        x_226661 = ((volatile __local\n                                     float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586) -\n                                                                  sext_i32_i64(skip_threads_226670)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_226672 =\n                         slt64(srem64(sext_i32_i64(local_tid_226586 * 32 + 32 -\n                                      1), q_s_196695),\n                               sext_i32_i64(local_tid_226586 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_226586 -\n                                             skip_threads_226670) * 32 + 32 -\n                               1));\n       ",
                   "             \n                    if (thread_active_226671 && inactive_226672) {\n                        x_226660 = x_226662;\n                        x_226661 = x_226663;\n                    }\n                    if (thread_active_226671) {\n                        if (!inactive_226672) {\n                            float defunc_1_op_res_226664 = x_226660 + x_226662;\n                            float defunc_1_op_res_226665 = x_226661 + x_226663;\n                            \n                            x_226660 = defunc_1_op_res_226664;\n                            x_226661 = defunc_1_op_res_226665;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_226588, skip_threads_226670)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_226671) {\n                    // write result\n                    {\n                        ((volatile __local\n                          float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)] =\n                            x_226660;\n                        x_226662 = x_226660;\n                        ((volatile __local\n                          float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)] =\n                            x_226661;\n                        x_226663 = x_226661;\n                    }\n                }\n                if (sle32(wave_sizze_226588, skip_threads_226670)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_226670 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_226673 = squot32(local_tid_226586, 32) == 0 ||\n         !ltid_in_bounds_226666;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_226673) {\n                x_209626 = x_209624;\n                x_209627 = x_209625;\n                x_209624 = ((__local\n                           ",
                   "  float *) red_arr_mem_226653)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                x_209625 = ((__local\n                             float *) red_arr_mem_226655)[sext_i32_i64(squot32(local_tid_226586,\n                                                                               32)) -\n                                                          (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_226674 = slt64(srem64(sext_i32_i64(local_tid_226586),\n                                                q_s_196695),\n                                         sext_i32_i64(local_tid_226586) -\n                                         sext_i32_i64(squot32(local_tid_226586,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_226673) {\n                if (inactive_226674) {\n                    x_209624 = x_209626;\n                    x_209625 = x_209627;\n                }\n            }\n            if (!no_carry_in_226673) {\n                if (!inactive_226674) {\n                    float defunc_1_op_res_209628 = x_209624 + x_209626;\n                    float defunc_1_op_res_209629 = x_209625 + x_209627;\n                    \n                    x_209624 = defunc_1_op_res_209628;\n                    x_209625 = defunc_1_op_res_209629;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_226673) {\n                ((__local\n                  float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)] =\n                    x_209624;\n                ((__local\n                  float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)] =\n                    x_209625;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct val",
                   "ues for first block\n    {\n        if (squot32(local_tid_226586, 32) == 0 && ltid_in_bounds_226666) {\n            ((__local\n              float *) red_arr_mem_226653)[sext_i32_i64(local_tid_226586)] =\n                x_209626;\n            ((__local\n              float *) red_arr_mem_226655)[sext_i32_i64(local_tid_226586)] =\n                x_209627;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226675 = 0; i_226675 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226675++) {\n        float tmp_226676;\n        \n        tmp_226676 = ((__local float *) red_arr_mem_226653)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226675 *\n                                                             computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225056)[i_226675 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226676;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226677 = 0; i_226677 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226677++) {\n        float tmp_226678;\n        \n        tmp_226678 = ((__local float *) red_arr_mem_226655)[q_s_196695 -\n                                                            (int64_t) 1 +\n                                                            (i_226677 *\n                        ",
                   "                                     computed_group_sizze_209331 +\n                                                             sext_i32_i64(local_tid_226586)) *\n                                                            q_s_196695];\n        ((__local float *) color_225055)[i_226677 *\n                                         computed_group_sizze_209331 +\n                                         sext_i32_i64(local_tid_226586)] =\n            tmp_226678;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226679 = 0; i_226679 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226679++) {\n        float tmp_226680;\n        \n        tmp_226680 = ((__local float *) color_225056)[i_226679 *\n                                                      computed_group_sizze_209331 +\n                                                      sext_i32_i64(local_tid_226586)];\n        ((__global float *) mem_223347)[gtid_209492 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209493 * s_n_m_196745 + (i_226679 *\n                                                                      computed_group_sizze_209331 +\n                                                                      sext_i32_i64(local_tid_226586))] =\n            tmp_226680;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    for (int64_t i_226681 = 0; i_226681 < sdiv_up64(s_n_m_196745 -\n                                                    sext_i32_i64(local_tid_226586),\n                                                    computed_group_sizze_209331);\n         i_226681++) {\n        float tmp_226682;\n        \n        tmp_226682 = ((__local float *) color_225055)[i_226681 *\n                                                      computed_group_sizze_209331 +\n             ",
                   "                                         sext_i32_i64(local_tid_226586)];\n        ((__global float *) mem_223352)[gtid_209492 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_209493 * s_n_m_196745 + (i_226681 *\n                                                                      computed_group_sizze_209331 +\n                                                                      sext_i32_i64(local_tid_226586))] =\n            tmp_226682;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_6:\n    return;\n}\n__kernel void mainzisegmap_intragroup_210266(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226970_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226966_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225067_backing_aligned_2,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745, __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n",
                   "                                             unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_223493)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226970_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226970_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226966_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226966_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225067_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225067_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226952;\n    int32_t local_tid_226953;\n    int64_t group_sizze_226956;\n    int32_t wave_sizze_226955;\n    int32_t group_tid_226954;\n    \n    global_tid_226952 = get_global_id(0);\n    local_tid_226953 = get_local_id(0);\n    group_sizze_226956 = get_local_size(0);\n    wave_sizze_226955 = LOCKSTEP_WIDTH;\n    group_tid_226954 = get_group_id(0);\n    \n    int32_t phys_tid_210266 = group_tid_226954;\n    int64_t slice_226958 = q_s_196695;\n    int64_t ltid_pre_226957 = sext_i32_i64(local_tid_226953);\n    int64_t remnant_226959 = sext_i32_i64(local_tid_226953) - ltid_pre_226957;\n    int64_t slice_226960 = s_n_m_196745;\n    int64_t slice_226961 = n_p_196694 * slice_226960;\n    int64_t slice_226962 = m_196691 * slice_226961;\n    int64_t gtid_210263 = squot64(sext_i32_i64(group_tid_226954), slice_226961);\n    int64_t remnant_226963 = sext_i32_i64(group_tid_226954)",
                   " - gtid_210263 *\n            slice_226961;\n    int64_t gtid_210264 = squot64(remnant_226963, slice_226960);\n    int64_t remnant_226964 = remnant_226963 - gtid_210264 * slice_226960;\n    int64_t gtid_210265 = remnant_226964;\n    int64_t remnant_226965 = remnant_226964 - gtid_210265;\n    __local unsigned char *color_225067;\n    \n    color_225067 = (__local unsigned char *) color_225067_backing_0;\n    \n    int64_t x_210273;\n    \n    x_210273 = ((__global int64_t *) ext_mem_222321)[gtid_210263 * n_p_196694 +\n                                                     gtid_210264];\n    \n    int64_t x_210275;\n    \n    x_210275 = ((__global int64_t *) ext_mem_222420)[gtid_210263 *\n                                                     (s_n_m_196745 *\n                                                      n_p_196694) +\n                                                     gtid_210264 *\n                                                     s_n_m_196745 +\n                                                     gtid_210265];\n    \n    float x_210276;\n    \n    x_210276 = ((__global float *) ext_mem_222419)[gtid_210263 * (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                   gtid_210264 * s_n_m_196745 +\n                                                   gtid_210265];\n    \n    bool cond_210277 = gtid_210265 == (int64_t) 0;\n    int64_t defunc_0_m_fun_res_210278;\n    \n    if (cond_210277) {\n        defunc_0_m_fun_res_210278 = (int64_t) 0;\n    } else {\n        int64_t y_210279 = sub64(s_n_m_196745, (int64_t) 1);\n        bool cond_210280 = gtid_210265 == y_210279;\n        int64_t defunc_0_m_fun_res_f_res_210281;\n        \n        if (cond_210280) {\n            int64_t defunc_0_m_fun_res_f_res_t_res_210282 =\n                    sub64(pad_css_len_196741, (int64_t) 1);\n            \n            defunc_0_m_fun_res_f_res_210281 =\n                defunc_0_m_fun_res_f_res_t_res_210282;\n        } else {\n            int",
                   "64_t x_210283 = sub64(gtid_210265, (int64_t) 1);\n            int64_t x_210284 = mul64(jump_s_196701, x_210283);\n            int64_t min_arg_210285 = add64((int64_t) 1, x_210284);\n            int64_t min_res_210286 = smin64(defunc_0_f_res_196740,\n                                            min_arg_210285);\n            \n            defunc_0_m_fun_res_f_res_210281 = min_res_210286;\n        }\n        defunc_0_m_fun_res_210278 = defunc_0_m_fun_res_f_res_210281;\n    }\n    \n    float defunc_2_reduce_res_210287;\n    int64_t gtid_210289 = sext_i32_i64(sext_i64_i32(ltid_pre_226957));\n    int32_t phys_tid_210290 = local_tid_226953;\n    __local unsigned char *red_arr_mem_226966;\n    \n    red_arr_mem_226966 = (__local unsigned char *) red_arr_mem_226966_backing_1;\n    \n    bool cond_210295 = sle64(x_210273, gtid_210289);\n    int64_t defunc_0_f_res_210296;\n    \n    if (cond_210295) {\n        defunc_0_f_res_210296 = (int64_t) 0;\n    } else {\n        int64_t i_210297 = add64(x_210275, gtid_210289);\n        int64_t defunc_0_add_arg_210298;\n        \n        defunc_0_add_arg_210298 = ((__global\n                                    int64_t *) ext_mem_222322)[gtid_210263 *\n                                                               (defunc_0_f_res_196740 *\n                                                                n_p_196694) +\n                                                               gtid_210264 *\n                                                               defunc_0_f_res_196740 +\n                                                               i_210297];\n        \n        int64_t defunc_1_add_res_210299 = add64((int64_t) 1,\n                                                defunc_0_add_arg_210298);\n        \n        defunc_0_f_res_210296 = defunc_1_add_res_210299;\n    }\n    \n    float defunc_0_f_res_210300;\n    \n    if (cond_210295) {\n        defunc_0_f_res_210300 = 0.0F;\n    } else {\n        int64_t i_210301 = add64(x_210275, gtid_210289);\n        float defunc_0_add_arg_21030",
                   "2;\n        \n        defunc_0_add_arg_210302 = ((__global float *) mem_222588)[gtid_210263 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_210264 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_210301];\n        defunc_0_f_res_210300 = defunc_0_add_arg_210302;\n    }\n    \n    int64_t binop_p_210303 = sub64(defunc_0_f_res_210296,\n                                   defunc_0_m_fun_res_210278);\n    float defunc_0_f_res_210304 = sitofp_i64_f32(binop_p_210303);\n    float abs_res_210305 = (float) fabs(defunc_0_f_res_210304);\n    float tmp1_210306 = abs_res_210305 / x_210276;\n    float x_210307 = tmp1_210306 * tmp1_210306;\n    float y_210308 = tmp1_210306 * x_210307;\n    float tmp2_210309 = 1.0F - y_210308;\n    float x_210310 = tmp2_210309 * tmp2_210309;\n    float tmp3_210311 = tmp2_210309 * x_210310;\n    float tmp4_210312 = defunc_0_f_res_210300 * tmp3_210311;\n    \n    ((__local float *) red_arr_mem_226966)[gtid_210289] = tmp4_210312;\n    ((__local float *) color_225067)[gtid_210289] = tmp4_210312;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_226968;\n    int32_t skip_waves_226969 = 1;\n    float x_210291;\n    float x_210292;\n    \n    offset_226968 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_226953, sext_i64_i32(q_s_196695))) {\n            x_210291 = ((__local\n                         float *) red_arr_mem_226966)[sext_i32_i64(local_tid_226953 +\n                                                      offset_226968)];\n        }\n    }\n    offset_226968 = 1;\n    while (slt32(offset_226968, wave_sizze_226955)) {\n        if (slt32(local_tid_226953 + offset_226968, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_22695",
                   "3 - squot32(local_tid_226953, wave_sizze_226955) *\n              wave_sizze_226955) & (2 * offset_226968 - 1)) == 0) {\n            // read array element\n            {\n                x_210292 = ((volatile __local\n                             float *) red_arr_mem_226966)[sext_i32_i64(local_tid_226953 +\n                                                          offset_226968)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210293 = x_210291 + x_210292;\n                \n                x_210291 = defunc_1_op_res_210293;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_226966)[sext_i32_i64(local_tid_226953)] =\n                    x_210291;\n            }\n        }\n        offset_226968 *= 2;\n    }\n    while (slt32(skip_waves_226969, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_226955 - 1,\n                                            wave_sizze_226955))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_226968 = skip_waves_226969 * wave_sizze_226955;\n        if (slt32(local_tid_226953 + offset_226968, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226953 - squot32(local_tid_226953, wave_sizze_226955) *\n              wave_sizze_226955) == 0 && (squot32(local_tid_226953,\n                                                  wave_sizze_226955) & (2 *\n                                                                        skip_waves_226969 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210292 = ((__local\n                             float *) red_arr_mem_226966)[sext_i32_i64(local_tid_226953 +\n                                                          offset_226968)];\n            }\n            // apply reduction operation\n            {\n                float de",
                   "func_1_op_res_210293 = x_210291 + x_210292;\n                \n                x_210291 = defunc_1_op_res_210293;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_226966)[sext_i32_i64(local_tid_226953)] =\n                    x_210291;\n            }\n        }\n        skip_waves_226969 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210287 = ((__local\n                                   float *) red_arr_mem_226966)[(int64_t) 0];\n    \n    float a0_210313 = 1.0F / defunc_2_reduce_res_210287;\n    float defunc_2_reduce_res_210314;\n    int64_t gtid_210315 = sext_i32_i64(sext_i64_i32(ltid_pre_226957));\n    int32_t phys_tid_210316 = local_tid_226953;\n    __local unsigned char *red_arr_mem_226970;\n    \n    red_arr_mem_226970 = (__local unsigned char *) red_arr_mem_226970_backing_2;\n    \n    float x_210321;\n    \n    x_210321 = ((__local float *) color_225067)[gtid_210315];\n    \n    bool cond_210322 = sle64(x_210273, gtid_210315);\n    float defunc_0_f_res_210323;\n    \n    if (cond_210322) {\n        defunc_0_f_res_210323 = 0.0F;\n    } else {\n        int64_t i_210324 = add64(x_210275, gtid_210315);\n        float defunc_0_add_arg_210325;\n        \n        defunc_0_add_arg_210325 = ((__global float *) mem_222583)[gtid_210263 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_210264 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_210324];\n        defunc_0_f_res_210323 = defunc_0_add_arg_210325;\n    }\n    \n    float x_210326 = a0_210313 * x_210321;\n    float defunc_9_fit_fun_res_210327 = defunc_0_f_res_210323 * x_210326;\n    \n    ((__local float *) red_arr_mem_226970)[gtid_210315] =",
                   "\n        defunc_9_fit_fun_res_210327;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_226972;\n    int32_t skip_waves_226973 = 1;\n    float x_210317;\n    float x_210318;\n    \n    offset_226972 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_226953, sext_i64_i32(q_s_196695))) {\n            x_210317 = ((__local\n                         float *) red_arr_mem_226970)[sext_i32_i64(local_tid_226953 +\n                                                      offset_226972)];\n        }\n    }\n    offset_226972 = 1;\n    while (slt32(offset_226972, wave_sizze_226955)) {\n        if (slt32(local_tid_226953 + offset_226972, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226953 - squot32(local_tid_226953, wave_sizze_226955) *\n              wave_sizze_226955) & (2 * offset_226972 - 1)) == 0) {\n            // read array element\n            {\n                x_210318 = ((volatile __local\n                             float *) red_arr_mem_226970)[sext_i32_i64(local_tid_226953 +\n                                                          offset_226972)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210319 = x_210317 + x_210318;\n                \n                x_210317 = defunc_1_op_res_210319;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_226970)[sext_i32_i64(local_tid_226953)] =\n                    x_210317;\n            }\n        }\n        offset_226972 *= 2;\n    }\n    while (slt32(skip_waves_226973, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_226955 - 1,\n                                            wave_sizze_226955))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_226972 = skip_waves_226973 * wave_sizze_226955;\n        if (slt32(local_tid_226953 + offset_226972, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226953 -",
                   " squot32(local_tid_226953, wave_sizze_226955) *\n              wave_sizze_226955) == 0 && (squot32(local_tid_226953,\n                                                  wave_sizze_226955) & (2 *\n                                                                        skip_waves_226973 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210318 = ((__local\n                             float *) red_arr_mem_226970)[sext_i32_i64(local_tid_226953 +\n                                                          offset_226972)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210319 = x_210317 + x_210318;\n                \n                x_210317 = defunc_1_op_res_210319;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_226970)[sext_i32_i64(local_tid_226953)] =\n                    x_210317;\n            }\n        }\n        skip_waves_226973 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210314 = ((__local\n                                   float *) red_arr_mem_226970)[(int64_t) 0];\n    if (local_tid_226953 == 0) {\n        ((__global float *) mem_223493)[gtid_210263 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_210264 * s_n_m_196745 +\n                                        gtid_210265] =\n            defunc_2_reduce_res_210314;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzisegmap_intragroup_210587(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226998_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226996_back",
                   "ing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226992_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226990_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_226988_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225069_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *color_225068_backing_aligned_6,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745, __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n                                             unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_223507,\n                                ",
                   "             __global unsigned char *mem_223512)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226998_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226998_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226996_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226996_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226992_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226992_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226990_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226990_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_226988_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226988_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225069_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225069_backing_aligned_5;\n    __local volatile unsigned char *restrict color_225068_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225068_backing_aligned_6;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226974;\n    int32_t local_tid_226975;\n    int64_t group_sizze_226978;\n    int32_t wave_sizze_226977;\n    int32_t group_tid_226976;\n    \n    global_tid_226974 = get_global_id(0);\n    local_tid_226975 = get_local_id(0);\n    group_sizze_226978 = get_local_size(0);\n  ",
                   "  wave_sizze_226977 = LOCKSTEP_WIDTH;\n    group_tid_226976 = get_group_id(0);\n    \n    int32_t phys_tid_210587 = group_tid_226976;\n    int64_t slice_226980 = q_s_196695;\n    int64_t ltid_pre_226979 = sext_i32_i64(local_tid_226975);\n    int64_t remnant_226981 = sext_i32_i64(local_tid_226975) - ltid_pre_226979;\n    int64_t slice_226982 = s_n_m_196745;\n    int64_t slice_226983 = n_p_196694 * slice_226982;\n    int64_t slice_226984 = m_196691 * slice_226983;\n    int64_t gtid_210584 = squot64(sext_i32_i64(group_tid_226976), slice_226983);\n    int64_t remnant_226985 = sext_i32_i64(group_tid_226976) - gtid_210584 *\n            slice_226983;\n    int64_t gtid_210585 = squot64(remnant_226985, slice_226982);\n    int64_t remnant_226986 = remnant_226985 - gtid_210585 * slice_226982;\n    int64_t gtid_210586 = remnant_226986;\n    int64_t remnant_226987 = remnant_226986 - gtid_210586;\n    __local unsigned char *color_225068;\n    \n    color_225068 = (__local unsigned char *) color_225068_backing_0;\n    \n    __local unsigned char *color_225069;\n    \n    color_225069 = (__local unsigned char *) color_225069_backing_1;\n    \n    int64_t x_210594;\n    \n    x_210594 = ((__global int64_t *) ext_mem_222321)[gtid_210584 * n_p_196694 +\n                                                     gtid_210585];\n    \n    int64_t x_210596;\n    \n    x_210596 = ((__global int64_t *) ext_mem_222420)[gtid_210584 *\n                                                     (s_n_m_196745 *\n                                                      n_p_196694) +\n                                                     gtid_210585 *\n                                                     s_n_m_196745 +\n                                                     gtid_210586];\n    \n    float x_210597;\n    \n    x_210597 = ((__global float *) ext_mem_222419)[gtid_210584 * (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                   gtid_210585 * s_n_m_19674",
                   "5 +\n                                                   gtid_210586];\n    \n    bool cond_210598 = gtid_210586 == (int64_t) 0;\n    int64_t defunc_0_m_fun_res_210599;\n    \n    if (cond_210598) {\n        defunc_0_m_fun_res_210599 = (int64_t) 0;\n    } else {\n        int64_t y_210600 = sub64(s_n_m_196745, (int64_t) 1);\n        bool cond_210601 = gtid_210586 == y_210600;\n        int64_t defunc_0_m_fun_res_f_res_210602;\n        \n        if (cond_210601) {\n            int64_t defunc_0_m_fun_res_f_res_t_res_210603 =\n                    sub64(pad_css_len_196741, (int64_t) 1);\n            \n            defunc_0_m_fun_res_f_res_210602 =\n                defunc_0_m_fun_res_f_res_t_res_210603;\n        } else {\n            int64_t x_210604 = sub64(gtid_210586, (int64_t) 1);\n            int64_t x_210605 = mul64(jump_s_196701, x_210604);\n            int64_t min_arg_210606 = add64((int64_t) 1, x_210605);\n            int64_t min_res_210607 = smin64(defunc_0_f_res_196740,\n                                            min_arg_210606);\n            \n            defunc_0_m_fun_res_f_res_210602 = min_res_210607;\n        }\n        defunc_0_m_fun_res_210599 = defunc_0_m_fun_res_f_res_210602;\n    }\n    \n    float defunc_2_reduce_res_210608;\n    float defunc_2_reduce_res_210609;\n    float defunc_2_reduce_res_210610;\n    int64_t gtid_210613 = sext_i32_i64(sext_i64_i32(ltid_pre_226979));\n    int32_t phys_tid_210614 = local_tid_226975;\n    __local unsigned char *red_arr_mem_226988;\n    \n    red_arr_mem_226988 = (__local unsigned char *) red_arr_mem_226988_backing_2;\n    \n    __local unsigned char *red_arr_mem_226990;\n    \n    red_arr_mem_226990 = (__local unsigned char *) red_arr_mem_226990_backing_3;\n    \n    __local unsigned char *red_arr_mem_226992;\n    \n    red_arr_mem_226992 = (__local unsigned char *) red_arr_mem_226992_backing_4;\n    \n    bool cond_210625 = sle64(x_210594, gtid_210613);\n    int64_t defunc_0_f_res_210626;\n    \n    if (cond_210625) {\n        defunc_0_f_res_210626 = (int64_t) 0;\n  ",
                   "  } else {\n        int64_t i_210627 = add64(x_210596, gtid_210613);\n        int64_t defunc_0_add_arg_210628;\n        \n        defunc_0_add_arg_210628 = ((__global\n                                    int64_t *) ext_mem_222322)[gtid_210584 *\n                                                               (defunc_0_f_res_196740 *\n                                                                n_p_196694) +\n                                                               gtid_210585 *\n                                                               defunc_0_f_res_196740 +\n                                                               i_210627];\n        \n        int64_t defunc_1_add_res_210629 = add64((int64_t) 1,\n                                                defunc_0_add_arg_210628);\n        \n        defunc_0_f_res_210626 = defunc_1_add_res_210629;\n    }\n    \n    float defunc_0_f_res_210630;\n    \n    if (cond_210625) {\n        defunc_0_f_res_210630 = 0.0F;\n    } else {\n        int64_t i_210631 = add64(x_210596, gtid_210613);\n        float defunc_0_add_arg_210632;\n        \n        defunc_0_add_arg_210632 = ((__global float *) mem_222588)[gtid_210584 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_210585 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_210631];\n        defunc_0_f_res_210630 = defunc_0_add_arg_210632;\n    }\n    \n    int64_t binop_p_210633 = sub64(defunc_0_f_res_210626,\n                                   defunc_0_m_fun_res_210599);\n    float defunc_0_f_res_210634 = sitofp_i64_f32(binop_p_210633);\n    float abs_res_210635 = (float) fabs(defunc_0_f_res_210634);\n    float tmp1_210636 = abs_res_210635 / x_210597;\n    float x_210637 = tmp1_210636 * tmp1_210636;\n ",
                   "   float y_210638 = tmp1_210636 * x_210637;\n    float tmp2_210639 = 1.0F - y_210638;\n    float x_210640 = tmp2_210639 * tmp2_210639;\n    float tmp3_210641 = tmp2_210639 * x_210640;\n    float tmp4_210642 = defunc_0_f_res_210630 * tmp3_210641;\n    float defunc_1_f_res_210643 = defunc_0_f_res_210634 * tmp4_210642;\n    float defunc_1_f_res_210644 = defunc_0_f_res_210634 * defunc_1_f_res_210643;\n    \n    ((__local float *) red_arr_mem_226988)[gtid_210613] = tmp4_210642;\n    ((__local float *) red_arr_mem_226990)[gtid_210613] = defunc_1_f_res_210643;\n    ((__local float *) red_arr_mem_226992)[gtid_210613] = defunc_1_f_res_210644;\n    ((__local float *) color_225069)[gtid_210613] = defunc_1_f_res_210643;\n    ((__local float *) color_225068)[gtid_210613] = tmp4_210642;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_226994;\n    int32_t skip_waves_226995 = 1;\n    float x_210615;\n    float x_210616;\n    float x_210617;\n    float x_210618;\n    float x_210619;\n    float x_210620;\n    \n    offset_226994 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_226975, sext_i64_i32(q_s_196695))) {\n            x_210615 = ((__local\n                         float *) red_arr_mem_226988)[sext_i32_i64(local_tid_226975 +\n                                                      offset_226994)];\n            x_210616 = ((__local\n                         float *) red_arr_mem_226990)[sext_i32_i64(local_tid_226975 +\n                                                      offset_226994)];\n            x_210617 = ((__local\n                         float *) red_arr_mem_226992)[sext_i32_i64(local_tid_226975 +\n                                                      offset_226994)];\n        }\n    }\n    offset_226994 = 1;\n    while (slt32(offset_226994, wave_sizze_226977)) {\n        if (slt32(local_tid_226975 + offset_226994, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226975 - squot32(local_tid_226975, wave_sizze_226977) *\n              wave_sizze_22697",
                   "7) & (2 * offset_226994 - 1)) == 0) {\n            // read array element\n            {\n                x_210618 = ((volatile __local\n                             float *) red_arr_mem_226988)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n                x_210619 = ((volatile __local\n                             float *) red_arr_mem_226990)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n                x_210620 = ((volatile __local\n                             float *) red_arr_mem_226992)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210621 = x_210615 + x_210618;\n                float defunc_1_op_res_210622 = x_210616 + x_210619;\n                float defunc_1_op_res_210623 = x_210617 + x_210620;\n                \n                x_210615 = defunc_1_op_res_210621;\n                x_210616 = defunc_1_op_res_210622;\n                x_210617 = defunc_1_op_res_210623;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_226988)[sext_i32_i64(local_tid_226975)] =\n                    x_210615;\n                ((volatile __local\n                  float *) red_arr_mem_226990)[sext_i32_i64(local_tid_226975)] =\n                    x_210616;\n                ((volatile __local\n                  float *) red_arr_mem_226992)[sext_i32_i64(local_tid_226975)] =\n                    x_210617;\n            }\n        }\n        offset_226994 *= 2;\n    }\n    while (slt32(skip_waves_226995, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_226977 - 1,\n                                            wave_sizze_226977))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_226994 = skip_w",
                   "aves_226995 * wave_sizze_226977;\n        if (slt32(local_tid_226975 + offset_226994, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226975 - squot32(local_tid_226975, wave_sizze_226977) *\n              wave_sizze_226977) == 0 && (squot32(local_tid_226975,\n                                                  wave_sizze_226977) & (2 *\n                                                                        skip_waves_226995 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210618 = ((__local\n                             float *) red_arr_mem_226988)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n                x_210619 = ((__local\n                             float *) red_arr_mem_226990)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n                x_210620 = ((__local\n                             float *) red_arr_mem_226992)[sext_i32_i64(local_tid_226975 +\n                                                          offset_226994)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210621 = x_210615 + x_210618;\n                float defunc_1_op_res_210622 = x_210616 + x_210619;\n                float defunc_1_op_res_210623 = x_210617 + x_210620;\n                \n                x_210615 = defunc_1_op_res_210621;\n                x_210616 = defunc_1_op_res_210622;\n                x_210617 = defunc_1_op_res_210623;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_226988)[sext_i32_i64(local_tid_226975)] =\n                    x_210615;\n                ((__local\n                  float *) red_arr_mem_226990)[sext_i32_i64(local_tid_226975)] =\n                    x_210616;\n                ((__local\n      ",
                   "            float *) red_arr_mem_226992)[sext_i32_i64(local_tid_226975)] =\n                    x_210617;\n            }\n        }\n        skip_waves_226995 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210608 = ((__local\n                                   float *) red_arr_mem_226988)[(int64_t) 0];\n    defunc_2_reduce_res_210609 = ((__local\n                                   float *) red_arr_mem_226990)[(int64_t) 0];\n    defunc_2_reduce_res_210610 = ((__local\n                                   float *) red_arr_mem_226992)[(int64_t) 0];\n    \n    float x_210645 = defunc_2_reduce_res_210608 * defunc_2_reduce_res_210610;\n    float y_210646 = defunc_2_reduce_res_210609 * defunc_2_reduce_res_210609;\n    float y_210647 = x_210645 - y_210646;\n    float det1_210648 = 1.0F / y_210647;\n    float a11_210649 = defunc_2_reduce_res_210610 * det1_210648;\n    float x_210650 = 0.0F - defunc_2_reduce_res_210609;\n    float b11_210651 = det1_210648 * x_210650;\n    float c11_210652 = defunc_2_reduce_res_210608 * det1_210648;\n    float defunc_2_reduce_res_210653;\n    float defunc_2_reduce_res_210654;\n    int64_t gtid_210655 = sext_i32_i64(sext_i64_i32(ltid_pre_226979));\n    int32_t phys_tid_210656 = local_tid_226975;\n    __local unsigned char *red_arr_mem_226996;\n    \n    red_arr_mem_226996 = (__local unsigned char *) red_arr_mem_226996_backing_5;\n    \n    __local unsigned char *red_arr_mem_226998;\n    \n    red_arr_mem_226998 = (__local unsigned char *) red_arr_mem_226998_backing_6;\n    \n    float x_210664;\n    \n    x_210664 = ((__local float *) color_225068)[gtid_210655];\n    \n    float x_210665;\n    \n    x_210665 = ((__local float *) color_225069)[gtid_210655];\n    \n    bool cond_210666 = sle64(x_210594, gtid_210655);\n    float defunc_0_f_res_210667;\n    \n    if (cond_210666) {\n        defunc_0_f_res_210667 = 0.0F;\n    } else {\n        int64_t i_210668 = add64(x_210596, gtid_210655);\n        float defunc_0_add_arg_210669;\n        \n        defunc_0_add_arg_210669 = ",
                   "((__global float *) mem_222583)[gtid_210584 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_210585 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_210668];\n        defunc_0_f_res_210667 = defunc_0_add_arg_210669;\n    }\n    \n    float x_210670 = a11_210649 * x_210664;\n    float y_210671 = b11_210651 * x_210665;\n    float x_210672 = x_210670 + y_210671;\n    float defunc_9_fit_fun_res_210673 = defunc_0_f_res_210667 * x_210672;\n    float x_210674 = b11_210651 * x_210664;\n    float y_210675 = c11_210652 * x_210665;\n    float x_210676 = x_210674 + y_210675;\n    float defunc_9_slope_fun_res_210677 = defunc_0_f_res_210667 * x_210676;\n    \n    ((__local float *) red_arr_mem_226996)[gtid_210655] =\n        defunc_9_fit_fun_res_210673;\n    ((__local float *) red_arr_mem_226998)[gtid_210655] =\n        defunc_9_slope_fun_res_210677;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227000;\n    int32_t skip_waves_227001 = 1;\n    float x_210657;\n    float x_210658;\n    float x_210659;\n    float x_210660;\n    \n    offset_227000 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_226975, sext_i64_i32(q_s_196695))) {\n            x_210657 = ((__local\n                         float *) red_arr_mem_226996)[sext_i32_i64(local_tid_226975 +\n                                                      offset_227000)];\n            x_210658 = ((__local\n                         float *) red_arr_mem_226998)[sext_i32_i64(local_tid_226975 +\n                                                      offset_227000)];\n        }\n    }\n    offset_227000 = 1;\n    while (slt32(offset_227000, wave_sizze_226977)) {\n        if (slt32(local_tid_226975 + offset_227000, s",
                   "ext_i64_i32(q_s_196695)) &&\n            ((local_tid_226975 - squot32(local_tid_226975, wave_sizze_226977) *\n              wave_sizze_226977) & (2 * offset_227000 - 1)) == 0) {\n            // read array element\n            {\n                x_210659 = ((volatile __local\n                             float *) red_arr_mem_226996)[sext_i32_i64(local_tid_226975 +\n                                                          offset_227000)];\n                x_210660 = ((volatile __local\n                             float *) red_arr_mem_226998)[sext_i32_i64(local_tid_226975 +\n                                                          offset_227000)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210661 = x_210657 + x_210659;\n                float defunc_1_op_res_210662 = x_210658 + x_210660;\n                \n                x_210657 = defunc_1_op_res_210661;\n                x_210658 = defunc_1_op_res_210662;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_226996)[sext_i32_i64(local_tid_226975)] =\n                    x_210657;\n                ((volatile __local\n                  float *) red_arr_mem_226998)[sext_i32_i64(local_tid_226975)] =\n                    x_210658;\n            }\n        }\n        offset_227000 *= 2;\n    }\n    while (slt32(skip_waves_227001, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_226977 - 1,\n                                            wave_sizze_226977))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227000 = skip_waves_227001 * wave_sizze_226977;\n        if (slt32(local_tid_226975 + offset_227000, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_226975 - squot32(local_tid_226975, wave_sizze_226977) *\n              wave_sizze_226977) == 0 && (squot32(local_tid_226975,\n                                                  wave_sizze_226977) & (2 *\n",
                   "                                                                        skip_waves_227001 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_210659 = ((__local\n                             float *) red_arr_mem_226996)[sext_i32_i64(local_tid_226975 +\n                                                          offset_227000)];\n                x_210660 = ((__local\n                             float *) red_arr_mem_226998)[sext_i32_i64(local_tid_226975 +\n                                                          offset_227000)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_210661 = x_210657 + x_210659;\n                float defunc_1_op_res_210662 = x_210658 + x_210660;\n                \n                x_210657 = defunc_1_op_res_210661;\n                x_210658 = defunc_1_op_res_210662;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_226996)[sext_i32_i64(local_tid_226975)] =\n                    x_210657;\n                ((__local\n                  float *) red_arr_mem_226998)[sext_i32_i64(local_tid_226975)] =\n                    x_210658;\n            }\n        }\n        skip_waves_227001 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_210653 = ((__local\n                                   float *) red_arr_mem_226996)[(int64_t) 0];\n    defunc_2_reduce_res_210654 = ((__local\n                                   float *) red_arr_mem_226998)[(int64_t) 0];\n    if (local_tid_226975 == 0) {\n        ((__global float *) mem_223507)[gtid_210584 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_210585 * s_n_m_196745 +\n                                        gtid_210586] =\n            defunc_2_reduce_res_210653;\n    }\n    if (loc",
                   "al_tid_226975 == 0) {\n        ((__global float *) mem_223512)[gtid_210584 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_210585 * s_n_m_196745 +\n                                        gtid_210586] =\n            defunc_2_reduce_res_210654;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzisegmap_intragroup_211038(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227030_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227028_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227024_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227022_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227020_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227018_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *red_arr_mem_227016_backing_aligned_6,\n                                             __local volatile\n                                             int64_t *color_225073_backing_aligned_7,\n                                             __local volatile\n                                             int64_t *color_225072_backing_aligned_8,\n                                             __local volatile\n                                             int64_t *color_225071_backing_aligned_9,\n                                          ",
                   "   __local volatile\n                                             int64_t *color_225070_backing_aligned_10,\n                                             int64_t m_196691,\n                                             int64_t n_p_196694,\n                                             int64_t q_s_196695,\n                                             int64_t jump_s_196701,\n                                             int64_t defunc_0_f_res_196740,\n                                             int64_t pad_css_len_196741,\n                                             int64_t s_n_m_196745, __global\n                                             unsigned char *ext_mem_222321,\n                                             __global\n                                             unsigned char *ext_mem_222322,\n                                             __global\n                                             unsigned char *ext_mem_222419,\n                                             __global\n                                             unsigned char *ext_mem_222420,\n                                             __global unsigned char *mem_222583,\n                                             __global unsigned char *mem_222588,\n                                             __global unsigned char *mem_223533,\n                                             __global unsigned char *mem_223538)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227030_backing_10 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227030_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227028_backing_9 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227028_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_227024_backing_8 =\n        ",
                   "                           (__local volatile\n                                    unsigned char *) red_arr_mem_227024_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_227022_backing_7 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227022_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_227020_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227020_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_227018_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227018_backing_aligned_5;\n    __local volatile unsigned char *restrict red_arr_mem_227016_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227016_backing_aligned_6;\n    __local volatile unsigned char *restrict color_225073_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225073_backing_aligned_7;\n    __local volatile unsigned char *restrict color_225072_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225072_backing_aligned_8;\n    __local volatile unsigned char *restrict color_225071_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225071_backing_aligned_9;\n    __local volatile unsigned char *restrict color_225070_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225070_backing_aligned_10;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227002;\n    int32_t local_tid_227003;\n    int64_t group_sizze_227006;\n  ",
                   "  int32_t wave_sizze_227005;\n    int32_t group_tid_227004;\n    \n    global_tid_227002 = get_global_id(0);\n    local_tid_227003 = get_local_id(0);\n    group_sizze_227006 = get_local_size(0);\n    wave_sizze_227005 = LOCKSTEP_WIDTH;\n    group_tid_227004 = get_group_id(0);\n    \n    int32_t phys_tid_211038 = group_tid_227004;\n    int64_t slice_227008 = q_s_196695;\n    int64_t ltid_pre_227007 = sext_i32_i64(local_tid_227003);\n    int64_t remnant_227009 = sext_i32_i64(local_tid_227003) - ltid_pre_227007;\n    int64_t slice_227010 = s_n_m_196745;\n    int64_t slice_227011 = n_p_196694 * slice_227010;\n    int64_t slice_227012 = m_196691 * slice_227011;\n    int64_t gtid_211035 = squot64(sext_i32_i64(group_tid_227004), slice_227011);\n    int64_t remnant_227013 = sext_i32_i64(group_tid_227004) - gtid_211035 *\n            slice_227011;\n    int64_t gtid_211036 = squot64(remnant_227013, slice_227010);\n    int64_t remnant_227014 = remnant_227013 - gtid_211036 * slice_227010;\n    int64_t gtid_211037 = remnant_227014;\n    int64_t remnant_227015 = remnant_227014 - gtid_211037;\n    __local unsigned char *color_225070;\n    \n    color_225070 = (__local unsigned char *) color_225070_backing_0;\n    \n    __local unsigned char *color_225071;\n    \n    color_225071 = (__local unsigned char *) color_225071_backing_1;\n    \n    __local unsigned char *color_225072;\n    \n    color_225072 = (__local unsigned char *) color_225072_backing_2;\n    \n    __local unsigned char *color_225073;\n    \n    color_225073 = (__local unsigned char *) color_225073_backing_3;\n    \n    int64_t x_211045;\n    \n    x_211045 = ((__global int64_t *) ext_mem_222321)[gtid_211035 * n_p_196694 +\n                                                     gtid_211036];\n    \n    int64_t x_211047;\n    \n    x_211047 = ((__global int64_t *) ext_mem_222420)[gtid_211035 *\n                                                     (s_n_m_196745 *\n                                                      n_p_196694) +\n                                     ",
                   "                gtid_211036 *\n                                                     s_n_m_196745 +\n                                                     gtid_211037];\n    \n    float x_211048;\n    \n    x_211048 = ((__global float *) ext_mem_222419)[gtid_211035 * (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                   gtid_211036 * s_n_m_196745 +\n                                                   gtid_211037];\n    \n    bool cond_211049 = gtid_211037 == (int64_t) 0;\n    int64_t defunc_0_m_fun_res_211050;\n    \n    if (cond_211049) {\n        defunc_0_m_fun_res_211050 = (int64_t) 0;\n    } else {\n        int64_t y_211051 = sub64(s_n_m_196745, (int64_t) 1);\n        bool cond_211052 = gtid_211037 == y_211051;\n        int64_t defunc_0_m_fun_res_f_res_211053;\n        \n        if (cond_211052) {\n            int64_t defunc_0_m_fun_res_f_res_t_res_211054 =\n                    sub64(pad_css_len_196741, (int64_t) 1);\n            \n            defunc_0_m_fun_res_f_res_211053 =\n                defunc_0_m_fun_res_f_res_t_res_211054;\n        } else {\n            int64_t x_211055 = sub64(gtid_211037, (int64_t) 1);\n            int64_t x_211056 = mul64(jump_s_196701, x_211055);\n            int64_t min_arg_211057 = add64((int64_t) 1, x_211056);\n            int64_t min_res_211058 = smin64(defunc_0_f_res_196740,\n                                            min_arg_211057);\n            \n            defunc_0_m_fun_res_f_res_211053 = min_res_211058;\n        }\n        defunc_0_m_fun_res_211050 = defunc_0_m_fun_res_f_res_211053;\n    }\n    \n    int64_t gtid_211061 = sext_i32_i64(sext_i64_i32(ltid_pre_227007));\n    int32_t phys_tid_211062 = local_tid_227003;\n    bool cond_211064 = sle64(x_211045, gtid_211061);\n    int64_t defunc_0_f_res_211065;\n    \n    if (cond_211064) {\n        defunc_0_f_res_211065 = (int64_t) 0;\n    } else {\n        int64_t i_211066 = add64(x_211047, gtid_211061);\n        int64_t defunc_0_add",
                   "_arg_211067;\n        \n        defunc_0_add_arg_211067 = ((__global\n                                    int64_t *) ext_mem_222322)[gtid_211035 *\n                                                               (defunc_0_f_res_196740 *\n                                                                n_p_196694) +\n                                                               gtid_211036 *\n                                                               defunc_0_f_res_196740 +\n                                                               i_211066];\n        \n        int64_t defunc_1_add_res_211068 = add64((int64_t) 1,\n                                                defunc_0_add_arg_211067);\n        \n        defunc_0_f_res_211065 = defunc_1_add_res_211068;\n    }\n    \n    float defunc_0_f_res_211069;\n    \n    if (cond_211064) {\n        defunc_0_f_res_211069 = 0.0F;\n    } else {\n        int64_t i_211070 = add64(x_211047, gtid_211061);\n        float defunc_0_add_arg_211071;\n        \n        defunc_0_add_arg_211071 = ((__global float *) mem_222588)[gtid_211035 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_211036 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_211070];\n        defunc_0_f_res_211069 = defunc_0_add_arg_211071;\n    }\n    \n    int64_t binop_p_211072 = sub64(defunc_0_f_res_211065,\n                                   defunc_0_m_fun_res_211050);\n    float defunc_0_f_res_211073 = sitofp_i64_f32(binop_p_211072);\n    float abs_res_211074 = (float) fabs(defunc_0_f_res_211073);\n    float tmp1_211075 = abs_res_211074 / x_211048;\n    float x_211076 = tmp1_211075 * tmp1_211075;\n    float y_211077 = tmp1_211075 * x_211076;\n    float tmp2_211078 = 1.0F - y_211077;\n    float x",
                   "_211079 = tmp2_211078 * tmp2_211078;\n    float tmp3_211080 = tmp2_211078 * x_211079;\n    float tmp4_211081 = defunc_0_f_res_211069 * tmp3_211080;\n    \n    ((__local float *) color_225073)[gtid_211061] = defunc_0_f_res_211073;\n    ((__local float *) color_225072)[gtid_211061] = tmp4_211081;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float defunc_2_reduce_res_211082;\n    float defunc_2_reduce_res_211083;\n    float defunc_2_reduce_res_211084;\n    float defunc_2_reduce_res_211085;\n    float defunc_2_reduce_res_211086;\n    int64_t gtid_211089 = sext_i32_i64(sext_i64_i32(ltid_pre_227007));\n    int32_t phys_tid_211090 = local_tid_227003;\n    __local unsigned char *red_arr_mem_227016;\n    \n    red_arr_mem_227016 = (__local unsigned char *) red_arr_mem_227016_backing_4;\n    \n    __local unsigned char *red_arr_mem_227018;\n    \n    red_arr_mem_227018 = (__local unsigned char *) red_arr_mem_227018_backing_5;\n    \n    __local unsigned char *red_arr_mem_227020;\n    \n    red_arr_mem_227020 = (__local unsigned char *) red_arr_mem_227020_backing_6;\n    \n    __local unsigned char *red_arr_mem_227022;\n    \n    red_arr_mem_227022 = (__local unsigned char *) red_arr_mem_227022_backing_7;\n    \n    __local unsigned char *red_arr_mem_227024;\n    \n    red_arr_mem_227024 = (__local unsigned char *) red_arr_mem_227024_backing_8;\n    \n    float x_211106;\n    \n    x_211106 = ((__local float *) color_225073)[gtid_211089];\n    \n    float x_211107;\n    \n    x_211107 = ((__local float *) color_225072)[gtid_211089];\n    \n    float defunc_1_f_res_211108 = x_211106 * x_211107;\n    float defunc_1_f_res_211109 = x_211106 * defunc_1_f_res_211108;\n    float defunc_1_f_res_211110 = x_211106 * defunc_1_f_res_211109;\n    float defunc_1_f_res_211111 = x_211106 * defunc_1_f_res_211110;\n    \n    ((__local float *) red_arr_mem_227016)[gtid_211089] = x_211107;\n    ((__local float *) red_arr_mem_227018)[gtid_211089] = defunc_1_f_res_211108;\n    ((__local float *) red_arr_mem_227020)[gtid_211089] = defunc_1_f_res_2",
                   "11109;\n    ((__local float *) red_arr_mem_227022)[gtid_211089] = defunc_1_f_res_211110;\n    ((__local float *) red_arr_mem_227024)[gtid_211089] = defunc_1_f_res_211111;\n    ((__local float *) color_225071)[gtid_211089] = defunc_1_f_res_211109;\n    ((__local float *) color_225070)[gtid_211089] = defunc_1_f_res_211108;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227026;\n    int32_t skip_waves_227027 = 1;\n    float x_211091;\n    float x_211092;\n    float x_211093;\n    float x_211094;\n    float x_211095;\n    float x_211096;\n    float x_211097;\n    float x_211098;\n    float x_211099;\n    float x_211100;\n    \n    offset_227026 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227003, sext_i64_i32(q_s_196695))) {\n            x_211091 = ((__local\n                         float *) red_arr_mem_227016)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227026)];\n            x_211092 = ((__local\n                         float *) red_arr_mem_227018)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227026)];\n            x_211093 = ((__local\n                         float *) red_arr_mem_227020)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227026)];\n            x_211094 = ((__local\n                         float *) red_arr_mem_227022)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227026)];\n            x_211095 = ((__local\n                         float *) red_arr_mem_227024)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227026)];\n        }\n    }\n    offset_227026 = 1;\n    while (slt32(offset_227026, wave_sizze_227005)) {\n        if (slt32(local_tid_227003 + offset_227026, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227003 - squot32(local_tid_227003, wave_sizze_227005) *\n              wave_sizz",
                   "e_227005) & (2 * offset_227026 - 1)) == 0) {\n            // read array element\n            {\n                x_211096 = ((volatile __local\n                             float *) red_arr_mem_227016)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211097 = ((volatile __local\n                             float *) red_arr_mem_227018)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211098 = ((volatile __local\n                             float *) red_arr_mem_227020)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211099 = ((volatile __local\n                             float *) red_arr_mem_227022)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211100 = ((volatile __local\n                             float *) red_arr_mem_227024)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_211101 = x_211091 + x_211096;\n                float defunc_1_op_res_211102 = x_211092 + x_211097;\n                float defunc_1_op_res_211103 = x_211093 + x_211098;\n                float defunc_1_op_res_211104 = x_211094 + x_211099;\n                float defunc_1_op_res_211105 = x_211095 + x_211100;\n                \n                x_211091 = defunc_1_op_res_211101;\n                x_211092 = defunc_1_op_res_211102;\n                x_211093 = defunc_1_op_res_211103;\n                x_211094 = defunc_1_op_res_211104;\n                x_211095 = defunc_1_op_res_211105;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_227016)[sext_i32_i64(local_t",
                   "id_227003)] =\n                    x_211091;\n                ((volatile __local\n                  float *) red_arr_mem_227018)[sext_i32_i64(local_tid_227003)] =\n                    x_211092;\n                ((volatile __local\n                  float *) red_arr_mem_227020)[sext_i32_i64(local_tid_227003)] =\n                    x_211093;\n                ((volatile __local\n                  float *) red_arr_mem_227022)[sext_i32_i64(local_tid_227003)] =\n                    x_211094;\n                ((volatile __local\n                  float *) red_arr_mem_227024)[sext_i32_i64(local_tid_227003)] =\n                    x_211095;\n            }\n        }\n        offset_227026 *= 2;\n    }\n    while (slt32(skip_waves_227027, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227005 - 1,\n                                            wave_sizze_227005))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227026 = skip_waves_227027 * wave_sizze_227005;\n        if (slt32(local_tid_227003 + offset_227026, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227003 - squot32(local_tid_227003, wave_sizze_227005) *\n              wave_sizze_227005) == 0 && (squot32(local_tid_227003,\n                                                  wave_sizze_227005) & (2 *\n                                                                        skip_waves_227027 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_211096 = ((__local\n                             float *) red_arr_mem_227016)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211097 = ((__local\n                             float *) red_arr_mem_227018)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211098 = ((__local\n                        ",
                   "     float *) red_arr_mem_227020)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211099 = ((__local\n                             float *) red_arr_mem_227022)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n                x_211100 = ((__local\n                             float *) red_arr_mem_227024)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227026)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_211101 = x_211091 + x_211096;\n                float defunc_1_op_res_211102 = x_211092 + x_211097;\n                float defunc_1_op_res_211103 = x_211093 + x_211098;\n                float defunc_1_op_res_211104 = x_211094 + x_211099;\n                float defunc_1_op_res_211105 = x_211095 + x_211100;\n                \n                x_211091 = defunc_1_op_res_211101;\n                x_211092 = defunc_1_op_res_211102;\n                x_211093 = defunc_1_op_res_211103;\n                x_211094 = defunc_1_op_res_211104;\n                x_211095 = defunc_1_op_res_211105;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_227016)[sext_i32_i64(local_tid_227003)] =\n                    x_211091;\n                ((__local\n                  float *) red_arr_mem_227018)[sext_i32_i64(local_tid_227003)] =\n                    x_211092;\n                ((__local\n                  float *) red_arr_mem_227020)[sext_i32_i64(local_tid_227003)] =\n                    x_211093;\n                ((__local\n                  float *) red_arr_mem_227022)[sext_i32_i64(local_tid_227003)] =\n                    x_211094;\n                ((__local\n                  float *) red_arr_mem_227024)[sext_i32_i64(local_tid_227003)] =\n                    x_211095;\n            }\n      ",
                   "  }\n        skip_waves_227027 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_211082 = ((__local\n                                   float *) red_arr_mem_227016)[(int64_t) 0];\n    defunc_2_reduce_res_211083 = ((__local\n                                   float *) red_arr_mem_227018)[(int64_t) 0];\n    defunc_2_reduce_res_211084 = ((__local\n                                   float *) red_arr_mem_227020)[(int64_t) 0];\n    defunc_2_reduce_res_211085 = ((__local\n                                   float *) red_arr_mem_227022)[(int64_t) 0];\n    defunc_2_reduce_res_211086 = ((__local\n                                   float *) red_arr_mem_227024)[(int64_t) 0];\n    \n    float x_211112 = defunc_2_reduce_res_211084 * defunc_2_reduce_res_211086;\n    float y_211113 = defunc_2_reduce_res_211085 * defunc_2_reduce_res_211085;\n    float a12_211114 = x_211112 - y_211113;\n    float x_211115 = defunc_2_reduce_res_211084 * defunc_2_reduce_res_211085;\n    float y_211116 = defunc_2_reduce_res_211083 * defunc_2_reduce_res_211086;\n    float b12_211117 = x_211115 - y_211116;\n    float x_211118 = defunc_2_reduce_res_211083 * defunc_2_reduce_res_211085;\n    float y_211119 = defunc_2_reduce_res_211084 * defunc_2_reduce_res_211084;\n    float c12_211120 = x_211118 - y_211119;\n    float x_211121 = defunc_2_reduce_res_211082 * defunc_2_reduce_res_211086;\n    float b2_211122 = x_211121 - y_211119;\n    float x_211123 = defunc_2_reduce_res_211083 * defunc_2_reduce_res_211084;\n    float y_211124 = defunc_2_reduce_res_211082 * defunc_2_reduce_res_211085;\n    float c2_211125 = x_211123 - y_211124;\n    float x_211126 = defunc_2_reduce_res_211082 * a12_211114;\n    float y_211127 = defunc_2_reduce_res_211083 * b12_211117;\n    float x_211128 = x_211126 + y_211127;\n    float y_211129 = defunc_2_reduce_res_211084 * c12_211120;\n    float y_211130 = x_211128 + y_211129;\n    float det_211131 = 1.0F / y_211130;\n    float a12_211132 = a12_211114 * det_211131;\n    float b12_211133 = b12_211117 * ",
                   "det_211131;\n    float c12_211134 = c12_211120 * det_211131;\n    float b2_211135 = b2_211122 * det_211131;\n    float c2_211136 = c2_211125 * det_211131;\n    float defunc_2_reduce_res_211137;\n    float defunc_2_reduce_res_211138;\n    int64_t gtid_211139 = sext_i32_i64(sext_i64_i32(ltid_pre_227007));\n    int32_t phys_tid_211140 = local_tid_227003;\n    __local unsigned char *red_arr_mem_227028;\n    \n    red_arr_mem_227028 = (__local unsigned char *) red_arr_mem_227028_backing_9;\n    \n    __local unsigned char *red_arr_mem_227030;\n    \n    red_arr_mem_227030 = (__local\n                          unsigned char *) red_arr_mem_227030_backing_10;\n    \n    float x_211148;\n    \n    x_211148 = ((__local float *) color_225072)[gtid_211139];\n    \n    float x_211149;\n    \n    x_211149 = ((__local float *) color_225070)[gtid_211139];\n    \n    float x_211150;\n    \n    x_211150 = ((__local float *) color_225071)[gtid_211139];\n    \n    bool cond_211151 = sle64(x_211045, gtid_211139);\n    float defunc_0_f_res_211152;\n    \n    if (cond_211151) {\n        defunc_0_f_res_211152 = 0.0F;\n    } else {\n        int64_t i_211153 = add64(x_211047, gtid_211139);\n        float defunc_0_add_arg_211154;\n        \n        defunc_0_add_arg_211154 = ((__global float *) mem_222583)[gtid_211035 *\n                                                                  (defunc_0_f_res_196740 *\n                                                                   n_p_196694) +\n                                                                  gtid_211036 *\n                                                                  defunc_0_f_res_196740 +\n                                                                  i_211153];\n        defunc_0_f_res_211152 = defunc_0_add_arg_211154;\n    }\n    \n    float x_211155 = a12_211132 * x_211148;\n    float y_211156 = b12_211133 * x_211149;\n    float x_211157 = x_211155 + y_211156;\n    float y_211158 = c12_211134 * x_211150;\n    float x_211159 = x_211157 + y_211158;\n    float defunc_9_fi",
                   "t_fun_res_211160 = defunc_0_f_res_211152 * x_211159;\n    float x_211161 = b12_211133 * x_211148;\n    float y_211162 = b2_211135 * x_211149;\n    float x_211163 = x_211161 + y_211162;\n    float y_211164 = c2_211136 * x_211150;\n    float x_211165 = x_211163 + y_211164;\n    float defunc_9_slope_fun_res_211166 = defunc_0_f_res_211152 * x_211165;\n    \n    ((__local float *) red_arr_mem_227028)[gtid_211139] =\n        defunc_9_fit_fun_res_211160;\n    ((__local float *) red_arr_mem_227030)[gtid_211139] =\n        defunc_9_slope_fun_res_211166;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_227032;\n    int32_t skip_waves_227033 = 1;\n    float x_211141;\n    float x_211142;\n    float x_211143;\n    float x_211144;\n    \n    offset_227032 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_227003, sext_i64_i32(q_s_196695))) {\n            x_211141 = ((__local\n                         float *) red_arr_mem_227028)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227032)];\n            x_211142 = ((__local\n                         float *) red_arr_mem_227030)[sext_i32_i64(local_tid_227003 +\n                                                      offset_227032)];\n        }\n    }\n    offset_227032 = 1;\n    while (slt32(offset_227032, wave_sizze_227005)) {\n        if (slt32(local_tid_227003 + offset_227032, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227003 - squot32(local_tid_227003, wave_sizze_227005) *\n              wave_sizze_227005) & (2 * offset_227032 - 1)) == 0) {\n            // read array element\n            {\n                x_211143 = ((volatile __local\n                             float *) red_arr_mem_227028)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227032)];\n                x_211144 = ((volatile __local\n                             float *) red_arr_mem_227030)[sext_i32_i64(local_tid_227003 +\n                             ",
                   "                             offset_227032)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_211145 = x_211141 + x_211143;\n                float defunc_1_op_res_211146 = x_211142 + x_211144;\n                \n                x_211141 = defunc_1_op_res_211145;\n                x_211142 = defunc_1_op_res_211146;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_227028)[sext_i32_i64(local_tid_227003)] =\n                    x_211141;\n                ((volatile __local\n                  float *) red_arr_mem_227030)[sext_i32_i64(local_tid_227003)] =\n                    x_211142;\n            }\n        }\n        offset_227032 *= 2;\n    }\n    while (slt32(skip_waves_227033, squot32(sext_i64_i32(q_s_196695) +\n                                            wave_sizze_227005 - 1,\n                                            wave_sizze_227005))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_227032 = skip_waves_227033 * wave_sizze_227005;\n        if (slt32(local_tid_227003 + offset_227032, sext_i64_i32(q_s_196695)) &&\n            ((local_tid_227003 - squot32(local_tid_227003, wave_sizze_227005) *\n              wave_sizze_227005) == 0 && (squot32(local_tid_227003,\n                                                  wave_sizze_227005) & (2 *\n                                                                        skip_waves_227033 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_211143 = ((__local\n                             float *) red_arr_mem_227028)[sext_i32_i64(local_tid_227003 +\n                                                          offset_227032)];\n                x_211144 = ((__local\n                             float *) red_arr_mem_227030)[sext_i32_i64(local_tid_227003 +\n                                 ",
                   "                         offset_227032)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_211145 = x_211141 + x_211143;\n                float defunc_1_op_res_211146 = x_211142 + x_211144;\n                \n                x_211141 = defunc_1_op_res_211145;\n                x_211142 = defunc_1_op_res_211146;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_227028)[sext_i32_i64(local_tid_227003)] =\n                    x_211141;\n                ((__local\n                  float *) red_arr_mem_227030)[sext_i32_i64(local_tid_227003)] =\n                    x_211142;\n            }\n        }\n        skip_waves_227033 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_211137 = ((__local\n                                   float *) red_arr_mem_227028)[(int64_t) 0];\n    defunc_2_reduce_res_211138 = ((__local\n                                   float *) red_arr_mem_227030)[(int64_t) 0];\n    if (local_tid_227003 == 0) {\n        ((__global float *) mem_223533)[gtid_211035 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_211036 * s_n_m_196745 +\n                                        gtid_211037] =\n            defunc_2_reduce_res_211137;\n    }\n    if (local_tid_227003 == 0) {\n        ((__global float *) mem_223538)[gtid_211035 * (s_n_m_196745 *\n                                                       n_p_196694) +\n                                        gtid_211036 * s_n_m_196745 +\n                                        gtid_211037] =\n            defunc_2_reduce_res_211138;\n    }\n    \n  error_5:\n    return;\n}\n__kernel void mainzisegmap_intragroup_214752(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228232_backing_aligned_0,\n          ",
                   "                                   __local volatile\n                                             int64_t *red_arr_mem_228228_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225079_backing_aligned_2,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_l_196697,\n                                             int64_t jump_t_196702,\n                                             int64_t l_n_m_196752,\n                                             int64_t i_196779,\n                                             int64_t ctx_param_ext_222545,\n                                             int64_t ctx_param_ext_222546,\n                                             int64_t ctx_param_ext_222548,\n                                             __global\n                                             unsigned char *ext_mem_222468,\n                                             __global\n                                             unsigned char *ext_mem_222469,\n                                             __global\n                                             unsigned char *mem_param_222550,\n                                             __global unsigned char *mem_223608,\n                                             __global unsigned char *mem_223918)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228232_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228232_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228228_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228228_backing_aligned_1;\n    __local volatile unsigned char *restrict color_22",
                   "5079_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225079_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228216;\n    int32_t local_tid_228217;\n    int64_t group_sizze_228220;\n    int32_t wave_sizze_228219;\n    int32_t group_tid_228218;\n    \n    global_tid_228216 = get_global_id(0);\n    local_tid_228217 = get_local_id(0);\n    group_sizze_228220 = get_local_size(0);\n    wave_sizze_228219 = LOCKSTEP_WIDTH;\n    group_tid_228218 = get_group_id(0);\n    \n    int32_t phys_tid_214752 = group_tid_228218;\n    int64_t slice_228222 = q_l_196697;\n    int64_t ltid_pre_228221 = sext_i32_i64(local_tid_228217);\n    int64_t remnant_228223 = sext_i32_i64(local_tid_228217) - ltid_pre_228221;\n    int64_t slice_228224 = l_n_m_196752;\n    int64_t slice_228225 = m_196691 * slice_228224;\n    int64_t gtid_214750 = squot64(sext_i32_i64(group_tid_228218), slice_228224);\n    int64_t remnant_228226 = sext_i32_i64(group_tid_228218) - gtid_214750 *\n            slice_228224;\n    int64_t gtid_214751 = remnant_228226;\n    int64_t remnant_228227 = remnant_228226 - gtid_214751;\n    __local unsigned char *color_225079;\n    \n    color_225079 = (__local unsigned char *) color_225079_backing_0;\n    \n    int64_t x_214758;\n    \n    x_214758 = ((__global int64_t *) ext_mem_222469)[gtid_214750 *\n                                                     l_n_m_196752 +\n                                                     gtid_214751];\n    \n    float x_214759;\n    \n    x_214759 = ((__global float *) ext_mem_222468)[gtid_214750 * l_n_m_196752 +\n                                                   gtid_214751];\n    \n    int64_t min_arg_214760 = mul64(jump_t_196702, gtid_214751);\n    int64_t min_res_214761 = smin64(i_196779, min_arg_214760);\n    int64_t defunc_0_g_res_214762 = add64((int64_t) 1, min_res_214761);\n    float defunc_2_reduce_res_214763;\n    int64_t gtid_214765 = sext_i32_i64(sext_i64_",
                   "i32(ltid_pre_228221));\n    int32_t phys_tid_214766 = local_tid_228217;\n    __local unsigned char *red_arr_mem_228228;\n    \n    red_arr_mem_228228 = (__local unsigned char *) red_arr_mem_228228_backing_1;\n    \n    bool cond_214771 = sle64(n_196692, gtid_214765);\n    int64_t defunc_0_f_res_214772;\n    \n    if (cond_214771) {\n        defunc_0_f_res_214772 = (int64_t) 0;\n    } else {\n        int64_t i_214773 = add64(x_214758, gtid_214765);\n        int64_t defunc_1_add_res_214774 = add64((int64_t) 1, i_214773);\n        \n        defunc_0_f_res_214772 = defunc_1_add_res_214774;\n    }\n    \n    float defunc_0_f_res_214775;\n    \n    if (cond_214771) {\n        defunc_0_f_res_214775 = 0.0F;\n    } else {\n        int64_t i_214776 = add64(x_214758, gtid_214765);\n        float defunc_0_add_arg_214777;\n        \n        defunc_0_add_arg_214777 = ((__global\n                                    float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                               (gtid_214750 *\n                                                                ctx_param_ext_222546 +\n                                                                i_214776 *\n                                                                ctx_param_ext_222548)];\n        defunc_0_f_res_214775 = defunc_0_add_arg_214777;\n    }\n    \n    int64_t binop_p_214778 = sub64(defunc_0_f_res_214772,\n                                   defunc_0_g_res_214762);\n    float defunc_0_f_res_214779 = sitofp_i64_f32(binop_p_214778);\n    float abs_res_214780 = (float) fabs(defunc_0_f_res_214779);\n    float tmp1_214781 = abs_res_214780 / x_214759;\n    float x_214782 = tmp1_214781 * tmp1_214781;\n    float y_214783 = tmp1_214781 * x_214782;\n    float tmp2_214784 = 1.0F - y_214783;\n    float x_214785 = tmp2_214784 * tmp2_214784;\n    float tmp3_214786 = tmp2_214784 * x_214785;\n    float tmp4_214787 = defunc_0_f_res_214775 * tmp3_214786;\n    \n    ((__local float *) red_arr_mem_228228)[gtid_214765] = tmp4_214787;\n  ",
                   "  ((__local float *) color_225079)[gtid_214765] = tmp4_214787;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228230;\n    int32_t skip_waves_228231 = 1;\n    float x_214767;\n    float x_214768;\n    \n    offset_228230 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228217, sext_i64_i32(q_l_196697))) {\n            x_214767 = ((__local\n                         float *) red_arr_mem_228228)[sext_i32_i64(local_tid_228217 +\n                                                      offset_228230)];\n        }\n    }\n    offset_228230 = 1;\n    while (slt32(offset_228230, wave_sizze_228219)) {\n        if (slt32(local_tid_228217 + offset_228230, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228217 - squot32(local_tid_228217, wave_sizze_228219) *\n              wave_sizze_228219) & (2 * offset_228230 - 1)) == 0) {\n            // read array element\n            {\n                x_214768 = ((volatile __local\n                             float *) red_arr_mem_228228)[sext_i32_i64(local_tid_228217 +\n                                                          offset_228230)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214769 = x_214767 + x_214768;\n                \n                x_214767 = defunc_1_op_res_214769;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228228)[sext_i32_i64(local_tid_228217)] =\n                    x_214767;\n            }\n        }\n        offset_228230 *= 2;\n    }\n    while (slt32(skip_waves_228231, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228219 - 1,\n                                            wave_sizze_228219))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228230 = skip_waves_228231 * wave_sizze_228219;\n        if (slt32(local_tid_228217 + offset_228230, sext_i64_i32(q_l_196697)) &&\n       ",
                   "     ((local_tid_228217 - squot32(local_tid_228217, wave_sizze_228219) *\n              wave_sizze_228219) == 0 && (squot32(local_tid_228217,\n                                                  wave_sizze_228219) & (2 *\n                                                                        skip_waves_228231 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214768 = ((__local\n                             float *) red_arr_mem_228228)[sext_i32_i64(local_tid_228217 +\n                                                          offset_228230)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214769 = x_214767 + x_214768;\n                \n                x_214767 = defunc_1_op_res_214769;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228228)[sext_i32_i64(local_tid_228217)] =\n                    x_214767;\n            }\n        }\n        skip_waves_228231 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214763 = ((__local\n                                   float *) red_arr_mem_228228)[(int64_t) 0];\n    \n    float a0_214788 = 1.0F / defunc_2_reduce_res_214763;\n    float defunc_2_reduce_res_214789;\n    int64_t gtid_214790 = sext_i32_i64(sext_i64_i32(ltid_pre_228221));\n    int32_t phys_tid_214791 = local_tid_228217;\n    __local unsigned char *red_arr_mem_228232;\n    \n    red_arr_mem_228232 = (__local unsigned char *) red_arr_mem_228232_backing_2;\n    \n    float x_214796;\n    \n    x_214796 = ((__local float *) color_225079)[gtid_214790];\n    \n    bool cond_214797 = sle64(n_196692, gtid_214790);\n    float defunc_0_f_res_214798;\n    \n    if (cond_214797) {\n        defunc_0_f_res_214798 = 0.0F;\n    } else {\n        int64_t i_214799 = add64(x_214758, gtid_214790);\n        float defunc_0_add_arg_214800;\n     ",
                   "   \n        defunc_0_add_arg_214800 = ((__global float *) mem_223608)[gtid_214750 *\n                                                                  n_196692 +\n                                                                  i_214799];\n        defunc_0_f_res_214798 = defunc_0_add_arg_214800;\n    }\n    \n    float x_214801 = a0_214788 * x_214796;\n    float defunc_9_fit_fun_res_214802 = defunc_0_f_res_214798 * x_214801;\n    \n    ((__local float *) red_arr_mem_228232)[gtid_214790] =\n        defunc_9_fit_fun_res_214802;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228234;\n    int32_t skip_waves_228235 = 1;\n    float x_214792;\n    float x_214793;\n    \n    offset_228234 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228217, sext_i64_i32(q_l_196697))) {\n            x_214792 = ((__local\n                         float *) red_arr_mem_228232)[sext_i32_i64(local_tid_228217 +\n                                                      offset_228234)];\n        }\n    }\n    offset_228234 = 1;\n    while (slt32(offset_228234, wave_sizze_228219)) {\n        if (slt32(local_tid_228217 + offset_228234, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228217 - squot32(local_tid_228217, wave_sizze_228219) *\n              wave_sizze_228219) & (2 * offset_228234 - 1)) == 0) {\n            // read array element\n            {\n                x_214793 = ((volatile __local\n                             float *) red_arr_mem_228232)[sext_i32_i64(local_tid_228217 +\n                                                          offset_228234)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214794 = x_214792 + x_214793;\n                \n                x_214792 = defunc_1_op_res_214794;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228232)[sext_i32_i64(local_tid_228217)] =\n                    x_",
                   "214792;\n            }\n        }\n        offset_228234 *= 2;\n    }\n    while (slt32(skip_waves_228235, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228219 - 1,\n                                            wave_sizze_228219))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228234 = skip_waves_228235 * wave_sizze_228219;\n        if (slt32(local_tid_228217 + offset_228234, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228217 - squot32(local_tid_228217, wave_sizze_228219) *\n              wave_sizze_228219) == 0 && (squot32(local_tid_228217,\n                                                  wave_sizze_228219) & (2 *\n                                                                        skip_waves_228235 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214793 = ((__local\n                             float *) red_arr_mem_228232)[sext_i32_i64(local_tid_228217 +\n                                                          offset_228234)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214794 = x_214792 + x_214793;\n                \n                x_214792 = defunc_1_op_res_214794;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228232)[sext_i32_i64(local_tid_228217)] =\n                    x_214792;\n            }\n        }\n        skip_waves_228235 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214789 = ((__local\n                                   float *) red_arr_mem_228232)[(int64_t) 0];\n    if (local_tid_228217 == 0) {\n        ((__global float *) mem_223918)[gtid_214750 * l_n_m_196752 +\n                                        gtid_214751] =\n            defunc_2_reduce_res_214789;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzise",
                   "gmap_intragroup_214919(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228258_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228256_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228252_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228250_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228248_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225081_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *color_225080_backing_aligned_6,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_l_196697,\n                                             int64_t jump_t_196702,\n                                             int64_t l_n_m_196752,\n                                             int64_t i_196779,\n                                             int64_t ctx_param_ext_222545,\n                                             int64_t ctx_param_ext_222546,\n                                             int64_t ctx_param_ext_222548,\n                                             __global\n                                             unsigned char *ext_mem_222468,\n                                             __global\n                                             unsigned char *ext_mem_222469,\n                                             __globa",
                   "l\n                                             unsigned char *mem_param_222550,\n                                             __global unsigned char *mem_223608,\n                                             __global unsigned char *mem_223931,\n                                             __global unsigned char *mem_223935)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228258_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228258_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228256_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228256_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228252_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228252_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_228250_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228250_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_228248_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228248_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225081_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225081_backing_aligned_5;\n    __local volatile unsigned char *restrict color_225080_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225080_backing_aligned_6;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t g",
                   "lobal_tid_228236;\n    int32_t local_tid_228237;\n    int64_t group_sizze_228240;\n    int32_t wave_sizze_228239;\n    int32_t group_tid_228238;\n    \n    global_tid_228236 = get_global_id(0);\n    local_tid_228237 = get_local_id(0);\n    group_sizze_228240 = get_local_size(0);\n    wave_sizze_228239 = LOCKSTEP_WIDTH;\n    group_tid_228238 = get_group_id(0);\n    \n    int32_t phys_tid_214919 = group_tid_228238;\n    int64_t slice_228242 = q_l_196697;\n    int64_t ltid_pre_228241 = sext_i32_i64(local_tid_228237);\n    int64_t remnant_228243 = sext_i32_i64(local_tid_228237) - ltid_pre_228241;\n    int64_t slice_228244 = l_n_m_196752;\n    int64_t slice_228245 = m_196691 * slice_228244;\n    int64_t gtid_214917 = squot64(sext_i32_i64(group_tid_228238), slice_228244);\n    int64_t remnant_228246 = sext_i32_i64(group_tid_228238) - gtid_214917 *\n            slice_228244;\n    int64_t gtid_214918 = remnant_228246;\n    int64_t remnant_228247 = remnant_228246 - gtid_214918;\n    __local unsigned char *color_225080;\n    \n    color_225080 = (__local unsigned char *) color_225080_backing_0;\n    \n    __local unsigned char *color_225081;\n    \n    color_225081 = (__local unsigned char *) color_225081_backing_1;\n    \n    int64_t x_214925;\n    \n    x_214925 = ((__global int64_t *) ext_mem_222469)[gtid_214917 *\n                                                     l_n_m_196752 +\n                                                     gtid_214918];\n    \n    float x_214926;\n    \n    x_214926 = ((__global float *) ext_mem_222468)[gtid_214917 * l_n_m_196752 +\n                                                   gtid_214918];\n    \n    int64_t min_arg_214927 = mul64(jump_t_196702, gtid_214918);\n    int64_t min_res_214928 = smin64(i_196779, min_arg_214927);\n    int64_t defunc_0_g_res_214929 = add64((int64_t) 1, min_res_214928);\n    float defunc_2_reduce_res_214930;\n    float defunc_2_reduce_res_214931;\n    float defunc_2_reduce_res_214932;\n    int64_t gtid_214935 = sext_i32_i64(sext_i64_i32(ltid_pre_228241));\n    i",
                   "nt32_t phys_tid_214936 = local_tid_228237;\n    __local unsigned char *red_arr_mem_228248;\n    \n    red_arr_mem_228248 = (__local unsigned char *) red_arr_mem_228248_backing_2;\n    \n    __local unsigned char *red_arr_mem_228250;\n    \n    red_arr_mem_228250 = (__local unsigned char *) red_arr_mem_228250_backing_3;\n    \n    __local unsigned char *red_arr_mem_228252;\n    \n    red_arr_mem_228252 = (__local unsigned char *) red_arr_mem_228252_backing_4;\n    \n    bool cond_214947 = sle64(n_196692, gtid_214935);\n    int64_t defunc_0_f_res_214948;\n    \n    if (cond_214947) {\n        defunc_0_f_res_214948 = (int64_t) 0;\n    } else {\n        int64_t i_214949 = add64(x_214925, gtid_214935);\n        int64_t defunc_1_add_res_214950 = add64((int64_t) 1, i_214949);\n        \n        defunc_0_f_res_214948 = defunc_1_add_res_214950;\n    }\n    \n    float defunc_0_f_res_214951;\n    \n    if (cond_214947) {\n        defunc_0_f_res_214951 = 0.0F;\n    } else {\n        int64_t i_214952 = add64(x_214925, gtid_214935);\n        float defunc_0_add_arg_214953;\n        \n        defunc_0_add_arg_214953 = ((__global\n                                    float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                               (gtid_214917 *\n                                                                ctx_param_ext_222546 +\n                                                                i_214952 *\n                                                                ctx_param_ext_222548)];\n        defunc_0_f_res_214951 = defunc_0_add_arg_214953;\n    }\n    \n    int64_t binop_p_214954 = sub64(defunc_0_f_res_214948,\n                                   defunc_0_g_res_214929);\n    float defunc_0_f_res_214955 = sitofp_i64_f32(binop_p_214954);\n    float abs_res_214956 = (float) fabs(defunc_0_f_res_214955);\n    float tmp1_214957 = abs_res_214956 / x_214926;\n    float x_214958 = tmp1_214957 * tmp1_214957;\n    float y_214959 = tmp1_214957 * x_214958;\n    float tmp2_214960 = 1.0F",
                   " - y_214959;\n    float x_214961 = tmp2_214960 * tmp2_214960;\n    float tmp3_214962 = tmp2_214960 * x_214961;\n    float tmp4_214963 = defunc_0_f_res_214951 * tmp3_214962;\n    float defunc_1_f_res_214964 = defunc_0_f_res_214955 * tmp4_214963;\n    float defunc_1_f_res_214965 = defunc_0_f_res_214955 * defunc_1_f_res_214964;\n    \n    ((__local float *) red_arr_mem_228248)[gtid_214935] = tmp4_214963;\n    ((__local float *) red_arr_mem_228250)[gtid_214935] = defunc_1_f_res_214964;\n    ((__local float *) red_arr_mem_228252)[gtid_214935] = defunc_1_f_res_214965;\n    ((__local float *) color_225081)[gtid_214935] = defunc_1_f_res_214964;\n    ((__local float *) color_225080)[gtid_214935] = tmp4_214963;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228254;\n    int32_t skip_waves_228255 = 1;\n    float x_214937;\n    float x_214938;\n    float x_214939;\n    float x_214940;\n    float x_214941;\n    float x_214942;\n    \n    offset_228254 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228237, sext_i64_i32(q_l_196697))) {\n            x_214937 = ((__local\n                         float *) red_arr_mem_228248)[sext_i32_i64(local_tid_228237 +\n                                                      offset_228254)];\n            x_214938 = ((__local\n                         float *) red_arr_mem_228250)[sext_i32_i64(local_tid_228237 +\n                                                      offset_228254)];\n            x_214939 = ((__local\n                         float *) red_arr_mem_228252)[sext_i32_i64(local_tid_228237 +\n                                                      offset_228254)];\n        }\n    }\n    offset_228254 = 1;\n    while (slt32(offset_228254, wave_sizze_228239)) {\n        if (slt32(local_tid_228237 + offset_228254, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228237 - squot32(local_tid_228237, wave_sizze_228239) *\n              wave_sizze_228239) & (2 * offset_228254 - 1)) == 0) {\n            // read array element\n",
                   "            {\n                x_214940 = ((volatile __local\n                             float *) red_arr_mem_228248)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n                x_214941 = ((volatile __local\n                             float *) red_arr_mem_228250)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n                x_214942 = ((volatile __local\n                             float *) red_arr_mem_228252)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214943 = x_214937 + x_214940;\n                float defunc_1_op_res_214944 = x_214938 + x_214941;\n                float defunc_1_op_res_214945 = x_214939 + x_214942;\n                \n                x_214937 = defunc_1_op_res_214943;\n                x_214938 = defunc_1_op_res_214944;\n                x_214939 = defunc_1_op_res_214945;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228248)[sext_i32_i64(local_tid_228237)] =\n                    x_214937;\n                ((volatile __local\n                  float *) red_arr_mem_228250)[sext_i32_i64(local_tid_228237)] =\n                    x_214938;\n                ((volatile __local\n                  float *) red_arr_mem_228252)[sext_i32_i64(local_tid_228237)] =\n                    x_214939;\n            }\n        }\n        offset_228254 *= 2;\n    }\n    while (slt32(skip_waves_228255, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228239 - 1,\n                                            wave_sizze_228239))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228254 = skip_waves_228255 * wave_sizze_228239;\n        if (slt32(local_tid_228237 + of",
                   "fset_228254, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228237 - squot32(local_tid_228237, wave_sizze_228239) *\n              wave_sizze_228239) == 0 && (squot32(local_tid_228237,\n                                                  wave_sizze_228239) & (2 *\n                                                                        skip_waves_228255 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214940 = ((__local\n                             float *) red_arr_mem_228248)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n                x_214941 = ((__local\n                             float *) red_arr_mem_228250)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n                x_214942 = ((__local\n                             float *) red_arr_mem_228252)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228254)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214943 = x_214937 + x_214940;\n                float defunc_1_op_res_214944 = x_214938 + x_214941;\n                float defunc_1_op_res_214945 = x_214939 + x_214942;\n                \n                x_214937 = defunc_1_op_res_214943;\n                x_214938 = defunc_1_op_res_214944;\n                x_214939 = defunc_1_op_res_214945;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228248)[sext_i32_i64(local_tid_228237)] =\n                    x_214937;\n                ((__local\n                  float *) red_arr_mem_228250)[sext_i32_i64(local_tid_228237)] =\n                    x_214938;\n                ((__local\n                  float *) red_arr_mem_228252)[sext_i32_i64(local_tid_228237)]",
                   " =\n                    x_214939;\n            }\n        }\n        skip_waves_228255 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214930 = ((__local\n                                   float *) red_arr_mem_228248)[(int64_t) 0];\n    defunc_2_reduce_res_214931 = ((__local\n                                   float *) red_arr_mem_228250)[(int64_t) 0];\n    defunc_2_reduce_res_214932 = ((__local\n                                   float *) red_arr_mem_228252)[(int64_t) 0];\n    \n    float x_214966 = defunc_2_reduce_res_214930 * defunc_2_reduce_res_214932;\n    float y_214967 = defunc_2_reduce_res_214931 * defunc_2_reduce_res_214931;\n    float y_214968 = x_214966 - y_214967;\n    float det1_214969 = 1.0F / y_214968;\n    float a11_214970 = defunc_2_reduce_res_214932 * det1_214969;\n    float x_214971 = 0.0F - defunc_2_reduce_res_214931;\n    float b11_214972 = det1_214969 * x_214971;\n    float c11_214973 = defunc_2_reduce_res_214930 * det1_214969;\n    float defunc_2_reduce_res_214974;\n    float defunc_2_reduce_res_214975;\n    int64_t gtid_214976 = sext_i32_i64(sext_i64_i32(ltid_pre_228241));\n    int32_t phys_tid_214977 = local_tid_228237;\n    __local unsigned char *red_arr_mem_228256;\n    \n    red_arr_mem_228256 = (__local unsigned char *) red_arr_mem_228256_backing_5;\n    \n    __local unsigned char *red_arr_mem_228258;\n    \n    red_arr_mem_228258 = (__local unsigned char *) red_arr_mem_228258_backing_6;\n    \n    float x_214985;\n    \n    x_214985 = ((__local float *) color_225080)[gtid_214976];\n    \n    float x_214986;\n    \n    x_214986 = ((__local float *) color_225081)[gtid_214976];\n    \n    bool cond_214987 = sle64(n_196692, gtid_214976);\n    float defunc_0_f_res_214988;\n    \n    if (cond_214987) {\n        defunc_0_f_res_214988 = 0.0F;\n    } else {\n        int64_t i_214989 = add64(x_214925, gtid_214976);\n        float defunc_0_add_arg_214990;\n        \n        defunc_0_add_arg_214990 = ((__global float *) mem_223608)[gtid_214917 *\n                          ",
                   "                                        n_196692 +\n                                                                  i_214989];\n        defunc_0_f_res_214988 = defunc_0_add_arg_214990;\n    }\n    \n    float x_214991 = a11_214970 * x_214985;\n    float y_214992 = b11_214972 * x_214986;\n    float x_214993 = x_214991 + y_214992;\n    float defunc_9_fit_fun_res_214994 = defunc_0_f_res_214988 * x_214993;\n    float x_214995 = b11_214972 * x_214985;\n    float y_214996 = c11_214973 * x_214986;\n    float x_214997 = x_214995 + y_214996;\n    float defunc_9_slope_fun_res_214998 = defunc_0_f_res_214988 * x_214997;\n    \n    ((__local float *) red_arr_mem_228256)[gtid_214976] =\n        defunc_9_fit_fun_res_214994;\n    ((__local float *) red_arr_mem_228258)[gtid_214976] =\n        defunc_9_slope_fun_res_214998;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228260;\n    int32_t skip_waves_228261 = 1;\n    float x_214978;\n    float x_214979;\n    float x_214980;\n    float x_214981;\n    \n    offset_228260 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228237, sext_i64_i32(q_l_196697))) {\n            x_214978 = ((__local\n                         float *) red_arr_mem_228256)[sext_i32_i64(local_tid_228237 +\n                                                      offset_228260)];\n            x_214979 = ((__local\n                         float *) red_arr_mem_228258)[sext_i32_i64(local_tid_228237 +\n                                                      offset_228260)];\n        }\n    }\n    offset_228260 = 1;\n    while (slt32(offset_228260, wave_sizze_228239)) {\n        if (slt32(local_tid_228237 + offset_228260, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228237 - squot32(local_tid_228237, wave_sizze_228239) *\n              wave_sizze_228239) & (2 * offset_228260 - 1)) == 0) {\n            // read array element\n            {\n                x_214980 = ((volatile __local\n                             float *) red_arr_mem_228256)[sext_i32_",
                   "i64(local_tid_228237 +\n                                                          offset_228260)];\n                x_214981 = ((volatile __local\n                             float *) red_arr_mem_228258)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228260)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214982 = x_214978 + x_214980;\n                float defunc_1_op_res_214983 = x_214979 + x_214981;\n                \n                x_214978 = defunc_1_op_res_214982;\n                x_214979 = defunc_1_op_res_214983;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228256)[sext_i32_i64(local_tid_228237)] =\n                    x_214978;\n                ((volatile __local\n                  float *) red_arr_mem_228258)[sext_i32_i64(local_tid_228237)] =\n                    x_214979;\n            }\n        }\n        offset_228260 *= 2;\n    }\n    while (slt32(skip_waves_228261, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228239 - 1,\n                                            wave_sizze_228239))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228260 = skip_waves_228261 * wave_sizze_228239;\n        if (slt32(local_tid_228237 + offset_228260, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228237 - squot32(local_tid_228237, wave_sizze_228239) *\n              wave_sizze_228239) == 0 && (squot32(local_tid_228237,\n                                                  wave_sizze_228239) & (2 *\n                                                                        skip_waves_228261 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_214980 = ((__local\n                             float *) red_arr_mem_228256)[sext",
                   "_i32_i64(local_tid_228237 +\n                                                          offset_228260)];\n                x_214981 = ((__local\n                             float *) red_arr_mem_228258)[sext_i32_i64(local_tid_228237 +\n                                                          offset_228260)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_214982 = x_214978 + x_214980;\n                float defunc_1_op_res_214983 = x_214979 + x_214981;\n                \n                x_214978 = defunc_1_op_res_214982;\n                x_214979 = defunc_1_op_res_214983;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228256)[sext_i32_i64(local_tid_228237)] =\n                    x_214978;\n                ((__local\n                  float *) red_arr_mem_228258)[sext_i32_i64(local_tid_228237)] =\n                    x_214979;\n            }\n        }\n        skip_waves_228261 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_214974 = ((__local\n                                   float *) red_arr_mem_228256)[(int64_t) 0];\n    defunc_2_reduce_res_214975 = ((__local\n                                   float *) red_arr_mem_228258)[(int64_t) 0];\n    if (local_tid_228237 == 0) {\n        ((__global float *) mem_223931)[gtid_214917 * l_n_m_196752 +\n                                        gtid_214918] =\n            defunc_2_reduce_res_214974;\n    }\n    if (local_tid_228237 == 0) {\n        ((__global float *) mem_223935)[gtid_214917 * l_n_m_196752 +\n                                        gtid_214918] =\n            defunc_2_reduce_res_214975;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzisegmap_intragroup_215176(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228288_backing_aligned_0,\n                         ",
                   "                    __local volatile\n                                             int64_t *red_arr_mem_228286_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228282_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228280_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228278_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228276_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *red_arr_mem_228274_backing_aligned_6,\n                                             __local volatile\n                                             int64_t *color_225085_backing_aligned_7,\n                                             __local volatile\n                                             int64_t *color_225084_backing_aligned_8,\n                                             __local volatile\n                                             int64_t *color_225083_backing_aligned_9,\n                                             __local volatile\n                                             int64_t *color_225082_backing_aligned_10,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_l_196697,\n                                             int64_t jump_t_196702,\n                                             int64_t l_n_m_196752,\n                                             int64_t i_196779,\n                                             int64_t ctx_param_ext_222545,\n                                             int64_t ctx_param_ext_222546,\n              ",
                   "                               int64_t ctx_param_ext_222548,\n                                             __global\n                                             unsigned char *ext_mem_222468,\n                                             __global\n                                             unsigned char *ext_mem_222469,\n                                             __global\n                                             unsigned char *mem_param_222550,\n                                             __global unsigned char *mem_223608,\n                                             __global unsigned char *mem_223955,\n                                             __global unsigned char *mem_223959)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228288_backing_10 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228288_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228286_backing_9 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228286_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228282_backing_8 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228282_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_228280_backing_7 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228280_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_228278_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228278_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_228276_backing_5 =\n                                   ",
                   "(__local volatile\n                                    unsigned char *) red_arr_mem_228276_backing_aligned_5;\n    __local volatile unsigned char *restrict red_arr_mem_228274_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228274_backing_aligned_6;\n    __local volatile unsigned char *restrict color_225085_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225085_backing_aligned_7;\n    __local volatile unsigned char *restrict color_225084_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225084_backing_aligned_8;\n    __local volatile unsigned char *restrict color_225083_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225083_backing_aligned_9;\n    __local volatile unsigned char *restrict color_225082_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225082_backing_aligned_10;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228262;\n    int32_t local_tid_228263;\n    int64_t group_sizze_228266;\n    int32_t wave_sizze_228265;\n    int32_t group_tid_228264;\n    \n    global_tid_228262 = get_global_id(0);\n    local_tid_228263 = get_local_id(0);\n    group_sizze_228266 = get_local_size(0);\n    wave_sizze_228265 = LOCKSTEP_WIDTH;\n    group_tid_228264 = get_group_id(0);\n    \n    int32_t phys_tid_215176 = group_tid_228264;\n    int64_t slice_228268 = q_l_196697;\n    int64_t ltid_pre_228267 = sext_i32_i64(local_tid_228263);\n    int64_t remnant_228269 = sext_i32_i64(local_tid_228263) - ltid_pre_228267;\n    int64_t slice_228270 = l_n_m_196752;\n    int64_t slice_228271 = m_196691 * slice_228270;\n    int64_t gtid_215174 = squot64(sext_i32_i64(group_tid_228264), slice_228270);\n    int64_",
                   "t remnant_228272 = sext_i32_i64(group_tid_228264) - gtid_215174 *\n            slice_228270;\n    int64_t gtid_215175 = remnant_228272;\n    int64_t remnant_228273 = remnant_228272 - gtid_215175;\n    __local unsigned char *color_225082;\n    \n    color_225082 = (__local unsigned char *) color_225082_backing_0;\n    \n    __local unsigned char *color_225083;\n    \n    color_225083 = (__local unsigned char *) color_225083_backing_1;\n    \n    __local unsigned char *color_225084;\n    \n    color_225084 = (__local unsigned char *) color_225084_backing_2;\n    \n    __local unsigned char *color_225085;\n    \n    color_225085 = (__local unsigned char *) color_225085_backing_3;\n    \n    int64_t x_215182;\n    \n    x_215182 = ((__global int64_t *) ext_mem_222469)[gtid_215174 *\n                                                     l_n_m_196752 +\n                                                     gtid_215175];\n    \n    float x_215183;\n    \n    x_215183 = ((__global float *) ext_mem_222468)[gtid_215174 * l_n_m_196752 +\n                                                   gtid_215175];\n    \n    int64_t min_arg_215184 = mul64(jump_t_196702, gtid_215175);\n    int64_t min_res_215185 = smin64(i_196779, min_arg_215184);\n    int64_t defunc_0_g_res_215186 = add64((int64_t) 1, min_res_215185);\n    int64_t gtid_215189 = sext_i32_i64(sext_i64_i32(ltid_pre_228267));\n    int32_t phys_tid_215190 = local_tid_228263;\n    bool cond_215192 = sle64(n_196692, gtid_215189);\n    int64_t defunc_0_f_res_215193;\n    \n    if (cond_215192) {\n        defunc_0_f_res_215193 = (int64_t) 0;\n    } else {\n        int64_t i_215194 = add64(x_215182, gtid_215189);\n        int64_t defunc_1_add_res_215195 = add64((int64_t) 1, i_215194);\n        \n        defunc_0_f_res_215193 = defunc_1_add_res_215195;\n    }\n    \n    float defunc_0_f_res_215196;\n    \n    if (cond_215192) {\n        defunc_0_f_res_215196 = 0.0F;\n    } else {\n        int64_t i_215197 = add64(x_215182, gtid_215189);\n        float defunc_0_add_arg_215198;\n        \n   ",
                   "     defunc_0_add_arg_215198 = ((__global\n                                    float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                               (gtid_215174 *\n                                                                ctx_param_ext_222546 +\n                                                                i_215197 *\n                                                                ctx_param_ext_222548)];\n        defunc_0_f_res_215196 = defunc_0_add_arg_215198;\n    }\n    \n    int64_t binop_p_215199 = sub64(defunc_0_f_res_215193,\n                                   defunc_0_g_res_215186);\n    float defunc_0_f_res_215200 = sitofp_i64_f32(binop_p_215199);\n    float abs_res_215201 = (float) fabs(defunc_0_f_res_215200);\n    float tmp1_215202 = abs_res_215201 / x_215183;\n    float x_215203 = tmp1_215202 * tmp1_215202;\n    float y_215204 = tmp1_215202 * x_215203;\n    float tmp2_215205 = 1.0F - y_215204;\n    float x_215206 = tmp2_215205 * tmp2_215205;\n    float tmp3_215207 = tmp2_215205 * x_215206;\n    float tmp4_215208 = defunc_0_f_res_215196 * tmp3_215207;\n    \n    ((__local float *) color_225085)[gtid_215189] = defunc_0_f_res_215200;\n    ((__local float *) color_225084)[gtid_215189] = tmp4_215208;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float defunc_2_reduce_res_215209;\n    float defunc_2_reduce_res_215210;\n    float defunc_2_reduce_res_215211;\n    float defunc_2_reduce_res_215212;\n    float defunc_2_reduce_res_215213;\n    int64_t gtid_215216 = sext_i32_i64(sext_i64_i32(ltid_pre_228267));\n    int32_t phys_tid_215217 = local_tid_228263;\n    __local unsigned char *red_arr_mem_228274;\n    \n    red_arr_mem_228274 = (__local unsigned char *) red_arr_mem_228274_backing_4;\n    \n    __local unsigned char *red_arr_mem_228276;\n    \n    red_arr_mem_228276 = (__local unsigned char *) red_arr_mem_228276_backing_5;\n    \n    __local unsigned char *red_arr_mem_228278;\n    \n    red_arr_mem_228278 = (__local unsigned char *) red_arr_mem_228",
                   "278_backing_6;\n    \n    __local unsigned char *red_arr_mem_228280;\n    \n    red_arr_mem_228280 = (__local unsigned char *) red_arr_mem_228280_backing_7;\n    \n    __local unsigned char *red_arr_mem_228282;\n    \n    red_arr_mem_228282 = (__local unsigned char *) red_arr_mem_228282_backing_8;\n    \n    float x_215233;\n    \n    x_215233 = ((__local float *) color_225085)[gtid_215216];\n    \n    float x_215234;\n    \n    x_215234 = ((__local float *) color_225084)[gtid_215216];\n    \n    float defunc_1_f_res_215235 = x_215233 * x_215234;\n    float defunc_1_f_res_215236 = x_215233 * defunc_1_f_res_215235;\n    float defunc_1_f_res_215237 = x_215233 * defunc_1_f_res_215236;\n    float defunc_1_f_res_215238 = x_215233 * defunc_1_f_res_215237;\n    \n    ((__local float *) red_arr_mem_228274)[gtid_215216] = x_215234;\n    ((__local float *) red_arr_mem_228276)[gtid_215216] = defunc_1_f_res_215235;\n    ((__local float *) red_arr_mem_228278)[gtid_215216] = defunc_1_f_res_215236;\n    ((__local float *) red_arr_mem_228280)[gtid_215216] = defunc_1_f_res_215237;\n    ((__local float *) red_arr_mem_228282)[gtid_215216] = defunc_1_f_res_215238;\n    ((__local float *) color_225083)[gtid_215216] = defunc_1_f_res_215236;\n    ((__local float *) color_225082)[gtid_215216] = defunc_1_f_res_215235;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228284;\n    int32_t skip_waves_228285 = 1;\n    float x_215218;\n    float x_215219;\n    float x_215220;\n    float x_215221;\n    float x_215222;\n    float x_215223;\n    float x_215224;\n    float x_215225;\n    float x_215226;\n    float x_215227;\n    \n    offset_228284 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228263, sext_i64_i32(q_l_196697))) {\n            x_215218 = ((__local\n                         float *) red_arr_mem_228274)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228284)];\n            x_215219 = ((__local\n                         float *) red",
                   "_arr_mem_228276)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228284)];\n            x_215220 = ((__local\n                         float *) red_arr_mem_228278)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228284)];\n            x_215221 = ((__local\n                         float *) red_arr_mem_228280)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228284)];\n            x_215222 = ((__local\n                         float *) red_arr_mem_228282)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228284)];\n        }\n    }\n    offset_228284 = 1;\n    while (slt32(offset_228284, wave_sizze_228265)) {\n        if (slt32(local_tid_228263 + offset_228284, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228263 - squot32(local_tid_228263, wave_sizze_228265) *\n              wave_sizze_228265) & (2 * offset_228284 - 1)) == 0) {\n            // read array element\n            {\n                x_215223 = ((volatile __local\n                             float *) red_arr_mem_228274)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215224 = ((volatile __local\n                             float *) red_arr_mem_228276)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215225 = ((volatile __local\n                             float *) red_arr_mem_228278)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215226 = ((volatile __local\n                             float *) red_arr_mem_228280)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215227 = ((volatile __local\n                             float *) red_arr_mem_",
                   "228282)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_215228 = x_215218 + x_215223;\n                float defunc_1_op_res_215229 = x_215219 + x_215224;\n                float defunc_1_op_res_215230 = x_215220 + x_215225;\n                float defunc_1_op_res_215231 = x_215221 + x_215226;\n                float defunc_1_op_res_215232 = x_215222 + x_215227;\n                \n                x_215218 = defunc_1_op_res_215228;\n                x_215219 = defunc_1_op_res_215229;\n                x_215220 = defunc_1_op_res_215230;\n                x_215221 = defunc_1_op_res_215231;\n                x_215222 = defunc_1_op_res_215232;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228274)[sext_i32_i64(local_tid_228263)] =\n                    x_215218;\n                ((volatile __local\n                  float *) red_arr_mem_228276)[sext_i32_i64(local_tid_228263)] =\n                    x_215219;\n                ((volatile __local\n                  float *) red_arr_mem_228278)[sext_i32_i64(local_tid_228263)] =\n                    x_215220;\n                ((volatile __local\n                  float *) red_arr_mem_228280)[sext_i32_i64(local_tid_228263)] =\n                    x_215221;\n                ((volatile __local\n                  float *) red_arr_mem_228282)[sext_i32_i64(local_tid_228263)] =\n                    x_215222;\n            }\n        }\n        offset_228284 *= 2;\n    }\n    while (slt32(skip_waves_228285, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228265 - 1,\n                                            wave_sizze_228265))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228284 = skip_waves_228285 * wave_sizze_228265;\n        if (slt32(local_tid_228263 + offs",
                   "et_228284, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228263 - squot32(local_tid_228263, wave_sizze_228265) *\n              wave_sizze_228265) == 0 && (squot32(local_tid_228263,\n                                                  wave_sizze_228265) & (2 *\n                                                                        skip_waves_228285 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_215223 = ((__local\n                             float *) red_arr_mem_228274)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215224 = ((__local\n                             float *) red_arr_mem_228276)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215225 = ((__local\n                             float *) red_arr_mem_228278)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215226 = ((__local\n                             float *) red_arr_mem_228280)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n                x_215227 = ((__local\n                             float *) red_arr_mem_228282)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228284)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_215228 = x_215218 + x_215223;\n                float defunc_1_op_res_215229 = x_215219 + x_215224;\n                float defunc_1_op_res_215230 = x_215220 + x_215225;\n                float defunc_1_op_res_215231 = x_215221 + x_215226;\n                float defunc_1_op_res_215232 = x_215222 + x_215227;\n                \n                x_215218 = defunc_1_op_res_215228;\n           ",
                   "     x_215219 = defunc_1_op_res_215229;\n                x_215220 = defunc_1_op_res_215230;\n                x_215221 = defunc_1_op_res_215231;\n                x_215222 = defunc_1_op_res_215232;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228274)[sext_i32_i64(local_tid_228263)] =\n                    x_215218;\n                ((__local\n                  float *) red_arr_mem_228276)[sext_i32_i64(local_tid_228263)] =\n                    x_215219;\n                ((__local\n                  float *) red_arr_mem_228278)[sext_i32_i64(local_tid_228263)] =\n                    x_215220;\n                ((__local\n                  float *) red_arr_mem_228280)[sext_i32_i64(local_tid_228263)] =\n                    x_215221;\n                ((__local\n                  float *) red_arr_mem_228282)[sext_i32_i64(local_tid_228263)] =\n                    x_215222;\n            }\n        }\n        skip_waves_228285 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_215209 = ((__local\n                                   float *) red_arr_mem_228274)[(int64_t) 0];\n    defunc_2_reduce_res_215210 = ((__local\n                                   float *) red_arr_mem_228276)[(int64_t) 0];\n    defunc_2_reduce_res_215211 = ((__local\n                                   float *) red_arr_mem_228278)[(int64_t) 0];\n    defunc_2_reduce_res_215212 = ((__local\n                                   float *) red_arr_mem_228280)[(int64_t) 0];\n    defunc_2_reduce_res_215213 = ((__local\n                                   float *) red_arr_mem_228282)[(int64_t) 0];\n    \n    float x_215239 = defunc_2_reduce_res_215211 * defunc_2_reduce_res_215213;\n    float y_215240 = defunc_2_reduce_res_215212 * defunc_2_reduce_res_215212;\n    float a12_215241 = x_215239 - y_215240;\n    float x_215242 = defunc_2_reduce_res_215211 * defunc_2_reduce_res_215212;\n    float y_215243 = defunc_2_reduce_res_215210 * defunc_2_reduce_res",
                   "_215213;\n    float b12_215244 = x_215242 - y_215243;\n    float x_215245 = defunc_2_reduce_res_215210 * defunc_2_reduce_res_215212;\n    float y_215246 = defunc_2_reduce_res_215211 * defunc_2_reduce_res_215211;\n    float c12_215247 = x_215245 - y_215246;\n    float x_215248 = defunc_2_reduce_res_215209 * defunc_2_reduce_res_215213;\n    float b2_215249 = x_215248 - y_215246;\n    float x_215250 = defunc_2_reduce_res_215210 * defunc_2_reduce_res_215211;\n    float y_215251 = defunc_2_reduce_res_215209 * defunc_2_reduce_res_215212;\n    float c2_215252 = x_215250 - y_215251;\n    float x_215253 = defunc_2_reduce_res_215209 * a12_215241;\n    float y_215254 = defunc_2_reduce_res_215210 * b12_215244;\n    float x_215255 = x_215253 + y_215254;\n    float y_215256 = defunc_2_reduce_res_215211 * c12_215247;\n    float y_215257 = x_215255 + y_215256;\n    float det_215258 = 1.0F / y_215257;\n    float a12_215259 = a12_215241 * det_215258;\n    float b12_215260 = b12_215244 * det_215258;\n    float c12_215261 = c12_215247 * det_215258;\n    float b2_215262 = b2_215249 * det_215258;\n    float c2_215263 = c2_215252 * det_215258;\n    float defunc_2_reduce_res_215264;\n    float defunc_2_reduce_res_215265;\n    int64_t gtid_215266 = sext_i32_i64(sext_i64_i32(ltid_pre_228267));\n    int32_t phys_tid_215267 = local_tid_228263;\n    __local unsigned char *red_arr_mem_228286;\n    \n    red_arr_mem_228286 = (__local unsigned char *) red_arr_mem_228286_backing_9;\n    \n    __local unsigned char *red_arr_mem_228288;\n    \n    red_arr_mem_228288 = (__local\n                          unsigned char *) red_arr_mem_228288_backing_10;\n    \n    float x_215275;\n    \n    x_215275 = ((__local float *) color_225084)[gtid_215266];\n    \n    float x_215276;\n    \n    x_215276 = ((__local float *) color_225082)[gtid_215266];\n    \n    float x_215277;\n    \n    x_215277 = ((__local float *) color_225083)[gtid_215266];\n    \n    bool cond_215278 = sle64(n_196692, gtid_215266);\n    float defunc_0_f_res_215279;\n    \n    if (cond_215",
                   "278) {\n        defunc_0_f_res_215279 = 0.0F;\n    } else {\n        int64_t i_215280 = add64(x_215182, gtid_215266);\n        float defunc_0_add_arg_215281;\n        \n        defunc_0_add_arg_215281 = ((__global float *) mem_223608)[gtid_215174 *\n                                                                  n_196692 +\n                                                                  i_215280];\n        defunc_0_f_res_215279 = defunc_0_add_arg_215281;\n    }\n    \n    float x_215282 = a12_215259 * x_215275;\n    float y_215283 = b12_215260 * x_215276;\n    float x_215284 = x_215282 + y_215283;\n    float y_215285 = c12_215261 * x_215277;\n    float x_215286 = x_215284 + y_215285;\n    float defunc_9_fit_fun_res_215287 = defunc_0_f_res_215279 * x_215286;\n    float x_215288 = b12_215260 * x_215275;\n    float y_215289 = b2_215262 * x_215276;\n    float x_215290 = x_215288 + y_215289;\n    float y_215291 = c2_215263 * x_215277;\n    float x_215292 = x_215290 + y_215291;\n    float defunc_9_slope_fun_res_215293 = defunc_0_f_res_215279 * x_215292;\n    \n    ((__local float *) red_arr_mem_228286)[gtid_215266] =\n        defunc_9_fit_fun_res_215287;\n    ((__local float *) red_arr_mem_228288)[gtid_215266] =\n        defunc_9_slope_fun_res_215293;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_228290;\n    int32_t skip_waves_228291 = 1;\n    float x_215268;\n    float x_215269;\n    float x_215270;\n    float x_215271;\n    \n    offset_228290 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_228263, sext_i64_i32(q_l_196697))) {\n            x_215268 = ((__local\n                         float *) red_arr_mem_228286)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228290)];\n            x_215269 = ((__local\n                         float *) red_arr_mem_228288)[sext_i32_i64(local_tid_228263 +\n                                                      offset_228290)];\n        }\n    }\n    offset_228290 = 1;\n    w",
                   "hile (slt32(offset_228290, wave_sizze_228265)) {\n        if (slt32(local_tid_228263 + offset_228290, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228263 - squot32(local_tid_228263, wave_sizze_228265) *\n              wave_sizze_228265) & (2 * offset_228290 - 1)) == 0) {\n            // read array element\n            {\n                x_215270 = ((volatile __local\n                             float *) red_arr_mem_228286)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228290)];\n                x_215271 = ((volatile __local\n                             float *) red_arr_mem_228288)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228290)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_215272 = x_215268 + x_215270;\n                float defunc_1_op_res_215273 = x_215269 + x_215271;\n                \n                x_215268 = defunc_1_op_res_215272;\n                x_215269 = defunc_1_op_res_215273;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_228286)[sext_i32_i64(local_tid_228263)] =\n                    x_215268;\n                ((volatile __local\n                  float *) red_arr_mem_228288)[sext_i32_i64(local_tid_228263)] =\n                    x_215269;\n            }\n        }\n        offset_228290 *= 2;\n    }\n    while (slt32(skip_waves_228291, squot32(sext_i64_i32(q_l_196697) +\n                                            wave_sizze_228265 - 1,\n                                            wave_sizze_228265))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_228290 = skip_waves_228291 * wave_sizze_228265;\n        if (slt32(local_tid_228263 + offset_228290, sext_i64_i32(q_l_196697)) &&\n            ((local_tid_228263 - squot32(local_tid_228263, wave_sizze_228265) *\n              wave_sizze_228265) == 0 && (",
                   "squot32(local_tid_228263,\n                                                  wave_sizze_228265) & (2 *\n                                                                        skip_waves_228291 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_215270 = ((__local\n                             float *) red_arr_mem_228286)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228290)];\n                x_215271 = ((__local\n                             float *) red_arr_mem_228288)[sext_i32_i64(local_tid_228263 +\n                                                          offset_228290)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_215272 = x_215268 + x_215270;\n                float defunc_1_op_res_215273 = x_215269 + x_215271;\n                \n                x_215268 = defunc_1_op_res_215272;\n                x_215269 = defunc_1_op_res_215273;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_228286)[sext_i32_i64(local_tid_228263)] =\n                    x_215268;\n                ((__local\n                  float *) red_arr_mem_228288)[sext_i32_i64(local_tid_228263)] =\n                    x_215269;\n            }\n        }\n        skip_waves_228291 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_215264 = ((__local\n                                   float *) red_arr_mem_228286)[(int64_t) 0];\n    defunc_2_reduce_res_215265 = ((__local\n                                   float *) red_arr_mem_228288)[(int64_t) 0];\n    if (local_tid_228263 == 0) {\n        ((__global float *) mem_223955)[gtid_215174 * l_n_m_196752 +\n                                        gtid_215175] =\n            defunc_2_reduce_res_215264;\n    }\n    if (local_tid_228263 == 0) {\n        ((__glo",
                   "bal float *) mem_223959)[gtid_215174 * l_n_m_196752 +\n                                        gtid_215175] =\n            defunc_2_reduce_res_215265;\n    }\n    \n  error_5:\n    return;\n}\n__kernel void mainzisegmap_intragroup_219000(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229148_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229144_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225100_backing_aligned_2,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_t_196696,\n                                             int64_t jump_t_196702,\n                                             int64_t t_n_m_196759,\n                                             int64_t i_196779, __global\n                                             unsigned char *ext_mem_222256,\n                                             __global\n                                             unsigned char *ext_mem_222257,\n                                             __global\n                                             unsigned char *ext_mem_222517,\n                                             __global\n                                             unsigned char *ext_mem_222518,\n                                             __global unsigned char *mem_224482,\n                                             __global unsigned char *mem_224486,\n                                             __global unsigned char *mem_224496)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_229148_backing_2 =\n                                   (__local volatile\n ",
                   "                                   unsigned char *) red_arr_mem_229148_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229144_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229144_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225100_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225100_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229132;\n    int32_t local_tid_229133;\n    int64_t group_sizze_229136;\n    int32_t wave_sizze_229135;\n    int32_t group_tid_229134;\n    \n    global_tid_229132 = get_global_id(0);\n    local_tid_229133 = get_local_id(0);\n    group_sizze_229136 = get_local_size(0);\n    wave_sizze_229135 = LOCKSTEP_WIDTH;\n    group_tid_229134 = get_group_id(0);\n    \n    int32_t phys_tid_219000 = group_tid_229134;\n    int64_t slice_229138 = q_t_196696;\n    int64_t ltid_pre_229137 = sext_i32_i64(local_tid_229133);\n    int64_t remnant_229139 = sext_i32_i64(local_tid_229133) - ltid_pre_229137;\n    int64_t slice_229140 = t_n_m_196759;\n    int64_t slice_229141 = m_196691 * slice_229140;\n    int64_t gtid_218998 = squot64(sext_i32_i64(group_tid_229134), slice_229140);\n    int64_t remnant_229142 = sext_i32_i64(group_tid_229134) - gtid_218998 *\n            slice_229140;\n    int64_t gtid_218999 = remnant_229142;\n    int64_t remnant_229143 = remnant_229142 - gtid_218999;\n    __local unsigned char *color_225100;\n    \n    color_225100 = (__local unsigned char *) color_225100_backing_0;\n    \n    int64_t x_219003;\n    \n    x_219003 = ((__global int64_t *) ext_mem_222256)[gtid_218998];\n    \n    int64_t x_219009;\n    \n    x_219009 = ((__global int64_t *) ext_mem_222518)[gtid_218998 *\n                                                     t_n_m_196759 +\n                                                     gtid_218999];\n   ",
                   " \n    float x_219010;\n    \n    x_219010 = ((__global float *) ext_mem_222517)[gtid_218998 * t_n_m_196759 +\n                                                   gtid_218999];\n    \n    int64_t min_arg_219011 = mul64(jump_t_196702, gtid_218999);\n    int64_t min_res_219012 = smin64(i_196779, min_arg_219011);\n    int64_t defunc_0_g_res_219013 = add64((int64_t) 1, min_res_219012);\n    float defunc_2_reduce_res_219014;\n    int64_t gtid_219016 = sext_i32_i64(sext_i64_i32(ltid_pre_229137));\n    int32_t phys_tid_219017 = local_tid_229133;\n    __local unsigned char *red_arr_mem_229144;\n    \n    red_arr_mem_229144 = (__local unsigned char *) red_arr_mem_229144_backing_1;\n    \n    bool cond_219022 = sle64(x_219003, gtid_219016);\n    int64_t defunc_0_f_res_219023;\n    \n    if (cond_219022) {\n        defunc_0_f_res_219023 = (int64_t) 0;\n    } else {\n        int64_t i_219024 = add64(x_219009, gtid_219016);\n        int64_t defunc_0_add_arg_219025;\n        \n        defunc_0_add_arg_219025 = ((__global\n                                    int64_t *) ext_mem_222257)[gtid_218998 *\n                                                               n_196692 +\n                                                               i_219024];\n        \n        int64_t defunc_1_add_res_219026 = add64((int64_t) 1,\n                                                defunc_0_add_arg_219025);\n        \n        defunc_0_f_res_219023 = defunc_1_add_res_219026;\n    }\n    \n    float defunc_0_f_res_219027;\n    \n    if (cond_219022) {\n        defunc_0_f_res_219027 = 0.0F;\n    } else {\n        int64_t i_219028 = add64(x_219009, gtid_219016);\n        float defunc_0_add_arg_219029;\n        \n        defunc_0_add_arg_219029 = ((__global float *) mem_224482)[gtid_218998 *\n                                                                  n_196692 +\n                                                                  i_219028];\n        defunc_0_f_res_219027 = defunc_0_add_arg_219029;\n    }\n    \n    int64_t binop_p_219030 = sub64(def",
                   "unc_0_f_res_219023,\n                                   defunc_0_g_res_219013);\n    float defunc_0_f_res_219031 = sitofp_i64_f32(binop_p_219030);\n    float abs_res_219032 = (float) fabs(defunc_0_f_res_219031);\n    float tmp1_219033 = abs_res_219032 / x_219010;\n    float x_219034 = tmp1_219033 * tmp1_219033;\n    float y_219035 = tmp1_219033 * x_219034;\n    float tmp2_219036 = 1.0F - y_219035;\n    float x_219037 = tmp2_219036 * tmp2_219036;\n    float tmp3_219038 = tmp2_219036 * x_219037;\n    float tmp4_219039 = defunc_0_f_res_219027 * tmp3_219038;\n    \n    ((__local float *) red_arr_mem_229144)[gtid_219016] = tmp4_219039;\n    ((__local float *) color_225100)[gtid_219016] = tmp4_219039;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229146;\n    int32_t skip_waves_229147 = 1;\n    float x_219018;\n    float x_219019;\n    \n    offset_229146 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229133, sext_i64_i32(q_t_196696))) {\n            x_219018 = ((__local\n                         float *) red_arr_mem_229144)[sext_i32_i64(local_tid_229133 +\n                                                      offset_229146)];\n        }\n    }\n    offset_229146 = 1;\n    while (slt32(offset_229146, wave_sizze_229135)) {\n        if (slt32(local_tid_229133 + offset_229146, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229133 - squot32(local_tid_229133, wave_sizze_229135) *\n              wave_sizze_229135) & (2 * offset_229146 - 1)) == 0) {\n            // read array element\n            {\n                x_219019 = ((volatile __local\n                             float *) red_arr_mem_229144)[sext_i32_i64(local_tid_229133 +\n                                                          offset_229146)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219020 = x_219018 + x_219019;\n                \n                x_219018 = defunc_1_op_res_219020;\n            }\n            // write res",
                   "ult of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_229144)[sext_i32_i64(local_tid_229133)] =\n                    x_219018;\n            }\n        }\n        offset_229146 *= 2;\n    }\n    while (slt32(skip_waves_229147, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229135 - 1,\n                                            wave_sizze_229135))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229146 = skip_waves_229147 * wave_sizze_229135;\n        if (slt32(local_tid_229133 + offset_229146, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229133 - squot32(local_tid_229133, wave_sizze_229135) *\n              wave_sizze_229135) == 0 && (squot32(local_tid_229133,\n                                                  wave_sizze_229135) & (2 *\n                                                                        skip_waves_229147 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219019 = ((__local\n                             float *) red_arr_mem_229144)[sext_i32_i64(local_tid_229133 +\n                                                          offset_229146)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219020 = x_219018 + x_219019;\n                \n                x_219018 = defunc_1_op_res_219020;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_229144)[sext_i32_i64(local_tid_229133)] =\n                    x_219018;\n            }\n        }\n        skip_waves_229147 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219014 = ((__local\n                                   float *) red_arr_mem_229144)[(int64_t) 0];\n    \n    float a0_219040 = 1.0F / defunc_2_reduce_res_219014;\n    float defunc_2_reduc",
                   "e_res_219041;\n    int64_t gtid_219042 = sext_i32_i64(sext_i64_i32(ltid_pre_229137));\n    int32_t phys_tid_219043 = local_tid_229133;\n    __local unsigned char *red_arr_mem_229148;\n    \n    red_arr_mem_229148 = (__local unsigned char *) red_arr_mem_229148_backing_2;\n    \n    float x_219048;\n    \n    x_219048 = ((__local float *) color_225100)[gtid_219042];\n    \n    bool cond_219049 = sle64(x_219003, gtid_219042);\n    float defunc_0_f_res_219050;\n    \n    if (cond_219049) {\n        defunc_0_f_res_219050 = 0.0F;\n    } else {\n        int64_t i_219051 = add64(x_219009, gtid_219042);\n        float defunc_0_add_arg_219052;\n        \n        defunc_0_add_arg_219052 = ((__global float *) mem_224486)[gtid_218998 *\n                                                                  n_196692 +\n                                                                  i_219051];\n        defunc_0_f_res_219050 = defunc_0_add_arg_219052;\n    }\n    \n    float x_219053 = a0_219040 * x_219048;\n    float defunc_9_fit_fun_res_219054 = defunc_0_f_res_219050 * x_219053;\n    \n    ((__local float *) red_arr_mem_229148)[gtid_219042] =\n        defunc_9_fit_fun_res_219054;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229150;\n    int32_t skip_waves_229151 = 1;\n    float x_219044;\n    float x_219045;\n    \n    offset_229150 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229133, sext_i64_i32(q_t_196696))) {\n            x_219044 = ((__local\n                         float *) red_arr_mem_229148)[sext_i32_i64(local_tid_229133 +\n                                                      offset_229150)];\n        }\n    }\n    offset_229150 = 1;\n    while (slt32(offset_229150, wave_sizze_229135)) {\n        if (slt32(local_tid_229133 + offset_229150, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229133 - squot32(local_tid_229133, wave_sizze_229135) *\n              wave_sizze_229135) & (2 * offset_229150 - 1)) == 0) {\n            // read array element\n        ",
                   "    {\n                x_219045 = ((volatile __local\n                             float *) red_arr_mem_229148)[sext_i32_i64(local_tid_229133 +\n                                                          offset_229150)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219046 = x_219044 + x_219045;\n                \n                x_219044 = defunc_1_op_res_219046;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_229148)[sext_i32_i64(local_tid_229133)] =\n                    x_219044;\n            }\n        }\n        offset_229150 *= 2;\n    }\n    while (slt32(skip_waves_229151, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229135 - 1,\n                                            wave_sizze_229135))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229150 = skip_waves_229151 * wave_sizze_229135;\n        if (slt32(local_tid_229133 + offset_229150, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229133 - squot32(local_tid_229133, wave_sizze_229135) *\n              wave_sizze_229135) == 0 && (squot32(local_tid_229133,\n                                                  wave_sizze_229135) & (2 *\n                                                                        skip_waves_229151 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219045 = ((__local\n                             float *) red_arr_mem_229148)[sext_i32_i64(local_tid_229133 +\n                                                          offset_229150)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219046 = x_219044 + x_219045;\n                \n                x_219044 = defunc_1_op_res_219046;\n            }\n            // write result of oper",
                   "ation\n            {\n                ((__local\n                  float *) red_arr_mem_229148)[sext_i32_i64(local_tid_229133)] =\n                    x_219044;\n            }\n        }\n        skip_waves_229151 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219041 = ((__local\n                                   float *) red_arr_mem_229148)[(int64_t) 0];\n    if (local_tid_229133 == 0) {\n        ((__global float *) mem_224496)[gtid_218998 * t_n_m_196759 +\n                                        gtid_218999] =\n            defunc_2_reduce_res_219041;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzisegmap_intragroup_219313(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229194_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229192_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229188_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229186_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229184_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225102_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *color_225101_backing_aligned_6,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_t_196696,\n                                             int64_t jump_t_196702,\n                                      ",
                   "       int64_t t_n_m_196759,\n                                             int64_t i_196779, __global\n                                             unsigned char *ext_mem_222256,\n                                             __global\n                                             unsigned char *ext_mem_222257,\n                                             __global\n                                             unsigned char *ext_mem_222517,\n                                             __global\n                                             unsigned char *ext_mem_222518,\n                                             __global unsigned char *mem_224506,\n                                             __global unsigned char *mem_224510,\n                                             __global unsigned char *mem_224523,\n                                             __global unsigned char *mem_224527)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_229194_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229194_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229192_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229192_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_229188_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229188_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_229186_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229186_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_229184_backing_2 =\n                                   (__local volatile\n        ",
                   "                            unsigned char *) red_arr_mem_229184_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225102_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225102_backing_aligned_5;\n    __local volatile unsigned char *restrict color_225101_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225101_backing_aligned_6;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229172;\n    int32_t local_tid_229173;\n    int64_t group_sizze_229176;\n    int32_t wave_sizze_229175;\n    int32_t group_tid_229174;\n    \n    global_tid_229172 = get_global_id(0);\n    local_tid_229173 = get_local_id(0);\n    group_sizze_229176 = get_local_size(0);\n    wave_sizze_229175 = LOCKSTEP_WIDTH;\n    group_tid_229174 = get_group_id(0);\n    \n    int32_t phys_tid_219313 = group_tid_229174;\n    int64_t slice_229178 = q_t_196696;\n    int64_t ltid_pre_229177 = sext_i32_i64(local_tid_229173);\n    int64_t remnant_229179 = sext_i32_i64(local_tid_229173) - ltid_pre_229177;\n    int64_t slice_229180 = t_n_m_196759;\n    int64_t slice_229181 = m_196691 * slice_229180;\n    int64_t gtid_219311 = squot64(sext_i32_i64(group_tid_229174), slice_229180);\n    int64_t remnant_229182 = sext_i32_i64(group_tid_229174) - gtid_219311 *\n            slice_229180;\n    int64_t gtid_219312 = remnant_229182;\n    int64_t remnant_229183 = remnant_229182 - gtid_219312;\n    __local unsigned char *color_225101;\n    \n    color_225101 = (__local unsigned char *) color_225101_backing_0;\n    \n    __local unsigned char *color_225102;\n    \n    color_225102 = (__local unsigned char *) color_225102_backing_1;\n    \n    int64_t x_219316;\n    \n    x_219316 = ((__global int64_t *) ext_mem_222256)[gtid_219311];\n    \n    int64_t x_219322;\n    \n    x_219322 = ((__global int64_t *) ext_mem_222518)[gtid_219311 *\n                                     ",
                   "                t_n_m_196759 +\n                                                     gtid_219312];\n    \n    float x_219323;\n    \n    x_219323 = ((__global float *) ext_mem_222517)[gtid_219311 * t_n_m_196759 +\n                                                   gtid_219312];\n    \n    int64_t min_arg_219324 = mul64(jump_t_196702, gtid_219312);\n    int64_t min_res_219325 = smin64(i_196779, min_arg_219324);\n    int64_t defunc_0_g_res_219326 = add64((int64_t) 1, min_res_219325);\n    float defunc_2_reduce_res_219327;\n    float defunc_2_reduce_res_219328;\n    float defunc_2_reduce_res_219329;\n    int64_t gtid_219332 = sext_i32_i64(sext_i64_i32(ltid_pre_229177));\n    int32_t phys_tid_219333 = local_tid_229173;\n    __local unsigned char *red_arr_mem_229184;\n    \n    red_arr_mem_229184 = (__local unsigned char *) red_arr_mem_229184_backing_2;\n    \n    __local unsigned char *red_arr_mem_229186;\n    \n    red_arr_mem_229186 = (__local unsigned char *) red_arr_mem_229186_backing_3;\n    \n    __local unsigned char *red_arr_mem_229188;\n    \n    red_arr_mem_229188 = (__local unsigned char *) red_arr_mem_229188_backing_4;\n    \n    bool cond_219344 = sle64(x_219316, gtid_219332);\n    int64_t defunc_0_f_res_219345;\n    \n    if (cond_219344) {\n        defunc_0_f_res_219345 = (int64_t) 0;\n    } else {\n        int64_t i_219346 = add64(x_219322, gtid_219332);\n        int64_t defunc_0_add_arg_219347;\n        \n        defunc_0_add_arg_219347 = ((__global\n                                    int64_t *) ext_mem_222257)[gtid_219311 *\n                                                               n_196692 +\n                                                               i_219346];\n        \n        int64_t defunc_1_add_res_219348 = add64((int64_t) 1,\n                                                defunc_0_add_arg_219347);\n        \n        defunc_0_f_res_219345 = defunc_1_add_res_219348;\n    }\n    \n    float defunc_0_f_res_219349;\n    \n    if (cond_219344) {\n        defunc_0_f_res_219349 = 0.0F;\n    }",
                   " else {\n        int64_t i_219350 = add64(x_219322, gtid_219332);\n        float defunc_0_add_arg_219351;\n        \n        defunc_0_add_arg_219351 = ((__global float *) mem_224506)[gtid_219311 *\n                                                                  n_196692 +\n                                                                  i_219350];\n        defunc_0_f_res_219349 = defunc_0_add_arg_219351;\n    }\n    \n    int64_t binop_p_219352 = sub64(defunc_0_f_res_219345,\n                                   defunc_0_g_res_219326);\n    float defunc_0_f_res_219353 = sitofp_i64_f32(binop_p_219352);\n    float abs_res_219354 = (float) fabs(defunc_0_f_res_219353);\n    float tmp1_219355 = abs_res_219354 / x_219323;\n    float x_219356 = tmp1_219355 * tmp1_219355;\n    float y_219357 = tmp1_219355 * x_219356;\n    float tmp2_219358 = 1.0F - y_219357;\n    float x_219359 = tmp2_219358 * tmp2_219358;\n    float tmp3_219360 = tmp2_219358 * x_219359;\n    float tmp4_219361 = defunc_0_f_res_219349 * tmp3_219360;\n    float defunc_1_f_res_219362 = defunc_0_f_res_219353 * tmp4_219361;\n    float defunc_1_f_res_219363 = defunc_0_f_res_219353 * defunc_1_f_res_219362;\n    \n    ((__local float *) red_arr_mem_229184)[gtid_219332] = tmp4_219361;\n    ((__local float *) red_arr_mem_229186)[gtid_219332] = defunc_1_f_res_219362;\n    ((__local float *) red_arr_mem_229188)[gtid_219332] = defunc_1_f_res_219363;\n    ((__local float *) color_225102)[gtid_219332] = defunc_1_f_res_219362;\n    ((__local float *) color_225101)[gtid_219332] = tmp4_219361;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229190;\n    int32_t skip_waves_229191 = 1;\n    float x_219334;\n    float x_219335;\n    float x_219336;\n    float x_219337;\n    float x_219338;\n    float x_219339;\n    \n    offset_229190 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229173, sext_i64_i32(q_t_196696))) {\n            x_219334 = ((__local\n                         float *) red_arr_mem_229184)[sext_",
                   "i32_i64(local_tid_229173 +\n                                                      offset_229190)];\n            x_219335 = ((__local\n                         float *) red_arr_mem_229186)[sext_i32_i64(local_tid_229173 +\n                                                      offset_229190)];\n            x_219336 = ((__local\n                         float *) red_arr_mem_229188)[sext_i32_i64(local_tid_229173 +\n                                                      offset_229190)];\n        }\n    }\n    offset_229190 = 1;\n    while (slt32(offset_229190, wave_sizze_229175)) {\n        if (slt32(local_tid_229173 + offset_229190, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229173 - squot32(local_tid_229173, wave_sizze_229175) *\n              wave_sizze_229175) & (2 * offset_229190 - 1)) == 0) {\n            // read array element\n            {\n                x_219337 = ((volatile __local\n                             float *) red_arr_mem_229184)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n                x_219338 = ((volatile __local\n                             float *) red_arr_mem_229186)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n                x_219339 = ((volatile __local\n                             float *) red_arr_mem_229188)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219340 = x_219334 + x_219337;\n                float defunc_1_op_res_219341 = x_219335 + x_219338;\n                float defunc_1_op_res_219342 = x_219336 + x_219339;\n                \n                x_219334 = defunc_1_op_res_219340;\n                x_219335 = defunc_1_op_res_219341;\n                x_219336 = defunc_1_op_res_219342;\n            }\n            // write result of operation\n            {\n       ",
                   "         ((volatile __local\n                  float *) red_arr_mem_229184)[sext_i32_i64(local_tid_229173)] =\n                    x_219334;\n                ((volatile __local\n                  float *) red_arr_mem_229186)[sext_i32_i64(local_tid_229173)] =\n                    x_219335;\n                ((volatile __local\n                  float *) red_arr_mem_229188)[sext_i32_i64(local_tid_229173)] =\n                    x_219336;\n            }\n        }\n        offset_229190 *= 2;\n    }\n    while (slt32(skip_waves_229191, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229175 - 1,\n                                            wave_sizze_229175))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229190 = skip_waves_229191 * wave_sizze_229175;\n        if (slt32(local_tid_229173 + offset_229190, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229173 - squot32(local_tid_229173, wave_sizze_229175) *\n              wave_sizze_229175) == 0 && (squot32(local_tid_229173,\n                                                  wave_sizze_229175) & (2 *\n                                                                        skip_waves_229191 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219337 = ((__local\n                             float *) red_arr_mem_229184)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n                x_219338 = ((__local\n                             float *) red_arr_mem_229186)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n                x_219339 = ((__local\n                             float *) red_arr_mem_229188)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229190)];\n            }\n            // apply reduction operation\n ",
                   "           {\n                float defunc_1_op_res_219340 = x_219334 + x_219337;\n                float defunc_1_op_res_219341 = x_219335 + x_219338;\n                float defunc_1_op_res_219342 = x_219336 + x_219339;\n                \n                x_219334 = defunc_1_op_res_219340;\n                x_219335 = defunc_1_op_res_219341;\n                x_219336 = defunc_1_op_res_219342;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_229184)[sext_i32_i64(local_tid_229173)] =\n                    x_219334;\n                ((__local\n                  float *) red_arr_mem_229186)[sext_i32_i64(local_tid_229173)] =\n                    x_219335;\n                ((__local\n                  float *) red_arr_mem_229188)[sext_i32_i64(local_tid_229173)] =\n                    x_219336;\n            }\n        }\n        skip_waves_229191 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219327 = ((__local\n                                   float *) red_arr_mem_229184)[(int64_t) 0];\n    defunc_2_reduce_res_219328 = ((__local\n                                   float *) red_arr_mem_229186)[(int64_t) 0];\n    defunc_2_reduce_res_219329 = ((__local\n                                   float *) red_arr_mem_229188)[(int64_t) 0];\n    \n    float x_219364 = defunc_2_reduce_res_219327 * defunc_2_reduce_res_219329;\n    float y_219365 = defunc_2_reduce_res_219328 * defunc_2_reduce_res_219328;\n    float y_219366 = x_219364 - y_219365;\n    float det1_219367 = 1.0F / y_219366;\n    float a11_219368 = defunc_2_reduce_res_219329 * det1_219367;\n    float x_219369 = 0.0F - defunc_2_reduce_res_219328;\n    float b11_219370 = det1_219367 * x_219369;\n    float c11_219371 = defunc_2_reduce_res_219327 * det1_219367;\n    float defunc_2_reduce_res_219372;\n    float defunc_2_reduce_res_219373;\n    int64_t gtid_219374 = sext_i32_i64(sext_i64_i32(ltid_pre_229177));\n    int32_t phys_tid_219375 = local_tid_229173;\n  ",
                   "  __local unsigned char *red_arr_mem_229192;\n    \n    red_arr_mem_229192 = (__local unsigned char *) red_arr_mem_229192_backing_5;\n    \n    __local unsigned char *red_arr_mem_229194;\n    \n    red_arr_mem_229194 = (__local unsigned char *) red_arr_mem_229194_backing_6;\n    \n    float x_219383;\n    \n    x_219383 = ((__local float *) color_225101)[gtid_219374];\n    \n    float x_219384;\n    \n    x_219384 = ((__local float *) color_225102)[gtid_219374];\n    \n    bool cond_219385 = sle64(x_219316, gtid_219374);\n    float defunc_0_f_res_219386;\n    \n    if (cond_219385) {\n        defunc_0_f_res_219386 = 0.0F;\n    } else {\n        int64_t i_219387 = add64(x_219322, gtid_219374);\n        float defunc_0_add_arg_219388;\n        \n        defunc_0_add_arg_219388 = ((__global float *) mem_224510)[gtid_219311 *\n                                                                  n_196692 +\n                                                                  i_219387];\n        defunc_0_f_res_219386 = defunc_0_add_arg_219388;\n    }\n    \n    float x_219389 = a11_219368 * x_219383;\n    float y_219390 = b11_219370 * x_219384;\n    float x_219391 = x_219389 + y_219390;\n    float defunc_9_fit_fun_res_219392 = defunc_0_f_res_219386 * x_219391;\n    float x_219393 = b11_219370 * x_219383;\n    float y_219394 = c11_219371 * x_219384;\n    float x_219395 = x_219393 + y_219394;\n    float defunc_9_slope_fun_res_219396 = defunc_0_f_res_219386 * x_219395;\n    \n    ((__local float *) red_arr_mem_229192)[gtid_219374] =\n        defunc_9_fit_fun_res_219392;\n    ((__local float *) red_arr_mem_229194)[gtid_219374] =\n        defunc_9_slope_fun_res_219396;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229196;\n    int32_t skip_waves_229197 = 1;\n    float x_219376;\n    float x_219377;\n    float x_219378;\n    float x_219379;\n    \n    offset_229196 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229173, sext_i64_i32(q_t_196696))) {\n            x_219376 = ((__lo",
                   "cal\n                         float *) red_arr_mem_229192)[sext_i32_i64(local_tid_229173 +\n                                                      offset_229196)];\n            x_219377 = ((__local\n                         float *) red_arr_mem_229194)[sext_i32_i64(local_tid_229173 +\n                                                      offset_229196)];\n        }\n    }\n    offset_229196 = 1;\n    while (slt32(offset_229196, wave_sizze_229175)) {\n        if (slt32(local_tid_229173 + offset_229196, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229173 - squot32(local_tid_229173, wave_sizze_229175) *\n              wave_sizze_229175) & (2 * offset_229196 - 1)) == 0) {\n            // read array element\n            {\n                x_219378 = ((volatile __local\n                             float *) red_arr_mem_229192)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229196)];\n                x_219379 = ((volatile __local\n                             float *) red_arr_mem_229194)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229196)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219380 = x_219376 + x_219378;\n                float defunc_1_op_res_219381 = x_219377 + x_219379;\n                \n                x_219376 = defunc_1_op_res_219380;\n                x_219377 = defunc_1_op_res_219381;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_229192)[sext_i32_i64(local_tid_229173)] =\n                    x_219376;\n                ((volatile __local\n                  float *) red_arr_mem_229194)[sext_i32_i64(local_tid_229173)] =\n                    x_219377;\n            }\n        }\n        offset_229196 *= 2;\n    }\n    while (slt32(skip_waves_229197, squot32(sext_i64_i32(q_t_196696) +\n                                           ",
                   " wave_sizze_229175 - 1,\n                                            wave_sizze_229175))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229196 = skip_waves_229197 * wave_sizze_229175;\n        if (slt32(local_tid_229173 + offset_229196, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229173 - squot32(local_tid_229173, wave_sizze_229175) *\n              wave_sizze_229175) == 0 && (squot32(local_tid_229173,\n                                                  wave_sizze_229175) & (2 *\n                                                                        skip_waves_229197 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219378 = ((__local\n                             float *) red_arr_mem_229192)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229196)];\n                x_219379 = ((__local\n                             float *) red_arr_mem_229194)[sext_i32_i64(local_tid_229173 +\n                                                          offset_229196)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219380 = x_219376 + x_219378;\n                float defunc_1_op_res_219381 = x_219377 + x_219379;\n                \n                x_219376 = defunc_1_op_res_219380;\n                x_219377 = defunc_1_op_res_219381;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_229192)[sext_i32_i64(local_tid_229173)] =\n                    x_219376;\n                ((__local\n                  float *) red_arr_mem_229194)[sext_i32_i64(local_tid_229173)] =\n                    x_219377;\n            }\n        }\n        skip_waves_229197 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219372 = ((__local\n                                   float *) red_arr_mem",
                   "_229192)[(int64_t) 0];\n    defunc_2_reduce_res_219373 = ((__local\n                                   float *) red_arr_mem_229194)[(int64_t) 0];\n    if (local_tid_229173 == 0) {\n        ((__global float *) mem_224523)[gtid_219311 * t_n_m_196759 +\n                                        gtid_219312] =\n            defunc_2_reduce_res_219372;\n    }\n    if (local_tid_229173 == 0) {\n        ((__global float *) mem_224527)[gtid_219311 * t_n_m_196759 +\n                                        gtid_219312] =\n            defunc_2_reduce_res_219373;\n    }\n    \n  error_4:\n    return;\n}\n__kernel void mainzisegmap_intragroup_219717(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229244_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229242_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229238_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229236_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229234_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229232_backing_aligned_5,\n                                             __local volatile\n                                             int64_t *red_arr_mem_229230_backing_aligned_6,\n                                             __local volatile\n                                             int64_t *color_225106_backing_aligned_7,\n                                             __local volatile\n                                             int64_t *col",
                   "or_225105_backing_aligned_8,\n                                             __local volatile\n                                             int64_t *color_225104_backing_aligned_9,\n                                             __local volatile\n                                             int64_t *color_225103_backing_aligned_10,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t q_t_196696,\n                                             int64_t jump_t_196702,\n                                             int64_t t_n_m_196759,\n                                             int64_t i_196779, __global\n                                             unsigned char *ext_mem_222256,\n                                             __global\n                                             unsigned char *ext_mem_222257,\n                                             __global\n                                             unsigned char *ext_mem_222517,\n                                             __global\n                                             unsigned char *ext_mem_222518,\n                                             __global unsigned char *mem_224537,\n                                             __global unsigned char *mem_224541,\n                                             __global unsigned char *mem_224561,\n                                             __global unsigned char *mem_224565)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_229244_backing_10 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229244_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229242_backing_9 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229242_backing_aligned_1",
                   ";\n    __local volatile unsigned char *restrict red_arr_mem_229238_backing_8 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229238_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_229236_backing_7 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229236_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_229234_backing_6 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229234_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_229232_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229232_backing_aligned_5;\n    __local volatile unsigned char *restrict red_arr_mem_229230_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229230_backing_aligned_6;\n    __local volatile unsigned char *restrict color_225106_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225106_backing_aligned_7;\n    __local volatile unsigned char *restrict color_225105_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225105_backing_aligned_8;\n    __local volatile unsigned char *restrict color_225104_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225104_backing_aligned_9;\n    __local volatile unsigned char *restrict color_225103_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225103_backing_aligned_10;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32",
                   "_t global_tid_229218;\n    int32_t local_tid_229219;\n    int64_t group_sizze_229222;\n    int32_t wave_sizze_229221;\n    int32_t group_tid_229220;\n    \n    global_tid_229218 = get_global_id(0);\n    local_tid_229219 = get_local_id(0);\n    group_sizze_229222 = get_local_size(0);\n    wave_sizze_229221 = LOCKSTEP_WIDTH;\n    group_tid_229220 = get_group_id(0);\n    \n    int32_t phys_tid_219717 = group_tid_229220;\n    int64_t slice_229224 = q_t_196696;\n    int64_t ltid_pre_229223 = sext_i32_i64(local_tid_229219);\n    int64_t remnant_229225 = sext_i32_i64(local_tid_229219) - ltid_pre_229223;\n    int64_t slice_229226 = t_n_m_196759;\n    int64_t slice_229227 = m_196691 * slice_229226;\n    int64_t gtid_219715 = squot64(sext_i32_i64(group_tid_229220), slice_229226);\n    int64_t remnant_229228 = sext_i32_i64(group_tid_229220) - gtid_219715 *\n            slice_229226;\n    int64_t gtid_219716 = remnant_229228;\n    int64_t remnant_229229 = remnant_229228 - gtid_219716;\n    __local unsigned char *color_225103;\n    \n    color_225103 = (__local unsigned char *) color_225103_backing_0;\n    \n    __local unsigned char *color_225104;\n    \n    color_225104 = (__local unsigned char *) color_225104_backing_1;\n    \n    __local unsigned char *color_225105;\n    \n    color_225105 = (__local unsigned char *) color_225105_backing_2;\n    \n    __local unsigned char *color_225106;\n    \n    color_225106 = (__local unsigned char *) color_225106_backing_3;\n    \n    int64_t x_219720;\n    \n    x_219720 = ((__global int64_t *) ext_mem_222256)[gtid_219715];\n    \n    int64_t x_219726;\n    \n    x_219726 = ((__global int64_t *) ext_mem_222518)[gtid_219715 *\n                                                     t_n_m_196759 +\n                                                     gtid_219716];\n    \n    float x_219727;\n    \n    x_219727 = ((__global float *) ext_mem_222517)[gtid_219715 * t_n_m_196759 +\n                                                   gtid_219716];\n    \n    int64_t min_arg_219728 = mul64(jump_t_1967",
                   "02, gtid_219716);\n    int64_t min_res_219729 = smin64(i_196779, min_arg_219728);\n    int64_t defunc_0_g_res_219730 = add64((int64_t) 1, min_res_219729);\n    int64_t gtid_219733 = sext_i32_i64(sext_i64_i32(ltid_pre_229223));\n    int32_t phys_tid_219734 = local_tid_229219;\n    bool cond_219736 = sle64(x_219720, gtid_219733);\n    int64_t defunc_0_f_res_219737;\n    \n    if (cond_219736) {\n        defunc_0_f_res_219737 = (int64_t) 0;\n    } else {\n        int64_t i_219738 = add64(x_219726, gtid_219733);\n        int64_t defunc_0_add_arg_219739;\n        \n        defunc_0_add_arg_219739 = ((__global\n                                    int64_t *) ext_mem_222257)[gtid_219715 *\n                                                               n_196692 +\n                                                               i_219738];\n        \n        int64_t defunc_1_add_res_219740 = add64((int64_t) 1,\n                                                defunc_0_add_arg_219739);\n        \n        defunc_0_f_res_219737 = defunc_1_add_res_219740;\n    }\n    \n    float defunc_0_f_res_219741;\n    \n    if (cond_219736) {\n        defunc_0_f_res_219741 = 0.0F;\n    } else {\n        int64_t i_219742 = add64(x_219726, gtid_219733);\n        float defunc_0_add_arg_219743;\n        \n        defunc_0_add_arg_219743 = ((__global float *) mem_224537)[gtid_219715 *\n                                                                  n_196692 +\n                                                                  i_219742];\n        defunc_0_f_res_219741 = defunc_0_add_arg_219743;\n    }\n    \n    int64_t binop_p_219744 = sub64(defunc_0_f_res_219737,\n                                   defunc_0_g_res_219730);\n    float defunc_0_f_res_219745 = sitofp_i64_f32(binop_p_219744);\n    float abs_res_219746 = (float) fabs(defunc_0_f_res_219745);\n    float tmp1_219747 = abs_res_219746 / x_219727;\n    float x_219748 = tmp1_219747 * tmp1_219747;\n    float y_219749 = tmp1_219747 * x_219748;\n    float tmp2_219750 = 1.0F - y_219749;\n    f",
                   "loat x_219751 = tmp2_219750 * tmp2_219750;\n    float tmp3_219752 = tmp2_219750 * x_219751;\n    float tmp4_219753 = defunc_0_f_res_219741 * tmp3_219752;\n    \n    ((__local float *) color_225106)[gtid_219733] = defunc_0_f_res_219745;\n    ((__local float *) color_225105)[gtid_219733] = tmp4_219753;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float defunc_2_reduce_res_219754;\n    float defunc_2_reduce_res_219755;\n    float defunc_2_reduce_res_219756;\n    float defunc_2_reduce_res_219757;\n    float defunc_2_reduce_res_219758;\n    int64_t gtid_219761 = sext_i32_i64(sext_i64_i32(ltid_pre_229223));\n    int32_t phys_tid_219762 = local_tid_229219;\n    __local unsigned char *red_arr_mem_229230;\n    \n    red_arr_mem_229230 = (__local unsigned char *) red_arr_mem_229230_backing_4;\n    \n    __local unsigned char *red_arr_mem_229232;\n    \n    red_arr_mem_229232 = (__local unsigned char *) red_arr_mem_229232_backing_5;\n    \n    __local unsigned char *red_arr_mem_229234;\n    \n    red_arr_mem_229234 = (__local unsigned char *) red_arr_mem_229234_backing_6;\n    \n    __local unsigned char *red_arr_mem_229236;\n    \n    red_arr_mem_229236 = (__local unsigned char *) red_arr_mem_229236_backing_7;\n    \n    __local unsigned char *red_arr_mem_229238;\n    \n    red_arr_mem_229238 = (__local unsigned char *) red_arr_mem_229238_backing_8;\n    \n    float x_219778;\n    \n    x_219778 = ((__local float *) color_225106)[gtid_219761];\n    \n    float x_219779;\n    \n    x_219779 = ((__local float *) color_225105)[gtid_219761];\n    \n    float defunc_1_f_res_219780 = x_219778 * x_219779;\n    float defunc_1_f_res_219781 = x_219778 * defunc_1_f_res_219780;\n    float defunc_1_f_res_219782 = x_219778 * defunc_1_f_res_219781;\n    float defunc_1_f_res_219783 = x_219778 * defunc_1_f_res_219782;\n    \n    ((__local float *) red_arr_mem_229230)[gtid_219761] = x_219779;\n    ((__local float *) red_arr_mem_229232)[gtid_219761] = defunc_1_f_res_219780;\n    ((__local float *) red_arr_mem_229234)[gtid_219761] = defunc_1_f",
                   "_res_219781;\n    ((__local float *) red_arr_mem_229236)[gtid_219761] = defunc_1_f_res_219782;\n    ((__local float *) red_arr_mem_229238)[gtid_219761] = defunc_1_f_res_219783;\n    ((__local float *) color_225104)[gtid_219761] = defunc_1_f_res_219781;\n    ((__local float *) color_225103)[gtid_219761] = defunc_1_f_res_219780;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229240;\n    int32_t skip_waves_229241 = 1;\n    float x_219763;\n    float x_219764;\n    float x_219765;\n    float x_219766;\n    float x_219767;\n    float x_219768;\n    float x_219769;\n    float x_219770;\n    float x_219771;\n    float x_219772;\n    \n    offset_229240 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229219, sext_i64_i32(q_t_196696))) {\n            x_219763 = ((__local\n                         float *) red_arr_mem_229230)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229240)];\n            x_219764 = ((__local\n                         float *) red_arr_mem_229232)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229240)];\n            x_219765 = ((__local\n                         float *) red_arr_mem_229234)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229240)];\n            x_219766 = ((__local\n                         float *) red_arr_mem_229236)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229240)];\n            x_219767 = ((__local\n                         float *) red_arr_mem_229238)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229240)];\n        }\n    }\n    offset_229240 = 1;\n    while (slt32(offset_229240, wave_sizze_229221)) {\n        if (slt32(local_tid_229219 + offset_229240, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229219 - squot32(local_tid_229219, wave_sizze_229221) *\n              wav",
                   "e_sizze_229221) & (2 * offset_229240 - 1)) == 0) {\n            // read array element\n            {\n                x_219768 = ((volatile __local\n                             float *) red_arr_mem_229230)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219769 = ((volatile __local\n                             float *) red_arr_mem_229232)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219770 = ((volatile __local\n                             float *) red_arr_mem_229234)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219771 = ((volatile __local\n                             float *) red_arr_mem_229236)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219772 = ((volatile __local\n                             float *) red_arr_mem_229238)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219773 = x_219763 + x_219768;\n                float defunc_1_op_res_219774 = x_219764 + x_219769;\n                float defunc_1_op_res_219775 = x_219765 + x_219770;\n                float defunc_1_op_res_219776 = x_219766 + x_219771;\n                float defunc_1_op_res_219777 = x_219767 + x_219772;\n                \n                x_219763 = defunc_1_op_res_219773;\n                x_219764 = defunc_1_op_res_219774;\n                x_219765 = defunc_1_op_res_219775;\n                x_219766 = defunc_1_op_res_219776;\n                x_219767 = defunc_1_op_res_219777;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_229230)[sext_i32_i64(l",
                   "ocal_tid_229219)] =\n                    x_219763;\n                ((volatile __local\n                  float *) red_arr_mem_229232)[sext_i32_i64(local_tid_229219)] =\n                    x_219764;\n                ((volatile __local\n                  float *) red_arr_mem_229234)[sext_i32_i64(local_tid_229219)] =\n                    x_219765;\n                ((volatile __local\n                  float *) red_arr_mem_229236)[sext_i32_i64(local_tid_229219)] =\n                    x_219766;\n                ((volatile __local\n                  float *) red_arr_mem_229238)[sext_i32_i64(local_tid_229219)] =\n                    x_219767;\n            }\n        }\n        offset_229240 *= 2;\n    }\n    while (slt32(skip_waves_229241, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229221 - 1,\n                                            wave_sizze_229221))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229240 = skip_waves_229241 * wave_sizze_229221;\n        if (slt32(local_tid_229219 + offset_229240, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229219 - squot32(local_tid_229219, wave_sizze_229221) *\n              wave_sizze_229221) == 0 && (squot32(local_tid_229219,\n                                                  wave_sizze_229221) & (2 *\n                                                                        skip_waves_229241 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219768 = ((__local\n                             float *) red_arr_mem_229230)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219769 = ((__local\n                             float *) red_arr_mem_229232)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219770 = ((__local\n                  ",
                   "           float *) red_arr_mem_229234)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219771 = ((__local\n                             float *) red_arr_mem_229236)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n                x_219772 = ((__local\n                             float *) red_arr_mem_229238)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229240)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219773 = x_219763 + x_219768;\n                float defunc_1_op_res_219774 = x_219764 + x_219769;\n                float defunc_1_op_res_219775 = x_219765 + x_219770;\n                float defunc_1_op_res_219776 = x_219766 + x_219771;\n                float defunc_1_op_res_219777 = x_219767 + x_219772;\n                \n                x_219763 = defunc_1_op_res_219773;\n                x_219764 = defunc_1_op_res_219774;\n                x_219765 = defunc_1_op_res_219775;\n                x_219766 = defunc_1_op_res_219776;\n                x_219767 = defunc_1_op_res_219777;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_229230)[sext_i32_i64(local_tid_229219)] =\n                    x_219763;\n                ((__local\n                  float *) red_arr_mem_229232)[sext_i32_i64(local_tid_229219)] =\n                    x_219764;\n                ((__local\n                  float *) red_arr_mem_229234)[sext_i32_i64(local_tid_229219)] =\n                    x_219765;\n                ((__local\n                  float *) red_arr_mem_229236)[sext_i32_i64(local_tid_229219)] =\n                    x_219766;\n                ((__local\n                  float *) red_arr_mem_229238)[sext_i32_i64(local_tid_229219)] =\n                    x_219767;\n            }\n",
                   "        }\n        skip_waves_229241 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219754 = ((__local\n                                   float *) red_arr_mem_229230)[(int64_t) 0];\n    defunc_2_reduce_res_219755 = ((__local\n                                   float *) red_arr_mem_229232)[(int64_t) 0];\n    defunc_2_reduce_res_219756 = ((__local\n                                   float *) red_arr_mem_229234)[(int64_t) 0];\n    defunc_2_reduce_res_219757 = ((__local\n                                   float *) red_arr_mem_229236)[(int64_t) 0];\n    defunc_2_reduce_res_219758 = ((__local\n                                   float *) red_arr_mem_229238)[(int64_t) 0];\n    \n    float x_219784 = defunc_2_reduce_res_219756 * defunc_2_reduce_res_219758;\n    float y_219785 = defunc_2_reduce_res_219757 * defunc_2_reduce_res_219757;\n    float a12_219786 = x_219784 - y_219785;\n    float x_219787 = defunc_2_reduce_res_219756 * defunc_2_reduce_res_219757;\n    float y_219788 = defunc_2_reduce_res_219755 * defunc_2_reduce_res_219758;\n    float b12_219789 = x_219787 - y_219788;\n    float x_219790 = defunc_2_reduce_res_219755 * defunc_2_reduce_res_219757;\n    float y_219791 = defunc_2_reduce_res_219756 * defunc_2_reduce_res_219756;\n    float c12_219792 = x_219790 - y_219791;\n    float x_219793 = defunc_2_reduce_res_219754 * defunc_2_reduce_res_219758;\n    float b2_219794 = x_219793 - y_219791;\n    float x_219795 = defunc_2_reduce_res_219755 * defunc_2_reduce_res_219756;\n    float y_219796 = defunc_2_reduce_res_219754 * defunc_2_reduce_res_219757;\n    float c2_219797 = x_219795 - y_219796;\n    float x_219798 = defunc_2_reduce_res_219754 * a12_219786;\n    float y_219799 = defunc_2_reduce_res_219755 * b12_219789;\n    float x_219800 = x_219798 + y_219799;\n    float y_219801 = defunc_2_reduce_res_219756 * c12_219792;\n    float y_219802 = x_219800 + y_219801;\n    float det_219803 = 1.0F / y_219802;\n    float a12_219804 = a12_219786 * det_219803;\n    float b12_219805 = b12_219",
                   "789 * det_219803;\n    float c12_219806 = c12_219792 * det_219803;\n    float b2_219807 = b2_219794 * det_219803;\n    float c2_219808 = c2_219797 * det_219803;\n    float defunc_2_reduce_res_219809;\n    float defunc_2_reduce_res_219810;\n    int64_t gtid_219811 = sext_i32_i64(sext_i64_i32(ltid_pre_229223));\n    int32_t phys_tid_219812 = local_tid_229219;\n    __local unsigned char *red_arr_mem_229242;\n    \n    red_arr_mem_229242 = (__local unsigned char *) red_arr_mem_229242_backing_9;\n    \n    __local unsigned char *red_arr_mem_229244;\n    \n    red_arr_mem_229244 = (__local\n                          unsigned char *) red_arr_mem_229244_backing_10;\n    \n    float x_219820;\n    \n    x_219820 = ((__local float *) color_225105)[gtid_219811];\n    \n    float x_219821;\n    \n    x_219821 = ((__local float *) color_225103)[gtid_219811];\n    \n    float x_219822;\n    \n    x_219822 = ((__local float *) color_225104)[gtid_219811];\n    \n    bool cond_219823 = sle64(x_219720, gtid_219811);\n    float defunc_0_f_res_219824;\n    \n    if (cond_219823) {\n        defunc_0_f_res_219824 = 0.0F;\n    } else {\n        int64_t i_219825 = add64(x_219726, gtid_219811);\n        float defunc_0_add_arg_219826;\n        \n        defunc_0_add_arg_219826 = ((__global float *) mem_224541)[gtid_219715 *\n                                                                  n_196692 +\n                                                                  i_219825];\n        defunc_0_f_res_219824 = defunc_0_add_arg_219826;\n    }\n    \n    float x_219827 = a12_219804 * x_219820;\n    float y_219828 = b12_219805 * x_219821;\n    float x_219829 = x_219827 + y_219828;\n    float y_219830 = c12_219806 * x_219822;\n    float x_219831 = x_219829 + y_219830;\n    float defunc_9_fit_fun_res_219832 = defunc_0_f_res_219824 * x_219831;\n    float x_219833 = b12_219805 * x_219820;\n    float y_219834 = b2_219807 * x_219821;\n    float x_219835 = x_219833 + y_219834;\n    float y_219836 = c2_219808 * x_219822;\n    float x_219837 = x_219835 + y_",
                   "219836;\n    float defunc_9_slope_fun_res_219838 = defunc_0_f_res_219824 * x_219837;\n    \n    ((__local float *) red_arr_mem_229242)[gtid_219811] =\n        defunc_9_fit_fun_res_219832;\n    ((__local float *) red_arr_mem_229244)[gtid_219811] =\n        defunc_9_slope_fun_res_219838;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t offset_229246;\n    int32_t skip_waves_229247 = 1;\n    float x_219813;\n    float x_219814;\n    float x_219815;\n    float x_219816;\n    \n    offset_229246 = 0;\n    // participating threads read initial accumulator\n    {\n        if (slt32(local_tid_229219, sext_i64_i32(q_t_196696))) {\n            x_219813 = ((__local\n                         float *) red_arr_mem_229242)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229246)];\n            x_219814 = ((__local\n                         float *) red_arr_mem_229244)[sext_i32_i64(local_tid_229219 +\n                                                      offset_229246)];\n        }\n    }\n    offset_229246 = 1;\n    while (slt32(offset_229246, wave_sizze_229221)) {\n        if (slt32(local_tid_229219 + offset_229246, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229219 - squot32(local_tid_229219, wave_sizze_229221) *\n              wave_sizze_229221) & (2 * offset_229246 - 1)) == 0) {\n            // read array element\n            {\n                x_219815 = ((volatile __local\n                             float *) red_arr_mem_229242)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229246)];\n                x_219816 = ((volatile __local\n                             float *) red_arr_mem_229244)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229246)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219817 = x_219813 + x_219815;\n                float defunc_1_op_res_219818 = x_219814 + x_219816;\n        ",
                   "        \n                x_219813 = defunc_1_op_res_219817;\n                x_219814 = defunc_1_op_res_219818;\n            }\n            // write result of operation\n            {\n                ((volatile __local\n                  float *) red_arr_mem_229242)[sext_i32_i64(local_tid_229219)] =\n                    x_219813;\n                ((volatile __local\n                  float *) red_arr_mem_229244)[sext_i32_i64(local_tid_229219)] =\n                    x_219814;\n            }\n        }\n        offset_229246 *= 2;\n    }\n    while (slt32(skip_waves_229247, squot32(sext_i64_i32(q_t_196696) +\n                                            wave_sizze_229221 - 1,\n                                            wave_sizze_229221))) {\n        barrier(CLK_LOCAL_MEM_FENCE);\n        offset_229246 = skip_waves_229247 * wave_sizze_229221;\n        if (slt32(local_tid_229219 + offset_229246, sext_i64_i32(q_t_196696)) &&\n            ((local_tid_229219 - squot32(local_tid_229219, wave_sizze_229221) *\n              wave_sizze_229221) == 0 && (squot32(local_tid_229219,\n                                                  wave_sizze_229221) & (2 *\n                                                                        skip_waves_229247 -\n                                                                        1)) ==\n             0)) {\n            // read array element\n            {\n                x_219815 = ((__local\n                             float *) red_arr_mem_229242)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229246)];\n                x_219816 = ((__local\n                             float *) red_arr_mem_229244)[sext_i32_i64(local_tid_229219 +\n                                                          offset_229246)];\n            }\n            // apply reduction operation\n            {\n                float defunc_1_op_res_219817 = x_219813 + x_219815;\n                float defunc_1_op_res_219818 = x_219814 + x_219816;\n            ",
                   "    \n                x_219813 = defunc_1_op_res_219817;\n                x_219814 = defunc_1_op_res_219818;\n            }\n            // write result of operation\n            {\n                ((__local\n                  float *) red_arr_mem_229242)[sext_i32_i64(local_tid_229219)] =\n                    x_219813;\n                ((__local\n                  float *) red_arr_mem_229244)[sext_i32_i64(local_tid_229219)] =\n                    x_219814;\n            }\n        }\n        skip_waves_229247 *= 2;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    defunc_2_reduce_res_219809 = ((__local\n                                   float *) red_arr_mem_229242)[(int64_t) 0];\n    defunc_2_reduce_res_219810 = ((__local\n                                   float *) red_arr_mem_229244)[(int64_t) 0];\n    if (local_tid_229219 == 0) {\n        ((__global float *) mem_224561)[gtid_219715 * t_n_m_196759 +\n                                        gtid_219716] =\n            defunc_2_reduce_res_219809;\n    }\n    if (local_tid_229219 == 0) {\n        ((__global float *) mem_224565)[gtid_219715 * t_n_m_196759 +\n                                        gtid_219716] =\n            defunc_2_reduce_res_219810;\n    }\n    \n  error_5:\n    return;\n}\n__kernel void mainzisegmap_intragroup_220067(__global int *global_failure,\n                                             int failure_is_an_option, __global\n                                             int64_t *global_failure_args,\n                                             __local volatile\n                                             int64_t *color_225108_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225107_backing_aligned_1,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t ext_224588, __global\n                                             unsigned char *Y_mem_222225,\n                     ",
                   "                        __global\n                                             unsigned char *ext_mem_222257,\n                                             __global\n                                             unsigned char *ext_mem_224583,\n                                             __global\n                                             unsigned char *ext_mem_224584,\n                                             __global unsigned char *mem_224611,\n                                             __global unsigned char *mem_224615)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225108_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225108_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225107_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225107_backing_aligned_1;\n    volatile __local bool local_failure;\n    \n    if (failure_is_an_option) {\n        int failed = *global_failure >= 0;\n        \n        if (failed)\n            return;\n    }\n    local_failure = false;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int32_t global_tid_229258;\n    int32_t local_tid_229259;\n    int64_t group_sizze_229262;\n    int32_t wave_sizze_229261;\n    int32_t group_tid_229260;\n    \n    global_tid_229258 = get_global_id(0);\n    local_tid_229259 = get_local_id(0);\n    group_sizze_229262 = get_local_size(0);\n    wave_sizze_229261 = LOCKSTEP_WIDTH;\n    group_tid_229260 = get_group_id(0);\n    \n    int32_t phys_tid_220067 = group_tid_229260;\n    int64_t slice_229264 = n_196692;\n    int64_t ltid_pre_229263 = sext_i32_i64(local_tid_229259);\n    int64_t remnant_229265 = sext_i32_i64(local_tid_229259) - ltid_pre_229263;\n    int64_t slice_229266 = m_196691;\n    int64_t gtid_220066 = sext_i32_i64(group_tid_229260);\n    int64_t remnant_229267 =",
                   " sext_i32_i64(group_tid_229260) - gtid_220066;\n    __local unsigned char *color_225107;\n    \n    color_225107 = (__local unsigned char *) color_225107_backing_0;\n    \n    __local unsigned char *color_225108;\n    \n    color_225108 = (__local unsigned char *) color_225108_backing_1;\n    \n    int64_t gtid_220077 = sext_i32_i64(sext_i64_i32(ltid_pre_229263));\n    int32_t phys_tid_220078 = local_tid_229259;\n    float x_220079;\n    \n    x_220079 = ((__global float *) Y_mem_222225)[gtid_220066 * n_196692 +\n                                                 gtid_220077];\n    \n    float x_220080;\n    \n    x_220080 = ((__global float *) ext_mem_224584)[gtid_220066 * n_196692 +\n                                                   gtid_220077];\n    \n    float x_220081;\n    \n    x_220081 = ((__global float *) ext_mem_224583)[gtid_220066 * ext_224588 +\n                                                   gtid_220077];\n    \n    float x_220082 = x_220079 - x_220080;\n    float defunc_2_f_res_220083 = x_220082 - x_220081;\n    bool isnan_res_220084;\n    \n    isnan_res_220084 = futrts_isnan32(defunc_2_f_res_220083);\n    \n    float defunc_0_f_res_220085;\n    \n    if (isnan_res_220084) {\n        defunc_0_f_res_220085 = defunc_2_f_res_220083;\n    } else {\n        float abs_res_220086 = (float) fabs(defunc_2_f_res_220083);\n        \n        defunc_0_f_res_220085 = abs_res_220086;\n    }\n    ((__local float *) color_225108)[gtid_220077] = defunc_0_f_res_220085;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_220088 = sext_i32_i64(sext_i64_i32(ltid_pre_229263));\n    int32_t phys_tid_220089 = local_tid_229259;\n    int64_t x_220090;\n    \n    x_220090 = ((__global int64_t *) ext_mem_222257)[gtid_220066 * n_196692 +\n                                                     gtid_220088];\n    \n    bool cond_220091 = sle64((int64_t) 0, x_220090);\n    float defunc_0_f_res_220092;\n    \n    if (cond_220091) {\n        bool y_220093 = slt64(x_220090, n_196692);\n        bool bounds_check_220094 = cond_220091 ",
                   "&& y_220093;\n        bool index_certs_220095;\n        \n        if (!bounds_check_220094) {\n            {\n                if (atomic_cmpxchg_i32_global(global_failure, -1, 71) == -1) {\n                    global_failure_args[0] = (int64_t) x_220090;\n                    global_failure_args[1] = (int64_t) n_196692;\n                    ;\n                }\n                local_failure = true;\n                goto error_1;\n            }\n        }\n        \n        float defunc_0_f_res_t_res_220096;\n        \n        defunc_0_f_res_t_res_220096 = ((__local\n                                        float *) color_225108)[x_220090];\n        defunc_0_f_res_220092 = defunc_0_f_res_t_res_220096;\n    } else {\n        defunc_0_f_res_220092 = INFINITY;\n    }\n    ((__local float *) color_225107)[gtid_220088] = defunc_0_f_res_220092;\n    \n  error_1:\n    barrier(CLK_LOCAL_MEM_FENCE);\n    if (local_failure)\n        return;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float tmp_229268;\n    \n    tmp_229268 = ((__local\n                   float *) color_225107)[sext_i32_i64(local_tid_229259)];\n    ((__global float *) mem_224611)[gtid_220066 * n_196692 +\n                                    sext_i32_i64(local_tid_229259)] =\n        tmp_229268;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float tmp_229269;\n    \n    tmp_229269 = ((__local\n                   float *) color_225108)[sext_i32_i64(local_tid_229259)];\n    ((__global float *) mem_224615)[gtid_220066 * n_196692 +\n                                    sext_i32_i64(local_tid_229259)] =\n        tmp_229269;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_220432(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *color_225123_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225122_backing_aligned_1,\n            ",
                   "                                 __local volatile\n                                             int64_t *color_225121_backing_aligned_2,\n                                             __local volatile\n                                             int64_t *color_225120_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *color_225119_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225118_backing_aligned_5,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t i_196779,\n                                             int32_t iters_199778, __global\n                                             unsigned char *ext_mem_224627,\n                                             __global unsigned char *mem_224787,\n                                             __global\n                                             unsigned char *color_225116,\n                                             __global\n                                             unsigned char *color_225117)\n{\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225123_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) color_225123_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225122_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) color_225122_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225121_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225121_backing_aligned_2;\n    __local volatile unsigned char *restrict color_225120_backing_2 =\n ",
                   "                                  (__local volatile\n                                    unsigned char *) color_225120_backing_aligned_3;\n    __local volatile unsigned char *restrict color_225119_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225119_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225118_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225118_backing_aligned_5;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229325;\n    int32_t local_tid_229326;\n    int64_t group_sizze_229329;\n    int32_t wave_sizze_229328;\n    int32_t group_tid_229327;\n    \n    global_tid_229325 = get_global_id(0);\n    local_tid_229326 = get_local_id(0);\n    group_sizze_229329 = get_local_size(0);\n    wave_sizze_229328 = LOCKSTEP_WIDTH;\n    group_tid_229327 = get_group_id(0);\n    \n    int32_t phys_tid_220432 = group_tid_229327;\n    int64_t slice_229331 = n_196692;\n    int64_t ltid_pre_229330 = sext_i32_i64(local_tid_229326);\n    int64_t remnant_229332 = sext_i32_i64(local_tid_229326) - ltid_pre_229330;\n    int64_t slice_229333 = m_196691;\n    int64_t gtid_220431 = sext_i32_i64(group_tid_229327);\n    int64_t remnant_229334 = sext_i32_i64(group_tid_229327) - gtid_220431;\n    __local unsigned char *color_225118;\n    \n    color_225118 = (__local unsigned char *) color_225118_backing_0;\n    \n    __local unsigned char *color_225119;\n    \n    color_225119 = (__local unsigned char *) color_225119_backing_1;\n    \n    __local unsigned char *color_225120;\n    \n    color_225120 = (__local unsigned char *) color_225120_backing_2;\n    \n    __local unsigned char *color_225121;\n    \n    color_225121 = (__local unsigned char *) color_225121_backing_3;\n    \n    __local unsigned char *color_225122;\n    \n    color_225122 = (__local unsigned char *) color_225122_backing_4;\n    \n    __local unsigned char",
                   " *color_225123;\n    \n    color_225123 = (__local unsigned char *) color_225123_backing_5;\n    \n    float tmp_229335;\n    \n    tmp_229335 = ((__global float *) ext_mem_224627)[gtid_220431 * n_196692 +\n                                                     sext_i32_i64(local_tid_229326)];\n    ((__global float *) color_225116)[phys_tid_220432 * n_196692 +\n                                      sext_i32_i64(local_tid_229326)] =\n        tmp_229335;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    __global unsigned char *ext_mem_224779;\n    __global unsigned char *ext_mem_unused_225008;\n    __global unsigned char *mem_param_224750;\n    __global unsigned char *mem_param_out_225009;\n    \n    mem_param_224750 = color_225116;\n    mem_param_out_225009 = color_225117;\n    for (int32_t i_220436 = 0; i_220436 < iters_199778; i_220436++) {\n        int32_t defunc_2_radix_sort_step_arg_220438 = mul32(2, i_220436);\n        int32_t defunc_0_get_bit_arg_220439 = add32(1,\n                                                    defunc_2_radix_sort_step_arg_220438);\n        bool cond_f_res_220440 = defunc_0_get_bit_arg_220439 == 31;\n        bool cond_f_res_220441 = defunc_2_radix_sort_step_arg_220438 == 31;\n        int64_t gtid_220447 = sext_i32_i64(sext_i64_i32(ltid_pre_229330));\n        int32_t phys_tid_220448 = local_tid_229326;\n        float x_220461;\n        \n        x_220461 = ((__global float *) mem_param_224750)[phys_tid_220432 *\n                                                         n_196692 +\n                                                         gtid_220447];\n        \n        int32_t i32_arg_220462;\n        \n        i32_arg_220462 = futrts_to_bits32(x_220461);\n        \n        int32_t unsign_arg_220463 = ashr32(i32_arg_220462,\n                                           defunc_0_get_bit_arg_220439);\n        int32_t unsign_arg_220464 = 1 & unsign_arg_220463;\n        int32_t unsign_arg_220465 = ashr32(i32_arg_220462, 31);\n        int32_t unsign_arg_220466 = 1 & unsign_arg_220465;\n        b",
                   "ool cond_220467 = unsign_arg_220466 == 1;\n        bool x_220468 = !cond_220467;\n        bool y_220469 = cond_f_res_220440 && x_220468;\n        bool cond_220470 = cond_220467 || y_220469;\n        int32_t defunc_1_get_bit_res_220471;\n        \n        if (cond_220470) {\n            int32_t defunc_1_get_bit_res_t_res_220472 = 1 ^ unsign_arg_220464;\n            \n            defunc_1_get_bit_res_220471 = defunc_1_get_bit_res_t_res_220472;\n        } else {\n            defunc_1_get_bit_res_220471 = unsign_arg_220464;\n        }\n        \n        int32_t x_220473 = mul32(2, defunc_1_get_bit_res_220471);\n        int32_t unsign_arg_220474 = ashr32(i32_arg_220462,\n                                           defunc_2_radix_sort_step_arg_220438);\n        int32_t unsign_arg_220475 = 1 & unsign_arg_220474;\n        bool y_220476 = cond_f_res_220441 && x_220468;\n        bool cond_220477 = cond_220467 || y_220476;\n        int32_t defunc_1_get_bit_res_220478;\n        \n        if (cond_220477) {\n            int32_t defunc_1_get_bit_res_t_res_220479 = 1 ^ unsign_arg_220475;\n            \n            defunc_1_get_bit_res_220478 = defunc_1_get_bit_res_t_res_220479;\n        } else {\n            defunc_1_get_bit_res_220478 = unsign_arg_220475;\n        }\n        \n        int32_t defunc_0_f_res_220480 = add32(x_220473,\n                                              defunc_1_get_bit_res_220478);\n        bool cond_220481 = defunc_0_f_res_220480 == 0;\n        int64_t defunc_0_f_res_220482 = btoi_bool_i64(cond_220481);\n        int64_t defunc_0_f_res_220483;\n        int64_t defunc_0_f_res_220484;\n        int64_t defunc_0_f_res_220485;\n        \n        if (cond_220481) {\n            defunc_0_f_res_220483 = (int64_t) 0;\n            defunc_0_f_res_220484 = (int64_t) 0;\n            defunc_0_f_res_220485 = (int64_t) 0;\n        } else {\n            bool cond_220486 = defunc_0_f_res_220480 == 1;\n            int64_t defunc_0_f_res_f_res_220487 = btoi_bool_i64(cond_220486);\n            int64_t defunc_0_f_res_f_r",
                   "es_220488;\n            int64_t defunc_0_f_res_f_res_220489;\n            \n            if (cond_220486) {\n                defunc_0_f_res_f_res_220488 = (int64_t) 0;\n                defunc_0_f_res_f_res_220489 = (int64_t) 0;\n            } else {\n                bool cond_220490 = defunc_0_f_res_220480 == 2;\n                int64_t defunc_0_f_res_f_res_f_res_220491 =\n                        btoi_bool_i64(cond_220490);\n                bool cond_neg_220492 = !cond_220490;\n                int64_t defunc_0_f_res_f_res_f_res_220493 =\n                        btoi_bool_i64(cond_neg_220492);\n                \n                defunc_0_f_res_f_res_220488 = defunc_0_f_res_f_res_f_res_220491;\n                defunc_0_f_res_f_res_220489 = defunc_0_f_res_f_res_f_res_220493;\n            }\n            defunc_0_f_res_220483 = defunc_0_f_res_f_res_220487;\n            defunc_0_f_res_220484 = defunc_0_f_res_f_res_220488;\n            defunc_0_f_res_220485 = defunc_0_f_res_f_res_220489;\n        }\n        ((__local int64_t *) color_225123)[gtid_220447] = defunc_0_f_res_220482;\n        ((__local int64_t *) color_225122)[gtid_220447] = defunc_0_f_res_220483;\n        ((__local int64_t *) color_225121)[gtid_220447] = defunc_0_f_res_220484;\n        ((__local int64_t *) color_225120)[gtid_220447] = defunc_0_f_res_220485;\n        ((__local int32_t *) color_225119)[gtid_220447] = defunc_0_f_res_220480;\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int64_t dims_flat_229339 = n_196692;\n        int64_t x_220449;\n        int64_t x_220450;\n        int64_t x_220451;\n        int64_t x_220452;\n        int64_t x_220453;\n        int64_t x_220454;\n        int64_t x_220455;\n        int64_t x_220456;\n        int64_t x_229344;\n        int64_t x_229345;\n        int64_t x_229346;\n        int64_t x_229347;\n        int64_t x_229348;\n        int64_t x_229349;\n        int64_t x_229350;\n        int64_t x_229351;\n        bool ltid_in_bounds_229356 = slt64(sext_i32_i64(local_tid_229326),\n                           ",
                   "                n_196692);\n        int32_t skip_threads_229357;\n        \n        // read input for in-block scan\n        {\n            if (ltid_in_bounds_229356) {\n                x_220453 = ((volatile __local\n                             int64_t *) color_225123)[sext_i32_i64(local_tid_229326)];\n                x_220454 = ((volatile __local\n                             int64_t *) color_225122)[sext_i32_i64(local_tid_229326)];\n                x_220455 = ((volatile __local\n                             int64_t *) color_225121)[sext_i32_i64(local_tid_229326)];\n                x_220456 = ((volatile __local\n                             int64_t *) color_225120)[sext_i32_i64(local_tid_229326)];\n                if ((local_tid_229326 - squot32(local_tid_229326, 32) * 32) ==\n                    0) {\n                    x_220449 = x_220453;\n                    x_220450 = x_220454;\n                    x_220451 = x_220455;\n                    x_220452 = x_220456;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_229357 = 1;\n            while (slt32(skip_threads_229357, 32)) {\n                bool thread_active_229358 = sle32(skip_threads_229357,\n                                                  local_tid_229326 -\n                                                  squot32(local_tid_229326,\n                                                          32) * 32) &&\n                     ltid_in_bounds_229356;\n                \n                if (thread_active_229358) {\n                    // read operands\n                    {\n                        x_220449 = ((volatile __local\n                                     int64_t *) color_225123)[sext_i32_i64(local_tid_229326) -\n                                                              sext_i32_i64(skip_threads_229357)];\n                        x_220450 = ((volatile __local\n                                     int64_t *) color_225122)[sext_i32_i64(local_tid_2",
                   "29326) -\n                                                              sext_i32_i64(skip_threads_229357)];\n                        x_220451 = ((volatile __local\n                                     int64_t *) color_225121)[sext_i32_i64(local_tid_229326) -\n                                                              sext_i32_i64(skip_threads_229357)];\n                        x_220452 = ((volatile __local\n                                     int64_t *) color_225120)[sext_i32_i64(local_tid_229326) -\n                                                              sext_i32_i64(skip_threads_229357)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229359 =\n                         slt64(srem64(sext_i32_i64(local_tid_229326), n_196692),\n                               sext_i32_i64(local_tid_229326) -\n                               sext_i32_i64(local_tid_229326 -\n                               skip_threads_229357));\n                    \n                    if (thread_active_229358 && inactive_229359) {\n                        x_220449 = x_220453;\n                        x_220450 = x_220454;\n                        x_220451 = x_220455;\n                        x_220452 = x_220456;\n                    }\n                    if (thread_active_229358) {\n                        if (!inactive_229359) {\n                            int64_t defunc_1_op_res_220457 = add64(x_220449,\n                                                                   x_220453);\n                            int64_t defunc_1_op_res_220458 = add64(x_220450,\n                                                                   x_220454);\n                            int64_t defunc_1_op_res_220459 = add64(x_220451,\n                                                                   x_220455);\n                            int64_t defunc_1_op_res_220460 = add64(x_220452,\n                                                                   x_22",
                   "0456);\n                            \n                            x_220449 = defunc_1_op_res_220457;\n                            x_220450 = defunc_1_op_res_220458;\n                            x_220451 = defunc_1_op_res_220459;\n                            x_220452 = defunc_1_op_res_220460;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_229328, skip_threads_229357)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229358) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225123)[sext_i32_i64(local_tid_229326)] =\n                            x_220449;\n                        x_220453 = x_220449;\n                        ((volatile __local\n                          int64_t *) color_225122)[sext_i32_i64(local_tid_229326)] =\n                            x_220450;\n                        x_220454 = x_220450;\n                        ((volatile __local\n                          int64_t *) color_225121)[sext_i32_i64(local_tid_229326)] =\n                            x_220451;\n                        x_220455 = x_220451;\n                        ((volatile __local\n                          int64_t *) color_225120)[sext_i32_i64(local_tid_229326)] =\n                            x_220452;\n                        x_220456 = x_220452;\n                    }\n                }\n                if (sle32(wave_sizze_229328, skip_threads_229357)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_229357 *= 2;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // last thread of block 'i' writes its result to offset 'i'\n        {\n            if ((local_tid_229326 - squot32(local_tid_229326, 32) * 32) == 31 &&\n                ltid_in_bounds_229356) {\n                ((volatile __local\n                  int64_t *) color_225123)[sext",
                   "_i32_i64(squot32(local_tid_229326,\n                                                                32))] =\n                    x_220449;\n                ((volatile __local\n                  int64_t *) color_225122)[sext_i32_i64(squot32(local_tid_229326,\n                                                                32))] =\n                    x_220450;\n                ((volatile __local\n                  int64_t *) color_225121)[sext_i32_i64(squot32(local_tid_229326,\n                                                                32))] =\n                    x_220451;\n                ((volatile __local\n                  int64_t *) color_225120)[sext_i32_i64(squot32(local_tid_229326,\n                                                                32))] =\n                    x_220452;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n        {\n            int32_t skip_threads_229360;\n            \n            // read input for in-block scan\n            {\n                if (squot32(local_tid_229326, 32) == 0 &&\n                    ltid_in_bounds_229356) {\n                    x_229348 = ((volatile __local\n                                 int64_t *) color_225123)[sext_i32_i64(local_tid_229326)];\n                    x_229349 = ((volatile __local\n                                 int64_t *) color_225122)[sext_i32_i64(local_tid_229326)];\n                    x_229350 = ((volatile __local\n                                 int64_t *) color_225121)[sext_i32_i64(local_tid_229326)];\n                    x_229351 = ((volatile __local\n                                 int64_t *) color_225120)[sext_i32_i64(local_tid_229326)];\n                    if ((local_tid_229326 - squot32(local_tid_229326, 32) *\n                         32) == 0) {\n                        x_229344 = x_229348;\n                        x_229345 = x_229349;\n                        x_229346 = x_229350;\n                 ",
                   "       x_229347 = x_229351;\n                    }\n                }\n            }\n            // in-block scan (hopefully no barriers needed)\n            {\n                skip_threads_229360 = 1;\n                while (slt32(skip_threads_229360, 32)) {\n                    bool thread_active_229361 = sle32(skip_threads_229360,\n                                                      local_tid_229326 -\n                                                      squot32(local_tid_229326,\n                                                              32) * 32) &&\n                         (squot32(local_tid_229326, 32) == 0 &&\n                          ltid_in_bounds_229356);\n                    \n                    if (thread_active_229361) {\n                        // read operands\n                        {\n                            x_229344 = ((volatile __local\n                                         int64_t *) color_225123)[sext_i32_i64(local_tid_229326) -\n                                                                  sext_i32_i64(skip_threads_229360)];\n                            x_229345 = ((volatile __local\n                                         int64_t *) color_225122)[sext_i32_i64(local_tid_229326) -\n                                                                  sext_i32_i64(skip_threads_229360)];\n                            x_229346 = ((volatile __local\n                                         int64_t *) color_225121)[sext_i32_i64(local_tid_229326) -\n                                                                  sext_i32_i64(skip_threads_229360)];\n                            x_229347 = ((volatile __local\n                                         int64_t *) color_225120)[sext_i32_i64(local_tid_229326) -\n                                                                  sext_i32_i64(skip_threads_229360)];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229362 =",
                   "\n                             slt64(srem64(sext_i32_i64(local_tid_229326 * 32 +\n                                          32 - 1), n_196692),\n                                   sext_i32_i64(local_tid_229326 * 32 + 32 -\n                                   1) - sext_i32_i64((local_tid_229326 -\n                                                      skip_threads_229360) *\n                                   32 + 32 - 1));\n                        \n                        if (thread_active_229361 && inactive_229362) {\n                            x_229344 = x_229348;\n                            x_229345 = x_229349;\n                            x_229346 = x_229350;\n                            x_229347 = x_229351;\n                        }\n                        if (thread_active_229361) {\n                            if (!inactive_229362) {\n                                int64_t defunc_1_op_res_229352 = add64(x_229344,\n                                                                       x_229348);\n                                int64_t defunc_1_op_res_229353 = add64(x_229345,\n                                                                       x_229349);\n                                int64_t defunc_1_op_res_229354 = add64(x_229346,\n                                                                       x_229350);\n                                int64_t defunc_1_op_res_229355 = add64(x_229347,\n                                                                       x_229351);\n                                \n                                x_229344 = defunc_1_op_res_229352;\n                                x_229345 = defunc_1_op_res_229353;\n                                x_229346 = defunc_1_op_res_229354;\n                                x_229347 = defunc_1_op_res_229355;\n                            }\n                        }\n                    }\n                    if (sle32(wave_sizze_229328, skip_threads_229360)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n ",
                   "                   }\n                    if (thread_active_229361) {\n                        // write result\n                        {\n                            ((volatile __local\n                              int64_t *) color_225123)[sext_i32_i64(local_tid_229326)] =\n                                x_229344;\n                            x_229348 = x_229344;\n                            ((volatile __local\n                              int64_t *) color_225122)[sext_i32_i64(local_tid_229326)] =\n                                x_229345;\n                            x_229349 = x_229345;\n                            ((volatile __local\n                              int64_t *) color_225121)[sext_i32_i64(local_tid_229326)] =\n                                x_229346;\n                            x_229350 = x_229346;\n                            ((volatile __local\n                              int64_t *) color_225120)[sext_i32_i64(local_tid_229326)] =\n                                x_229347;\n                            x_229351 = x_229347;\n                        }\n                    }\n                    if (sle32(wave_sizze_229328, skip_threads_229360)) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                    }\n                    skip_threads_229360 *= 2;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        bool no_carry_in_229363 = squot32(local_tid_229326, 32) == 0 ||\n             !ltid_in_bounds_229356;\n        \n        // carry-in for every block except the first\n        {\n            // read operands\n            {\n                if (!no_carry_in_229363) {\n                    x_220453 = x_220449;\n                    x_220454 = x_220450;\n                    x_220455 = x_220451;\n                    x_220456 = x_220452;\n                    x_220449 = ((__local\n                                 int64_t *) color_225123)[sext_i32_i64(squot32(local_tid_229326,\n                                                        ",
                   "                       32)) -\n                                                          (int64_t) 1];\n                    x_220450 = ((__local\n                                 int64_t *) color_225122)[sext_i32_i64(squot32(local_tid_229326,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                    x_220451 = ((__local\n                                 int64_t *) color_225121)[sext_i32_i64(squot32(local_tid_229326,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                    x_220452 = ((__local\n                                 int64_t *) color_225120)[sext_i32_i64(squot32(local_tid_229326,\n                                                                               32)) -\n                                                          (int64_t) 1];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_229364 =\n                     slt64(srem64(sext_i32_i64(local_tid_229326), n_196692),\n                           sext_i32_i64(local_tid_229326) -\n                           sext_i32_i64(squot32(local_tid_229326, 32) * 32 -\n                           1));\n                \n                if (!no_carry_in_229363) {\n                    if (inactive_229364) {\n                        x_220449 = x_220453;\n                        x_220450 = x_220454;\n                        x_220451 = x_220455;\n                        x_220452 = x_220456;\n                    }\n                }\n                if (!no_carry_in_229363) {\n                    if (!inactive_229364) {\n                        int64_t defunc_1_op_res_220457 = add64(x_220449,\n                                                               x_220453);\n                        int64_t defunc_1_op_res_220458 = add64(x_220450,\n                ",
                   "                                               x_220454);\n                        int64_t defunc_1_op_res_220459 = add64(x_220451,\n                                                               x_220455);\n                        int64_t defunc_1_op_res_220460 = add64(x_220452,\n                                                               x_220456);\n                        \n                        x_220449 = defunc_1_op_res_220457;\n                        x_220450 = defunc_1_op_res_220458;\n                        x_220451 = defunc_1_op_res_220459;\n                        x_220452 = defunc_1_op_res_220460;\n                    }\n                }\n            }\n            // write final result\n            {\n                if (!no_carry_in_229363) {\n                    ((__local\n                      int64_t *) color_225123)[sext_i32_i64(local_tid_229326)] =\n                        x_220449;\n                    ((__local\n                      int64_t *) color_225122)[sext_i32_i64(local_tid_229326)] =\n                        x_220450;\n                    ((__local\n                      int64_t *) color_225121)[sext_i32_i64(local_tid_229326)] =\n                        x_220451;\n                    ((__local\n                      int64_t *) color_225120)[sext_i32_i64(local_tid_229326)] =\n                        x_220452;\n                }\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // restore correct values for first block\n        {\n            if (squot32(local_tid_229326, 32) == 0 && ltid_in_bounds_229356) {\n                ((__local\n                  int64_t *) color_225123)[sext_i32_i64(local_tid_229326)] =\n                    x_220453;\n                ((__local\n                  int64_t *) color_225122)[sext_i32_i64(local_tid_229326)] =\n                    x_220454;\n                ((__local\n                  int64_t *) color_225121)[sext_i32_i64(local_tid_229326)] =\n                    x_220455;\n                ((__local\n                  ",
                   "int64_t *) color_225120)[sext_i32_i64(local_tid_229326)] =\n                    x_220456;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int64_t last_res_220494;\n        \n        last_res_220494 = ((__local int64_t *) color_225123)[i_196779];\n        \n        int64_t last_res_220495;\n        \n        last_res_220495 = ((__local int64_t *) color_225122)[i_196779];\n        \n        int64_t last_res_220496;\n        \n        last_res_220496 = ((__local int64_t *) color_225121)[i_196779];\n        \n        float tmp_229365;\n        \n        tmp_229365 = ((__global float *) mem_param_224750)[phys_tid_220432 *\n                                                           n_196692 +\n                                                           sext_i32_i64(local_tid_229326)];\n        ((__local float *) color_225118)[sext_i32_i64(local_tid_229326)] =\n            tmp_229365;\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int64_t write_i_220499 = sext_i32_i64(sext_i64_i32(ltid_pre_229330));\n        int32_t phys_tid_220500 = local_tid_229326;\n        int32_t x_220501;\n        \n        x_220501 = ((__local int32_t *) color_225119)[write_i_220499];\n        \n        float write_value_220506;\n        \n        write_value_220506 = ((__global\n                               float *) mem_param_224750)[phys_tid_220432 *\n                                                          n_196692 +\n                                                          write_i_220499];\n        \n        bool match_lit_220507 = 0 == x_220501;\n        int64_t defunc_1_f_res_220508;\n        \n        if (match_lit_220507) {\n            int64_t x_220502;\n            \n            x_220502 = ((__local int64_t *) color_225123)[write_i_220499];\n            \n            int64_t case_res_220509 = sub64(x_220502, (int64_t) 1);\n            \n            defunc_1_f_res_220508 = case_res_220509;\n        } else {\n            bool match_lit_220510 = 1 == x_220501;\n            int64_t x_220511;\n    ",
                   "        \n            if (match_lit_220510) {\n                int64_t x_220503;\n                \n                x_220503 = ((__local int64_t *) color_225122)[write_i_220499];\n                \n                int64_t x_220512 = add64(last_res_220494, x_220503);\n                int64_t case_res_220513 = sub64(x_220512, (int64_t) 1);\n                \n                x_220511 = case_res_220513;\n            } else {\n                bool match_lit_220514 = 2 == x_220501;\n                int64_t x_220515;\n                \n                if (match_lit_220514) {\n                    int64_t x_220504;\n                    \n                    x_220504 = ((__local\n                                 int64_t *) color_225121)[write_i_220499];\n                    \n                    int64_t x_220516 = add64(last_res_220494, last_res_220495);\n                    int64_t x_220517 = add64(x_220504, x_220516);\n                    int64_t case_res_220518 = sub64(x_220517, (int64_t) 1);\n                    \n                    x_220515 = case_res_220518;\n                } else {\n                    int64_t x_220505;\n                    \n                    x_220505 = ((__local\n                                 int64_t *) color_225120)[write_i_220499];\n                    \n                    int64_t x_220519 = add64(last_res_220494, last_res_220495);\n                    int64_t x_220520 = add64(last_res_220496, x_220519);\n                    int64_t x_220521 = add64(x_220505, x_220520);\n                    int64_t defunc_1_f_res_res_220522 = sub64(x_220521,\n                                                              (int64_t) 1);\n                    \n                    x_220515 = defunc_1_f_res_res_220522;\n                }\n                x_220511 = x_220515;\n            }\n            defunc_1_f_res_220508 = x_220511;\n        }\n        if (sle64((int64_t) 0, defunc_1_f_res_220508) &&\n            slt64(defunc_1_f_res_220508, n_196692)) {\n            ((__local float *) color_225118)[defu",
                   "nc_1_f_res_220508] =\n                write_value_220506;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        float tmp_229366;\n        \n        tmp_229366 = ((__local\n                       float *) color_225118)[sext_i32_i64(local_tid_229326)];\n        ((__global float *) mem_param_out_225009)[phys_tid_220432 * n_196692 +\n                                                  sext_i32_i64(local_tid_229326)] =\n            tmp_229366;\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        __global unsigned char *mem_param_tmp_229336;\n        \n        mem_param_tmp_229336 = mem_param_out_225009;\n        \n        __global unsigned char *mem_param_out_tmp_229337;\n        \n        mem_param_out_tmp_229337 = mem_param_224750;\n        mem_param_224750 = mem_param_tmp_229336;\n        mem_param_out_225009 = mem_param_out_tmp_229337;\n    }\n    ext_mem_224779 = mem_param_224750;\n    ext_mem_unused_225008 = mem_param_out_225009;\n    if (local_tid_229326 == 0) {\n        for (int64_t i_229367 = 0; i_229367 < n_196692; i_229367++) {\n            float tmp_229368;\n            \n            tmp_229368 = ((__global float *) ext_mem_224779)[phys_tid_220432 *\n                                                             n_196692 +\n                                                             i_229367];\n            ((__global float *) mem_224787)[gtid_220431 * n_196692 + i_229367] =\n                tmp_229368;\n        }\n    }\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegmap_intragroup_220872(__global int *global_failure,\n                                             __local volatile\n                                             int64_t *color_225129_backing_aligned_0,\n                                             __local volatile\n                                             int64_t *color_225128_backing_aligned_1,\n                                             __local volatile\n                                             int64_t *color_225127_backing_aligned_2,\n                  ",
                   "                           __local volatile\n                                             int64_t *color_225126_backing_aligned_3,\n                                             __local volatile\n                                             int64_t *color_225125_backing_aligned_4,\n                                             __local volatile\n                                             int64_t *color_225124_backing_aligned_5,\n                                             int64_t m_196691, int64_t n_196692,\n                                             int64_t i_196779,\n                                             int32_t defunc_2_radix_sort_step_arg_220858,\n                                             int32_t defunc_0_get_bit_arg_220859,\n                                             unsigned char cond_f_res_220860_bits,\n                                             unsigned char cond_f_res_220861_bits,\n                                             __global\n                                             unsigned char *mem_param_224799,\n                                             __global unsigned char *mem_224830)\n{\n    bool cond_f_res_220860 = cond_f_res_220860_bits;\n    bool cond_f_res_220861 = cond_f_res_220861_bits;\n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict color_225129_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) color_225129_backing_aligned_0;\n    __local volatile unsigned char *restrict color_225128_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) color_225128_backing_aligned_1;\n    __local volatile unsigned char *restrict color_225127_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) color_225127_backing_aligned_2;\n    __local volatile unsigned char *restrict color_225126",
                   "_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) color_225126_backing_aligned_3;\n    __local volatile unsigned char *restrict color_225125_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) color_225125_backing_aligned_4;\n    __local volatile unsigned char *restrict color_225124_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) color_225124_backing_aligned_5;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229371;\n    int32_t local_tid_229372;\n    int64_t group_sizze_229375;\n    int32_t wave_sizze_229374;\n    int32_t group_tid_229373;\n    \n    global_tid_229371 = get_global_id(0);\n    local_tid_229372 = get_local_id(0);\n    group_sizze_229375 = get_local_size(0);\n    wave_sizze_229374 = LOCKSTEP_WIDTH;\n    group_tid_229373 = get_group_id(0);\n    \n    int32_t phys_tid_220872 = group_tid_229373;\n    int64_t slice_229377 = n_196692;\n    int64_t ltid_pre_229376 = sext_i32_i64(local_tid_229372);\n    int64_t remnant_229378 = sext_i32_i64(local_tid_229372) - ltid_pre_229376;\n    int64_t slice_229379 = m_196691;\n    int64_t gtid_220871 = sext_i32_i64(group_tid_229373);\n    int64_t remnant_229380 = sext_i32_i64(group_tid_229373) - gtid_220871;\n    __local unsigned char *color_225124;\n    \n    color_225124 = (__local unsigned char *) color_225124_backing_0;\n    \n    __local unsigned char *color_225125;\n    \n    color_225125 = (__local unsigned char *) color_225125_backing_1;\n    \n    __local unsigned char *color_225126;\n    \n    color_225126 = (__local unsigned char *) color_225126_backing_2;\n    \n    __local unsigned char *color_225127;\n    \n    color_225127 = (__local unsigned char *) color_225127_backing_3;\n    \n    __local unsigned char *color_225128;\n    \n    color_225128 = (__local unsigned char *) color_225128_backing_4;\n    \n    __local",
                   " unsigned char *color_225129;\n    \n    color_225129 = (__local unsigned char *) color_225129_backing_5;\n    \n    float tmp_229381;\n    \n    tmp_229381 = ((__global float *) mem_param_224799)[gtid_220871 * n_196692 +\n                                                       sext_i32_i64(local_tid_229372)];\n    ((__local float *) color_225129)[sext_i32_i64(local_tid_229372)] =\n        tmp_229381;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t gtid_220882 = sext_i32_i64(sext_i64_i32(ltid_pre_229376));\n    int32_t phys_tid_220883 = local_tid_229372;\n    float x_220896;\n    \n    x_220896 = ((__global float *) mem_param_224799)[gtid_220871 * n_196692 +\n                                                     gtid_220882];\n    \n    int32_t i32_arg_220897;\n    \n    i32_arg_220897 = futrts_to_bits32(x_220896);\n    \n    int32_t unsign_arg_220898 = ashr32(i32_arg_220897,\n                                       defunc_0_get_bit_arg_220859);\n    int32_t unsign_arg_220899 = 1 & unsign_arg_220898;\n    int32_t unsign_arg_220900 = ashr32(i32_arg_220897, 31);\n    int32_t unsign_arg_220901 = 1 & unsign_arg_220900;\n    bool cond_220902 = unsign_arg_220901 == 1;\n    bool x_220903 = !cond_220902;\n    bool y_220904 = cond_f_res_220860 && x_220903;\n    bool cond_220905 = cond_220902 || y_220904;\n    int32_t defunc_1_get_bit_res_220906;\n    \n    if (cond_220905) {\n        int32_t defunc_1_get_bit_res_t_res_220907 = 1 ^ unsign_arg_220899;\n        \n        defunc_1_get_bit_res_220906 = defunc_1_get_bit_res_t_res_220907;\n    } else {\n        defunc_1_get_bit_res_220906 = unsign_arg_220899;\n    }\n    \n    int32_t x_220908 = mul32(2, defunc_1_get_bit_res_220906);\n    int32_t unsign_arg_220909 = ashr32(i32_arg_220897,\n                                       defunc_2_radix_sort_step_arg_220858);\n    int32_t unsign_arg_220910 = 1 & unsign_arg_220909;\n    bool y_220911 = cond_f_res_220861 && x_220903;\n    bool cond_220912 = cond_220902 || y_220911;\n    int32_t defunc_1_get_bit_res_220913;\n    \n    if (co",
                   "nd_220912) {\n        int32_t defunc_1_get_bit_res_t_res_220914 = 1 ^ unsign_arg_220910;\n        \n        defunc_1_get_bit_res_220913 = defunc_1_get_bit_res_t_res_220914;\n    } else {\n        defunc_1_get_bit_res_220913 = unsign_arg_220910;\n    }\n    \n    int32_t defunc_0_f_res_220915 = add32(x_220908,\n                                          defunc_1_get_bit_res_220913);\n    bool cond_220916 = defunc_0_f_res_220915 == 0;\n    int64_t defunc_0_f_res_220917 = btoi_bool_i64(cond_220916);\n    int64_t defunc_0_f_res_220918;\n    int64_t defunc_0_f_res_220919;\n    int64_t defunc_0_f_res_220920;\n    \n    if (cond_220916) {\n        defunc_0_f_res_220918 = (int64_t) 0;\n        defunc_0_f_res_220919 = (int64_t) 0;\n        defunc_0_f_res_220920 = (int64_t) 0;\n    } else {\n        bool cond_220921 = defunc_0_f_res_220915 == 1;\n        int64_t defunc_0_f_res_f_res_220922 = btoi_bool_i64(cond_220921);\n        int64_t defunc_0_f_res_f_res_220923;\n        int64_t defunc_0_f_res_f_res_220924;\n        \n        if (cond_220921) {\n            defunc_0_f_res_f_res_220923 = (int64_t) 0;\n            defunc_0_f_res_f_res_220924 = (int64_t) 0;\n        } else {\n            bool cond_220925 = defunc_0_f_res_220915 == 2;\n            int64_t defunc_0_f_res_f_res_f_res_220926 =\n                    btoi_bool_i64(cond_220925);\n            bool cond_neg_220927 = !cond_220925;\n            int64_t defunc_0_f_res_f_res_f_res_220928 =\n                    btoi_bool_i64(cond_neg_220927);\n            \n            defunc_0_f_res_f_res_220923 = defunc_0_f_res_f_res_f_res_220926;\n            defunc_0_f_res_f_res_220924 = defunc_0_f_res_f_res_f_res_220928;\n        }\n        defunc_0_f_res_220918 = defunc_0_f_res_f_res_220922;\n        defunc_0_f_res_220919 = defunc_0_f_res_f_res_220923;\n        defunc_0_f_res_220920 = defunc_0_f_res_f_res_220924;\n    }\n    ((__local int64_t *) color_225128)[gtid_220882] = defunc_0_f_res_220917;\n    ((__local int64_t *) color_225127)[gtid_220882] = defunc_0_f_res_220918;\n    ((_",
                   "_local int64_t *) color_225126)[gtid_220882] = defunc_0_f_res_220919;\n    ((__local int64_t *) color_225125)[gtid_220882] = defunc_0_f_res_220920;\n    ((__local int32_t *) color_225124)[gtid_220882] = defunc_0_f_res_220915;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t dims_flat_229382 = n_196692;\n    int64_t x_220884;\n    int64_t x_220885;\n    int64_t x_220886;\n    int64_t x_220887;\n    int64_t x_220888;\n    int64_t x_220889;\n    int64_t x_220890;\n    int64_t x_220891;\n    int64_t x_229387;\n    int64_t x_229388;\n    int64_t x_229389;\n    int64_t x_229390;\n    int64_t x_229391;\n    int64_t x_229392;\n    int64_t x_229393;\n    int64_t x_229394;\n    bool ltid_in_bounds_229399 = slt64(sext_i32_i64(local_tid_229372),\n                                       n_196692);\n    int32_t skip_threads_229400;\n    \n    // read input for in-block scan\n    {\n        if (ltid_in_bounds_229399) {\n            x_220888 = ((volatile __local\n                         int64_t *) color_225128)[sext_i32_i64(local_tid_229372)];\n            x_220889 = ((volatile __local\n                         int64_t *) color_225127)[sext_i32_i64(local_tid_229372)];\n            x_220890 = ((volatile __local\n                         int64_t *) color_225126)[sext_i32_i64(local_tid_229372)];\n            x_220891 = ((volatile __local\n                         int64_t *) color_225125)[sext_i32_i64(local_tid_229372)];\n            if ((local_tid_229372 - squot32(local_tid_229372, 32) * 32) == 0) {\n                x_220884 = x_220888;\n                x_220885 = x_220889;\n                x_220886 = x_220890;\n                x_220887 = x_220891;\n            }\n        }\n    }\n    // in-block scan (hopefully no barriers needed)\n    {\n        skip_threads_229400 = 1;\n        while (slt32(skip_threads_229400, 32)) {\n            bool thread_active_229401 = sle32(skip_threads_229400,\n                                              local_tid_229372 -\n                                              squot32(local_tid_229372, 32) ",
                   "*\n                                              32) && ltid_in_bounds_229399;\n            \n            if (thread_active_229401) {\n                // read operands\n                {\n                    x_220884 = ((volatile __local\n                                 int64_t *) color_225128)[sext_i32_i64(local_tid_229372) -\n                                                          sext_i32_i64(skip_threads_229400)];\n                    x_220885 = ((volatile __local\n                                 int64_t *) color_225127)[sext_i32_i64(local_tid_229372) -\n                                                          sext_i32_i64(skip_threads_229400)];\n                    x_220886 = ((volatile __local\n                                 int64_t *) color_225126)[sext_i32_i64(local_tid_229372) -\n                                                          sext_i32_i64(skip_threads_229400)];\n                    x_220887 = ((volatile __local\n                                 int64_t *) color_225125)[sext_i32_i64(local_tid_229372) -\n                                                          sext_i32_i64(skip_threads_229400)];\n                }\n            }\n            // perform operation\n            {\n                bool inactive_229402 =\n                     slt64(srem64(sext_i32_i64(local_tid_229372), n_196692),\n                           sext_i32_i64(local_tid_229372) -\n                           sext_i32_i64(local_tid_229372 -\n                           skip_threads_229400));\n                \n                if (thread_active_229401 && inactive_229402) {\n                    x_220884 = x_220888;\n                    x_220885 = x_220889;\n                    x_220886 = x_220890;\n                    x_220887 = x_220891;\n                }\n                if (thread_active_229401) {\n                    if (!inactive_229402) {\n                        int64_t defunc_1_op_res_220892 = add64(x_220884,\n                                                               x_220888);\n                 ",
                   "       int64_t defunc_1_op_res_220893 = add64(x_220885,\n                                                               x_220889);\n                        int64_t defunc_1_op_res_220894 = add64(x_220886,\n                                                               x_220890);\n                        int64_t defunc_1_op_res_220895 = add64(x_220887,\n                                                               x_220891);\n                        \n                        x_220884 = defunc_1_op_res_220892;\n                        x_220885 = defunc_1_op_res_220893;\n                        x_220886 = defunc_1_op_res_220894;\n                        x_220887 = defunc_1_op_res_220895;\n                    }\n                }\n            }\n            if (sle32(wave_sizze_229374, skip_threads_229400)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            if (thread_active_229401) {\n                // write result\n                {\n                    ((volatile __local\n                      int64_t *) color_225128)[sext_i32_i64(local_tid_229372)] =\n                        x_220884;\n                    x_220888 = x_220884;\n                    ((volatile __local\n                      int64_t *) color_225127)[sext_i32_i64(local_tid_229372)] =\n                        x_220885;\n                    x_220889 = x_220885;\n                    ((volatile __local\n                      int64_t *) color_225126)[sext_i32_i64(local_tid_229372)] =\n                        x_220886;\n                    x_220890 = x_220886;\n                    ((volatile __local\n                      int64_t *) color_225125)[sext_i32_i64(local_tid_229372)] =\n                        x_220887;\n                    x_220891 = x_220887;\n                }\n            }\n            if (sle32(wave_sizze_229374, skip_threads_229400)) {\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n            skip_threads_229400 *= 2;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // last thread of",
                   " block 'i' writes its result to offset 'i'\n    {\n        if ((local_tid_229372 - squot32(local_tid_229372, 32) * 32) == 31 &&\n            ltid_in_bounds_229399) {\n            ((volatile __local\n              int64_t *) color_225128)[sext_i32_i64(squot32(local_tid_229372,\n                                                            32))] = x_220884;\n            ((volatile __local\n              int64_t *) color_225127)[sext_i32_i64(squot32(local_tid_229372,\n                                                            32))] = x_220885;\n            ((volatile __local\n              int64_t *) color_225126)[sext_i32_i64(squot32(local_tid_229372,\n                                                            32))] = x_220886;\n            ((volatile __local\n              int64_t *) color_225125)[sext_i32_i64(squot32(local_tid_229372,\n                                                            32))] = x_220887;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n    {\n        int32_t skip_threads_229403;\n        \n        // read input for in-block scan\n        {\n            if (squot32(local_tid_229372, 32) == 0 && ltid_in_bounds_229399) {\n                x_229391 = ((volatile __local\n                             int64_t *) color_225128)[sext_i32_i64(local_tid_229372)];\n                x_229392 = ((volatile __local\n                             int64_t *) color_225127)[sext_i32_i64(local_tid_229372)];\n                x_229393 = ((volatile __local\n                             int64_t *) color_225126)[sext_i32_i64(local_tid_229372)];\n                x_229394 = ((volatile __local\n                             int64_t *) color_225125)[sext_i32_i64(local_tid_229372)];\n                if ((local_tid_229372 - squot32(local_tid_229372, 32) * 32) ==\n                    0) {\n                    x_229387 = x_229391;\n                    x_229388 = x_229392;\n                    x_229389 = x_229393;\n             ",
                   "       x_229390 = x_229394;\n                }\n            }\n        }\n        // in-block scan (hopefully no barriers needed)\n        {\n            skip_threads_229403 = 1;\n            while (slt32(skip_threads_229403, 32)) {\n                bool thread_active_229404 = sle32(skip_threads_229403,\n                                                  local_tid_229372 -\n                                                  squot32(local_tid_229372,\n                                                          32) * 32) &&\n                     (squot32(local_tid_229372, 32) == 0 &&\n                      ltid_in_bounds_229399);\n                \n                if (thread_active_229404) {\n                    // read operands\n                    {\n                        x_229387 = ((volatile __local\n                                     int64_t *) color_225128)[sext_i32_i64(local_tid_229372) -\n                                                              sext_i32_i64(skip_threads_229403)];\n                        x_229388 = ((volatile __local\n                                     int64_t *) color_225127)[sext_i32_i64(local_tid_229372) -\n                                                              sext_i32_i64(skip_threads_229403)];\n                        x_229389 = ((volatile __local\n                                     int64_t *) color_225126)[sext_i32_i64(local_tid_229372) -\n                                                              sext_i32_i64(skip_threads_229403)];\n                        x_229390 = ((volatile __local\n                                     int64_t *) color_225125)[sext_i32_i64(local_tid_229372) -\n                                                              sext_i32_i64(skip_threads_229403)];\n                    }\n                }\n                // perform operation\n                {\n                    bool inactive_229405 =\n                         slt64(srem64(sext_i32_i64(local_tid_229372 * 32 + 32 -\n                                      1), n_196692),\n  ",
                   "                             sext_i32_i64(local_tid_229372 * 32 + 32 - 1) -\n                               sext_i32_i64((local_tid_229372 -\n                                             skip_threads_229403) * 32 + 32 -\n                               1));\n                    \n                    if (thread_active_229404 && inactive_229405) {\n                        x_229387 = x_229391;\n                        x_229388 = x_229392;\n                        x_229389 = x_229393;\n                        x_229390 = x_229394;\n                    }\n                    if (thread_active_229404) {\n                        if (!inactive_229405) {\n                            int64_t defunc_1_op_res_229395 = add64(x_229387,\n                                                                   x_229391);\n                            int64_t defunc_1_op_res_229396 = add64(x_229388,\n                                                                   x_229392);\n                            int64_t defunc_1_op_res_229397 = add64(x_229389,\n                                                                   x_229393);\n                            int64_t defunc_1_op_res_229398 = add64(x_229390,\n                                                                   x_229394);\n                            \n                            x_229387 = defunc_1_op_res_229395;\n                            x_229388 = defunc_1_op_res_229396;\n                            x_229389 = defunc_1_op_res_229397;\n                            x_229390 = defunc_1_op_res_229398;\n                        }\n                    }\n                }\n                if (sle32(wave_sizze_229374, skip_threads_229403)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                if (thread_active_229404) {\n                    // write result\n                    {\n                        ((volatile __local\n                          int64_t *) color_225128)[sext_i32_i64(local_tid_229372)] =\n                          ",
                   "  x_229387;\n                        x_229391 = x_229387;\n                        ((volatile __local\n                          int64_t *) color_225127)[sext_i32_i64(local_tid_229372)] =\n                            x_229388;\n                        x_229392 = x_229388;\n                        ((volatile __local\n                          int64_t *) color_225126)[sext_i32_i64(local_tid_229372)] =\n                            x_229389;\n                        x_229393 = x_229389;\n                        ((volatile __local\n                          int64_t *) color_225125)[sext_i32_i64(local_tid_229372)] =\n                            x_229390;\n                        x_229394 = x_229390;\n                    }\n                }\n                if (sle32(wave_sizze_229374, skip_threads_229403)) {\n                    barrier(CLK_LOCAL_MEM_FENCE);\n                }\n                skip_threads_229403 *= 2;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    bool no_carry_in_229406 = squot32(local_tid_229372, 32) == 0 ||\n         !ltid_in_bounds_229399;\n    \n    // carry-in for every block except the first\n    {\n        // read operands\n        {\n            if (!no_carry_in_229406) {\n                x_220888 = x_220884;\n                x_220889 = x_220885;\n                x_220890 = x_220886;\n                x_220891 = x_220887;\n                x_220884 = ((__local\n                             int64_t *) color_225128)[sext_i32_i64(squot32(local_tid_229372,\n                                                                           32)) -\n                                                      (int64_t) 1];\n                x_220885 = ((__local\n                             int64_t *) color_225127)[sext_i32_i64(squot32(local_tid_229372,\n                                                                           32)) -\n                                                      (int64_t) 1];\n                x_220886 = ((__local\n                             int64_t *) co",
                   "lor_225126)[sext_i32_i64(squot32(local_tid_229372,\n                                                                           32)) -\n                                                      (int64_t) 1];\n                x_220887 = ((__local\n                             int64_t *) color_225125)[sext_i32_i64(squot32(local_tid_229372,\n                                                                           32)) -\n                                                      (int64_t) 1];\n            }\n        }\n        // perform operation\n        {\n            bool inactive_229407 = slt64(srem64(sext_i32_i64(local_tid_229372),\n                                                n_196692),\n                                         sext_i32_i64(local_tid_229372) -\n                                         sext_i32_i64(squot32(local_tid_229372,\n                                                              32) * 32 - 1));\n            \n            if (!no_carry_in_229406) {\n                if (inactive_229407) {\n                    x_220884 = x_220888;\n                    x_220885 = x_220889;\n                    x_220886 = x_220890;\n                    x_220887 = x_220891;\n                }\n            }\n            if (!no_carry_in_229406) {\n                if (!inactive_229407) {\n                    int64_t defunc_1_op_res_220892 = add64(x_220884, x_220888);\n                    int64_t defunc_1_op_res_220893 = add64(x_220885, x_220889);\n                    int64_t defunc_1_op_res_220894 = add64(x_220886, x_220890);\n                    int64_t defunc_1_op_res_220895 = add64(x_220887, x_220891);\n                    \n                    x_220884 = defunc_1_op_res_220892;\n                    x_220885 = defunc_1_op_res_220893;\n                    x_220886 = defunc_1_op_res_220894;\n                    x_220887 = defunc_1_op_res_220895;\n                }\n            }\n        }\n        // write final result\n        {\n            if (!no_carry_in_229406) {\n                ((__local\n           ",
                   "       int64_t *) color_225128)[sext_i32_i64(local_tid_229372)] =\n                    x_220884;\n                ((__local\n                  int64_t *) color_225127)[sext_i32_i64(local_tid_229372)] =\n                    x_220885;\n                ((__local\n                  int64_t *) color_225126)[sext_i32_i64(local_tid_229372)] =\n                    x_220886;\n                ((__local\n                  int64_t *) color_225125)[sext_i32_i64(local_tid_229372)] =\n                    x_220887;\n            }\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    // restore correct values for first block\n    {\n        if (squot32(local_tid_229372, 32) == 0 && ltid_in_bounds_229399) {\n            ((__local int64_t *) color_225128)[sext_i32_i64(local_tid_229372)] =\n                x_220888;\n            ((__local int64_t *) color_225127)[sext_i32_i64(local_tid_229372)] =\n                x_220889;\n            ((__local int64_t *) color_225126)[sext_i32_i64(local_tid_229372)] =\n                x_220890;\n            ((__local int64_t *) color_225125)[sext_i32_i64(local_tid_229372)] =\n                x_220891;\n        }\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    int64_t last_res_220929;\n    \n    last_res_220929 = ((__local int64_t *) color_225128)[i_196779];\n    \n    int64_t last_res_220930;\n    \n    last_res_220930 = ((__local int64_t *) color_225127)[i_196779];\n    \n    int64_t last_res_220931;\n    \n    last_res_220931 = ((__local int64_t *) color_225126)[i_196779];\n    \n    int64_t write_i_220933 = sext_i32_i64(sext_i64_i32(ltid_pre_229376));\n    int32_t phys_tid_220934 = local_tid_229372;\n    int32_t x_220935;\n    \n    x_220935 = ((__local int32_t *) color_225124)[write_i_220933];\n    \n    float write_value_220940;\n    \n    write_value_220940 = ((__global float *) mem_param_224799)[gtid_220871 *\n                                                               n_196692 +\n                                                               write_i_220933];\n    \n    bool match_lit",
                   "_220941 = 0 == x_220935;\n    int64_t defunc_1_f_res_220942;\n    \n    if (match_lit_220941) {\n        int64_t x_220936;\n        \n        x_220936 = ((__local int64_t *) color_225128)[write_i_220933];\n        \n        int64_t case_res_220943 = sub64(x_220936, (int64_t) 1);\n        \n        defunc_1_f_res_220942 = case_res_220943;\n    } else {\n        bool match_lit_220944 = 1 == x_220935;\n        int64_t x_220945;\n        \n        if (match_lit_220944) {\n            int64_t x_220937;\n            \n            x_220937 = ((__local int64_t *) color_225127)[write_i_220933];\n            \n            int64_t x_220946 = add64(last_res_220929, x_220937);\n            int64_t case_res_220947 = sub64(x_220946, (int64_t) 1);\n            \n            x_220945 = case_res_220947;\n        } else {\n            bool match_lit_220948 = 2 == x_220935;\n            int64_t x_220949;\n            \n            if (match_lit_220948) {\n                int64_t x_220938;\n                \n                x_220938 = ((__local int64_t *) color_225126)[write_i_220933];\n                \n                int64_t x_220950 = add64(last_res_220929, last_res_220930);\n                int64_t x_220951 = add64(x_220938, x_220950);\n                int64_t case_res_220952 = sub64(x_220951, (int64_t) 1);\n                \n                x_220949 = case_res_220952;\n            } else {\n                int64_t x_220939;\n                \n                x_220939 = ((__local int64_t *) color_225125)[write_i_220933];\n                \n                int64_t x_220953 = add64(last_res_220929, last_res_220930);\n                int64_t x_220954 = add64(last_res_220931, x_220953);\n                int64_t x_220955 = add64(x_220939, x_220954);\n                int64_t defunc_1_f_res_res_220956 = sub64(x_220955,\n                                                          (int64_t) 1);\n                \n                x_220949 = defunc_1_f_res_res_220956;\n            }\n            x_220945 = x_220949;\n        }\n        defunc_1_f",
                   "_res_220942 = x_220945;\n    }\n    if (sle64((int64_t) 0, defunc_1_f_res_220942) &&\n        slt64(defunc_1_f_res_220942, n_196692)) {\n        ((__local float *) color_225129)[defunc_1_f_res_220942] =\n            write_value_220940;\n    }\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n    float tmp_229408;\n    \n    tmp_229408 = ((__local\n                   float *) color_225129)[sext_i32_i64(local_tid_229372)];\n    ((__global float *) mem_224830)[gtid_220871 * n_196692 +\n                                    sext_i32_i64(local_tid_229372)] =\n        tmp_229408;\n    barrier(CLK_LOCAL_MEM_FENCE);\n    \n  error_2:\n    return;\n}\n__kernel void mainzisegred_large_205086(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226031_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226029_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_205079,\n                                        int64_t groups_per_segment_226015,\n                                        int64_t elements_per_thread_226016,\n                                        int64_t virt_num_groups_226017,\n                                        int64_t threads_per_segment_226019,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *",
                   "mem_222588,\n                                        __global unsigned char *mem_222744,\n                                        __global unsigned char *mem_222754,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226020,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226022)\n{\n    #define segred_group_sizze_205078 (mainzisegred_group_sizze_204259)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_226031_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226031_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226029_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226029_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226024;\n    int32_t local_tid_226025;\n    int64_t group_sizze_226028;\n    int32_t wave_sizze_226027;\n    int32_t group_tid_226026;\n    \n    global_tid_226024 = get_global_id(0);\n    local_tid_226025 = get_local_id(0);\n    group_sizze_226028 = get_local_size(0);\n    wave_sizze_226027 = LOCKSTEP_WIDTH;\n    group_tid_226026 = get_group_id(0);\n    \n    int32_t phys_tid_205086 = global_tid_226024;\n    __local unsigned char *red_arr_mem_226029;\n    \n    red_arr_mem_226029 = (__local unsigned char *) red_arr_mem_226029_backing_0;\n    \n    __local unsigned char *sync_arr_mem_226031;\n    \n    sync_arr_mem_226031 = (__local\n                           unsigned char *) sync_arr_mem_226031_backing_1;\n    \n    int32_t phys_group_id_226033;\n    \n    phys_group_id_226033 = get_group_id(0);\n    for (int32_t i_226034 = 0; i_226034 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226017) - phys",
                   "_group_id_226033,\n                   sext_i64_i32(num_groups_205079)); i_226034++) {\n        int32_t virt_group_id_226035 = phys_group_id_226033 + i_226034 *\n                sext_i64_i32(num_groups_205079);\n        int32_t flat_segment_id_226036 = squot32(virt_group_id_226035,\n                                                 sext_i64_i32(groups_per_segment_226015));\n        int64_t global_tid_226037 = srem64(sext_i32_i64(virt_group_id_226035) *\n                                           segred_group_sizze_205078 +\n                                           sext_i32_i64(local_tid_226025),\n                                           segred_group_sizze_205078 *\n                                           groups_per_segment_226015);\n        int64_t slice_226038 = s_n_m_196745;\n        int64_t slice_226039 = n_p_196694 * slice_226038;\n        int64_t slice_226040 = m_196691 * slice_226039;\n        int64_t gtid_205082 = squot64(sext_i32_i64(flat_segment_id_226036),\n                                      slice_226039);\n        int64_t remnant_226041 = sext_i32_i64(flat_segment_id_226036) -\n                gtid_205082 * slice_226039;\n        int64_t gtid_205083 = squot64(remnant_226041, slice_226038);\n        int64_t remnant_226042 = remnant_226041 - gtid_205083 * slice_226038;\n        int64_t gtid_205084 = remnant_226042;\n        int64_t remnant_226043 = remnant_226042 - gtid_205084;\n        int64_t gtid_205085;\n        float x_acc_226044;\n        int64_t chunk_sizze_226045 = smin64(elements_per_thread_226016,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226037,\n                                                      threads_per_segment_226019));\n        float x_205087;\n        float x_205088;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226044 = 0.0F;\n        }\n        for (int64_t i_226049 = 0; i_226049 < chunk_sizze_226045; i_226049++) {\n            g",
                   "tid_205085 = global_tid_226037 + threads_per_segment_226019 *\n                i_226049;\n            // apply map function\n            {\n                int64_t x_205098;\n                \n                x_205098 = ((__global int64_t *) ext_mem_222321)[gtid_205082 *\n                                                                 n_p_196694 +\n                                                                 gtid_205083];\n                \n                int64_t x_205102;\n                \n                x_205102 = ((__global int64_t *) ext_mem_222420)[gtid_205082 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_205083 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_205084];\n                \n                float x_205103;\n                \n                x_205103 = ((__global float *) ext_mem_222419)[gtid_205082 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_205083 *\n                                                               s_n_m_196745 +\n                                                               gtid_205084];\n                \n                int64_t defunc_0_m_fun_res_205104;\n                \n                defunc_0_m_fun_res_205104 = ((__global\n                                              int64_t *) mem_222744)[gtid_205082 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_205083 *\n                        ",
                   "                                             s_n_m_196745 +\n                                                                     gtid_205084];\n                \n                bool cond_205106 = sle64(x_205098, gtid_205085);\n                int64_t defunc_0_f_res_205107;\n                \n                if (cond_205106) {\n                    defunc_0_f_res_205107 = (int64_t) 0;\n                } else {\n                    int64_t i_205108 = add64(gtid_205085, x_205102);\n                    int64_t defunc_0_add_arg_205109;\n                    \n                    defunc_0_add_arg_205109 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_205082 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_205083 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_205108];\n                    \n                    int64_t defunc_1_add_res_205110 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_205109);\n                    \n                    defunc_0_f_res_205107 = defunc_1_add_res_205110;\n                }\n                \n                float defunc_0_f_res_205111;\n                \n                if (cond_205106) {\n                    defunc_0_f_res_205111 = 0.0F;\n                } else {\n                    int64_t i_205112 = add64(gtid_205085, x_205102);\n                    float defunc_0_add_arg_205113;\n                    \n                    defunc_0_add_arg_205113 = ((__global\n                                                float *) mem_222588)[gtid_205082 *\n                                                                     (defunc_0_f_re",
                   "s_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_205083 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205112];\n                    defunc_0_f_res_205111 = defunc_0_add_arg_205113;\n                }\n                \n                int64_t binop_p_205114 = sub64(defunc_0_f_res_205107,\n                                               defunc_0_m_fun_res_205104);\n                float defunc_0_f_res_205115 = sitofp_i64_f32(binop_p_205114);\n                float abs_res_205116 = (float) fabs(defunc_0_f_res_205115);\n                float tmp1_205117 = abs_res_205116 / x_205103;\n                float x_205118 = tmp1_205117 * tmp1_205117;\n                float y_205119 = tmp1_205117 * x_205118;\n                float tmp2_205120 = 1.0F - y_205119;\n                float x_205121 = tmp2_205120 * tmp2_205120;\n                float tmp3_205122 = tmp2_205120 * x_205121;\n                float w_j_205123 = defunc_0_f_res_205111 * tmp3_205122;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_205087 = x_acc_226044;\n                }\n                // load new values\n                {\n                    x_205088 = w_j_205123;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_205089 = x_205087 + x_205088;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226044 = defunc_1_op_res_205089;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_205087 = x_acc_226044;\n            ((__local\n              float *) red_",
                   "arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                x_205087;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226050;\n        int32_t skip_waves_226051 = 1;\n        float x_226046;\n        float x_226047;\n        \n        offset_226050 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226025,\n                      sext_i64_i32(segred_group_sizze_205078))) {\n                x_226046 = ((__local\n                             float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                          offset_226050)];\n            }\n        }\n        offset_226050 = 1;\n        while (slt32(offset_226050, wave_sizze_226027)) {\n            if (slt32(local_tid_226025 + offset_226050,\n                      sext_i64_i32(segred_group_sizze_205078)) &&\n                ((local_tid_226025 - squot32(local_tid_226025,\n                                             wave_sizze_226027) *\n                  wave_sizze_226027) & (2 * offset_226050 - 1)) == 0) {\n                // read array element\n                {\n                    x_226047 = ((volatile __local\n                                 float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                              offset_226050)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226048 = x_226046 + x_226047;\n                    \n                    x_226046 = defunc_1_op_res_226048;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                        x_226046;\n                }\n            }\n            offset_226050 *= 2;\n        }\n        while (slt32(skip_waves_226051,\n                     squot32(sext_i64_i32(se",
                   "gred_group_sizze_205078) +\n                             wave_sizze_226027 - 1, wave_sizze_226027))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226050 = skip_waves_226051 * wave_sizze_226027;\n            if (slt32(local_tid_226025 + offset_226050,\n                      sext_i64_i32(segred_group_sizze_205078)) &&\n                ((local_tid_226025 - squot32(local_tid_226025,\n                                             wave_sizze_226027) *\n                  wave_sizze_226027) == 0 && (squot32(local_tid_226025,\n                                                      wave_sizze_226027) & (2 *\n                                                                            skip_waves_226051 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226047 = ((__local\n                                 float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                              offset_226050)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226048 = x_226046 + x_226047;\n                    \n                    x_226046 = defunc_1_op_res_226048;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                        x_226046;\n                }\n            }\n            skip_waves_226051 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226025) == (int64_t) 0) {\n                x_acc_226044 = x_226046;\n            }\n        }\n        if (groups_per_segment_226015 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n       ",
                   "         if (local_tid_226025 == 0) {\n                    ((__global float *) mem_222754)[gtid_205082 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_205083 *\n                                                    s_n_m_196745 +\n                                                    gtid_205084] = x_acc_226044;\n                }\n            }\n        } else {\n            int32_t old_counter_226052;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226025 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226020)[sext_i32_i64(virt_group_id_226035)] =\n                        x_acc_226044;\n                    mem_fence_global();\n                    old_counter_226052 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226022)[sext_i32_i64(srem32(flat_segment_id_226036,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226031)[(int64_t) 0] =\n                        old_counter_226052 == groups_per_segment_226015 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226053;\n            \n            is_last_group_226053 = ((__local\n                                     bool *) sync_arr_mem_226031)[(int64_t) 0];\n            if (is_last_group_226053) {\n                if (local_tid_226025 == 0) {\n                    old_counter_226052 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226022)[sext_i32_i64(sr",
                   "em32(flat_segment_id_226036,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226015));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226054 =\n                            sdiv_up64(groups_per_segment_226015,\n                                      segred_group_sizze_205078);\n                    \n                    x_205087 = 0.0F;\n                    for (int64_t i_226055 = 0; i_226055 <\n                         read_per_thread_226054; i_226055++) {\n                        int64_t group_res_id_226056 =\n                                sext_i32_i64(local_tid_226025) *\n                                read_per_thread_226054 + i_226055;\n                        int64_t index_of_group_res_226057 =\n                                sext_i32_i64(flat_segment_id_226036) *\n                                groups_per_segment_226015 + group_res_id_226056;\n                        \n                        if (slt64(group_res_id_226056,\n                                  groups_per_segment_226015)) {\n                            x_205088 = ((__global\n                                         float *) segred_tmp_mem_226020)[index_of_group_res_226057];\n                            \n                            float defunc_1_op_res_205089 = x_205087 + x_205088;\n                            \n                            x_205087 = defunc_1_op_res_205089;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                    x_205087;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226058;\n          ",
                   "          int32_t skip_waves_226059 = 1;\n                    float x_226046;\n                    float x_226047;\n                    \n                    offset_226058 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226025,\n                                  sext_i64_i32(segred_group_sizze_205078))) {\n                            x_226046 = ((__local\n                                         float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                                      offset_226058)];\n                        }\n                    }\n                    offset_226058 = 1;\n                    while (slt32(offset_226058, wave_sizze_226027)) {\n                        if (slt32(local_tid_226025 + offset_226058,\n                                  sext_i64_i32(segred_group_sizze_205078)) &&\n                            ((local_tid_226025 - squot32(local_tid_226025,\n                                                         wave_sizze_226027) *\n                              wave_sizze_226027) & (2 * offset_226058 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226047 = ((volatile __local\n                                             float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                                          offset_226058)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226048 = x_226046 +\n                                      x_226047;\n                                \n                                x_226046 = defunc_1_op_res_226048;\n                            }\n                            // write result of operation\n                            {\n    ",
                   "                            ((volatile __local\n                                  float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                                    x_226046;\n                            }\n                        }\n                        offset_226058 *= 2;\n                    }\n                    while (slt32(skip_waves_226059,\n                                 squot32(sext_i64_i32(segred_group_sizze_205078) +\n                                         wave_sizze_226027 - 1,\n                                         wave_sizze_226027))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226058 = skip_waves_226059 * wave_sizze_226027;\n                        if (slt32(local_tid_226025 + offset_226058,\n                                  sext_i64_i32(segred_group_sizze_205078)) &&\n                            ((local_tid_226025 - squot32(local_tid_226025,\n                                                         wave_sizze_226027) *\n                              wave_sizze_226027) == 0 &&\n                             (squot32(local_tid_226025, wave_sizze_226027) &\n                              (2 * skip_waves_226059 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226047 = ((__local\n                                             float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025 +\n                                                                          offset_226058)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226048 = x_226046 +\n                                      x_226047;\n                                \n                                x_226046 = defunc_1_op_res_226048;\n                            }\n                            // write result of operation\n                            {\n     ",
                   "                           ((__local\n                                  float *) red_arr_mem_226029)[sext_i32_i64(local_tid_226025)] =\n                                    x_226046;\n                            }\n                        }\n                        skip_waves_226059 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226025 == 0) {\n                            ((__global float *) mem_222754)[gtid_205082 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_205083 *\n                                                            s_n_m_196745 +\n                                                            gtid_205084] =\n                                x_226046;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_205078\n}\n__kernel void mainzisegred_large_205160(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226119_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226117_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_205153,\n                                        int64_t groups_per_segment_226103,\n                                        int64_t elements_per_thread_",
                   "226104,\n                                        int64_t virt_num_groups_226105,\n                                        int64_t threads_per_segment_226107,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_222760,\n                                        __global unsigned char *mem_222765,\n                                        __global unsigned char *mem_222771,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226108,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226110)\n{\n    #define segred_group_sizze_205152 (mainzisegred_group_sizze_204157)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_226119_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226119_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226117_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226117_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226112;\n    int32_t local_tid_226113;\n    int64_t group_sizze_226116;\n    int32_t wave_sizze_226115;\n    int32_t group_tid_226114;\n    \n    global_tid_226112 = get_global_id(0);\n    local_tid_22611",
                   "3 = get_local_id(0);\n    group_sizze_226116 = get_local_size(0);\n    wave_sizze_226115 = LOCKSTEP_WIDTH;\n    group_tid_226114 = get_group_id(0);\n    \n    int32_t phys_tid_205160 = global_tid_226112;\n    __local unsigned char *red_arr_mem_226117;\n    \n    red_arr_mem_226117 = (__local unsigned char *) red_arr_mem_226117_backing_0;\n    \n    __local unsigned char *sync_arr_mem_226119;\n    \n    sync_arr_mem_226119 = (__local\n                           unsigned char *) sync_arr_mem_226119_backing_1;\n    \n    int32_t phys_group_id_226121;\n    \n    phys_group_id_226121 = get_group_id(0);\n    for (int32_t i_226122 = 0; i_226122 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226105) - phys_group_id_226121,\n                   sext_i64_i32(num_groups_205153)); i_226122++) {\n        int32_t virt_group_id_226123 = phys_group_id_226121 + i_226122 *\n                sext_i64_i32(num_groups_205153);\n        int32_t flat_segment_id_226124 = squot32(virt_group_id_226123,\n                                                 sext_i64_i32(groups_per_segment_226103));\n        int64_t global_tid_226125 = srem64(sext_i32_i64(virt_group_id_226123) *\n                                           segred_group_sizze_205152 +\n                                           sext_i32_i64(local_tid_226113),\n                                           segred_group_sizze_205152 *\n                                           groups_per_segment_226103);\n        int64_t slice_226126 = s_n_m_196745;\n        int64_t slice_226127 = n_p_196694 * slice_226126;\n        int64_t slice_226128 = m_196691 * slice_226127;\n        int64_t gtid_205156 = squot64(sext_i32_i64(flat_segment_id_226124),\n                                      slice_226127);\n        int64_t remnant_226129 = sext_i32_i64(flat_segment_id_226124) -\n                gtid_205156 * slice_226127;\n        int64_t gtid_205157 = squot64(remnant_226129, slice_226126);\n        int64_t remnant_226130 = remnant_226129 - gtid_205157 * slice_226126;\n        int64_t gtid",
                   "_205158 = remnant_226130;\n        int64_t remnant_226131 = remnant_226130 - gtid_205158;\n        int64_t gtid_205159;\n        float x_acc_226132;\n        int64_t chunk_sizze_226133 = smin64(elements_per_thread_226104,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226125,\n                                                      threads_per_segment_226107));\n        float x_205161;\n        float x_205162;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226132 = 0.0F;\n        }\n        for (int64_t i_226137 = 0; i_226137 < chunk_sizze_226133; i_226137++) {\n            gtid_205159 = global_tid_226125 + threads_per_segment_226107 *\n                i_226137;\n            // apply map function\n            {\n                int64_t x_205175;\n                \n                x_205175 = ((__global int64_t *) ext_mem_222321)[gtid_205156 *\n                                                                 n_p_196694 +\n                                                                 gtid_205157];\n                \n                int64_t x_205180;\n                \n                x_205180 = ((__global int64_t *) ext_mem_222420)[gtid_205156 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_205157 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_205158];\n                \n                float x_205181;\n                \n                x_205181 = ((__global float *) ext_mem_222419)[gtid_205156 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                       ",
                   "                        gtid_205157 *\n                                                               s_n_m_196745 +\n                                                               gtid_205158];\n                \n                float a0_205182;\n                \n                a0_205182 = ((__global float *) mem_222760)[gtid_205156 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_205157 *\n                                                            s_n_m_196745 +\n                                                            gtid_205158];\n                \n                int64_t defunc_0_m_fun_res_205183;\n                \n                defunc_0_m_fun_res_205183 = ((__global\n                                              int64_t *) mem_222765)[gtid_205156 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_205157 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_205158];\n                \n                bool cond_205185 = sle64(x_205175, gtid_205159);\n                int64_t defunc_0_f_res_205186;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205186 = (int64_t) 0;\n                } else {\n                    int64_t i_205187 = add64(gtid_205159, x_205180);\n                    int64_t defunc_0_add_arg_205188;\n                    \n                    defunc_0_add_arg_205188 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_205156 *\n                                                                           (defunc_0_f_res_196740 ",
                   "*\n                                                                            n_p_196694) +\n                                                                           gtid_205157 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_205187];\n                    \n                    int64_t defunc_1_add_res_205189 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_205188);\n                    \n                    defunc_0_f_res_205186 = defunc_1_add_res_205189;\n                }\n                \n                float defunc_0_f_res_205190;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205190 = 0.0F;\n                } else {\n                    int64_t i_205191 = add64(gtid_205159, x_205180);\n                    float defunc_0_add_arg_205192;\n                    \n                    defunc_0_add_arg_205192 = ((__global\n                                                float *) mem_222588)[gtid_205156 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_205157 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205191];\n                    defunc_0_f_res_205190 = defunc_0_add_arg_205192;\n                }\n                \n                int64_t binop_p_205193 = sub64(defunc_0_f_res_205186,\n                                               defunc_0_m_fun_res_205183);\n                float defunc_0_f_res_205194 = sitofp_i64_f32(binop_p_205193);\n                float abs_res_205195 = (float) fabs(defunc_0_f_res_205194);\n                float tmp1_205196 = abs",
                   "_res_205195 / x_205181;\n                float x_205197 = tmp1_205196 * tmp1_205196;\n                float y_205198 = tmp1_205196 * x_205197;\n                float tmp2_205199 = 1.0F - y_205198;\n                float x_205200 = tmp2_205199 * tmp2_205199;\n                float tmp3_205201 = tmp2_205199 * x_205200;\n                float tmp4_205202 = defunc_0_f_res_205190 * tmp3_205201;\n                float defunc_0_f_res_205203;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205203 = 0.0F;\n                } else {\n                    int64_t i_205204 = add64(gtid_205159, x_205180);\n                    float defunc_0_add_arg_205205;\n                    \n                    defunc_0_add_arg_205205 = ((__global\n                                                float *) mem_222583)[gtid_205156 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_205157 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205204];\n                    defunc_0_f_res_205203 = defunc_0_add_arg_205205;\n                }\n                \n                float x_205206 = a0_205182 * tmp4_205202;\n                float defunc_9_fit_fun_res_205207 = defunc_0_f_res_205203 *\n                      x_205206;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_205161 = x_acc_226132;\n                }\n                // load new values\n                {\n                    x_205162 = defunc_9_fit_fun_res_205207;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_205163 = x_205161 + x_20516",
                   "2;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226132 = defunc_1_op_res_205163;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_205161 = x_acc_226132;\n            ((__local\n              float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                x_205161;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226138;\n        int32_t skip_waves_226139 = 1;\n        float x_226134;\n        float x_226135;\n        \n        offset_226138 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226113,\n                      sext_i64_i32(segred_group_sizze_205152))) {\n                x_226134 = ((__local\n                             float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                          offset_226138)];\n            }\n        }\n        offset_226138 = 1;\n        while (slt32(offset_226138, wave_sizze_226115)) {\n            if (slt32(local_tid_226113 + offset_226138,\n                      sext_i64_i32(segred_group_sizze_205152)) &&\n                ((local_tid_226113 - squot32(local_tid_226113,\n                                             wave_sizze_226115) *\n                  wave_sizze_226115) & (2 * offset_226138 - 1)) == 0) {\n                // read array element\n                {\n                    x_226135 = ((volatile __local\n                                 float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                              offset_226138)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226136 = x_226134 + x_226135;\n                    \n                    x_226134 = defunc_1_op_res_226136;\n               ",
                   " }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                        x_226134;\n                }\n            }\n            offset_226138 *= 2;\n        }\n        while (slt32(skip_waves_226139,\n                     squot32(sext_i64_i32(segred_group_sizze_205152) +\n                             wave_sizze_226115 - 1, wave_sizze_226115))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226138 = skip_waves_226139 * wave_sizze_226115;\n            if (slt32(local_tid_226113 + offset_226138,\n                      sext_i64_i32(segred_group_sizze_205152)) &&\n                ((local_tid_226113 - squot32(local_tid_226113,\n                                             wave_sizze_226115) *\n                  wave_sizze_226115) == 0 && (squot32(local_tid_226113,\n                                                      wave_sizze_226115) & (2 *\n                                                                            skip_waves_226139 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226135 = ((__local\n                                 float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                              offset_226138)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226136 = x_226134 + x_226135;\n                    \n                    x_226134 = defunc_1_op_res_226136;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                        x_226134;\n                }\n            }\n            skip_waves_226139 *= 2;\n     ",
                   "   }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226113) == (int64_t) 0) {\n                x_acc_226132 = x_226134;\n            }\n        }\n        if (groups_per_segment_226103 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226113 == 0) {\n                    ((__global float *) mem_222771)[gtid_205156 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_205157 *\n                                                    s_n_m_196745 +\n                                                    gtid_205158] = x_acc_226132;\n                }\n            }\n        } else {\n            int32_t old_counter_226140;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226113 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226108)[sext_i32_i64(virt_group_id_226123)] =\n                        x_acc_226132;\n                    mem_fence_global();\n                    old_counter_226140 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226110)[sext_i32_i64(srem32(flat_segment_id_226124,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226119)[(int64_t) 0] =\n                        old_counter_226140 == groups_per_segment_226103 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226141;\n            \n            is_last_group_226141 ",
                   "= ((__local\n                                     bool *) sync_arr_mem_226119)[(int64_t) 0];\n            if (is_last_group_226141) {\n                if (local_tid_226113 == 0) {\n                    old_counter_226140 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226110)[sext_i32_i64(srem32(flat_segment_id_226124,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226103));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226142 =\n                            sdiv_up64(groups_per_segment_226103,\n                                      segred_group_sizze_205152);\n                    \n                    x_205161 = 0.0F;\n                    for (int64_t i_226143 = 0; i_226143 <\n                         read_per_thread_226142; i_226143++) {\n                        int64_t group_res_id_226144 =\n                                sext_i32_i64(local_tid_226113) *\n                                read_per_thread_226142 + i_226143;\n                        int64_t index_of_group_res_226145 =\n                                sext_i32_i64(flat_segment_id_226124) *\n                                groups_per_segment_226103 + group_res_id_226144;\n                        \n                        if (slt64(group_res_id_226144,\n                                  groups_per_segment_226103)) {\n                            x_205162 = ((__global\n                                         float *) segred_tmp_mem_226108)[index_of_group_res_226145];\n                            \n                            float defunc_1_op_res_205163 = x_205161 + x_205162;\n                            \n                            x_205161 = defunc_1_o",
                   "p_res_205163;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                    x_205161;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226146;\n                    int32_t skip_waves_226147 = 1;\n                    float x_226134;\n                    float x_226135;\n                    \n                    offset_226146 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226113,\n                                  sext_i64_i32(segred_group_sizze_205152))) {\n                            x_226134 = ((__local\n                                         float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                                      offset_226146)];\n                        }\n                    }\n                    offset_226146 = 1;\n                    while (slt32(offset_226146, wave_sizze_226115)) {\n                        if (slt32(local_tid_226113 + offset_226146,\n                                  sext_i64_i32(segred_group_sizze_205152)) &&\n                            ((local_tid_226113 - squot32(local_tid_226113,\n                                                         wave_sizze_226115) *\n                              wave_sizze_226115) & (2 * offset_226146 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226135 = ((volatile __local\n                                             float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                                          offset_226146)];\n                            }\n                            // apply reduction o",
                   "peration\n                            {\n                                float defunc_1_op_res_226136 = x_226134 +\n                                      x_226135;\n                                \n                                x_226134 = defunc_1_op_res_226136;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                                    x_226134;\n                            }\n                        }\n                        offset_226146 *= 2;\n                    }\n                    while (slt32(skip_waves_226147,\n                                 squot32(sext_i64_i32(segred_group_sizze_205152) +\n                                         wave_sizze_226115 - 1,\n                                         wave_sizze_226115))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226146 = skip_waves_226147 * wave_sizze_226115;\n                        if (slt32(local_tid_226113 + offset_226146,\n                                  sext_i64_i32(segred_group_sizze_205152)) &&\n                            ((local_tid_226113 - squot32(local_tid_226113,\n                                                         wave_sizze_226115) *\n                              wave_sizze_226115) == 0 &&\n                             (squot32(local_tid_226113, wave_sizze_226115) &\n                              (2 * skip_waves_226147 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226135 = ((__local\n                                             float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113 +\n                                                                          offset_226146)];\n                            }\n                            // apply reduction op",
                   "eration\n                            {\n                                float defunc_1_op_res_226136 = x_226134 +\n                                      x_226135;\n                                \n                                x_226134 = defunc_1_op_res_226136;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226117)[sext_i32_i64(local_tid_226113)] =\n                                    x_226134;\n                            }\n                        }\n                        skip_waves_226147 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226113 == 0) {\n                            ((__global float *) mem_222771)[gtid_205156 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_205157 *\n                                                            s_n_m_196745 +\n                                                            gtid_205158] =\n                                x_226134;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_205152\n}\n__kernel void mainzisegred_large_207220(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226384_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226382_backing_aligned_1,\n                                        __local volatile\n                                        in",
                   "t64_t *red_arr_mem_226380_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226378_backing_aligned_3,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_207211,\n                                        int64_t groups_per_segment_226360,\n                                        int64_t elements_per_thread_226361,\n                                        int64_t virt_num_groups_226362,\n                                        int64_t threads_per_segment_226364,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223030,\n                                        __global unsigned char *mem_223040,\n                                        __global unsigned char *mem_223045,\n                                        __global unsigned char *mem_223050,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226365,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226367,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226369,\n                                        __global\n                                        unsi",
                   "gned char *mainzicounter_mem_226371)\n{\n    #define segred_group_sizze_207210 (mainzisegred_group_sizze_206176)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_226384_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226384_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226382_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226382_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226380_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226380_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226378_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226378_backing_aligned_3;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226373;\n    int32_t local_tid_226374;\n    int64_t group_sizze_226377;\n    int32_t wave_sizze_226376;\n    int32_t group_tid_226375;\n    \n    global_tid_226373 = get_global_id(0);\n    local_tid_226374 = get_local_id(0);\n    group_sizze_226377 = get_local_size(0);\n    wave_sizze_226376 = LOCKSTEP_WIDTH;\n    group_tid_226375 = get_group_id(0);\n    \n    int32_t phys_tid_207220 = global_tid_226373;\n    __local unsigned char *red_arr_mem_226378;\n    \n    red_arr_mem_226378 = (__local unsigned char *) red_arr_mem_226378_backing_0;\n    \n    __local unsigned char *red_arr_mem_226380;\n    \n    red_arr_mem_226380 = (__local unsigned char *) red_arr_mem_226380_backing_1;\n    \n    __local unsigned char *red_arr_mem_226382;\n    \n    red_arr_mem_226382 = (__local unsigned char *) red_arr_mem_226382_backing_2;\n    \n    __local unsigned ch",
                   "ar *sync_arr_mem_226384;\n    \n    sync_arr_mem_226384 = (__local\n                           unsigned char *) sync_arr_mem_226384_backing_3;\n    \n    int32_t phys_group_id_226386;\n    \n    phys_group_id_226386 = get_group_id(0);\n    for (int32_t i_226387 = 0; i_226387 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226362) - phys_group_id_226386,\n                   sext_i64_i32(num_groups_207211)); i_226387++) {\n        int32_t virt_group_id_226388 = phys_group_id_226386 + i_226387 *\n                sext_i64_i32(num_groups_207211);\n        int32_t flat_segment_id_226389 = squot32(virt_group_id_226388,\n                                                 sext_i64_i32(groups_per_segment_226360));\n        int64_t global_tid_226390 = srem64(sext_i32_i64(virt_group_id_226388) *\n                                           segred_group_sizze_207210 +\n                                           sext_i32_i64(local_tid_226374),\n                                           segred_group_sizze_207210 *\n                                           groups_per_segment_226360);\n        int64_t slice_226391 = s_n_m_196745;\n        int64_t slice_226392 = n_p_196694 * slice_226391;\n        int64_t slice_226393 = m_196691 * slice_226392;\n        int64_t gtid_207216 = squot64(sext_i32_i64(flat_segment_id_226389),\n                                      slice_226392);\n        int64_t remnant_226394 = sext_i32_i64(flat_segment_id_226389) -\n                gtid_207216 * slice_226392;\n        int64_t gtid_207217 = squot64(remnant_226394, slice_226391);\n        int64_t remnant_226395 = remnant_226394 - gtid_207217 * slice_226391;\n        int64_t gtid_207218 = remnant_226395;\n        int64_t remnant_226396 = remnant_226395 - gtid_207218;\n        int64_t gtid_207219;\n        float x_acc_226397;\n        float x_acc_226398;\n        float x_acc_226399;\n        int64_t chunk_sizze_226400 = smin64(elements_per_thread_226361,\n                                            sdiv_up64(q_s_196695 -\n                   ",
                   "                                   global_tid_226390,\n                                                      threads_per_segment_226364));\n        float x_207221;\n        float x_207222;\n        float x_207223;\n        float x_207224;\n        float x_207225;\n        float x_207226;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226397 = 0.0F;\n            x_acc_226398 = 0.0F;\n            x_acc_226399 = 0.0F;\n        }\n        for (int64_t i_226410 = 0; i_226410 < chunk_sizze_226400; i_226410++) {\n            gtid_207219 = global_tid_226390 + threads_per_segment_226364 *\n                i_226410;\n            // apply map function\n            {\n                int64_t x_207238;\n                \n                x_207238 = ((__global int64_t *) ext_mem_222321)[gtid_207216 *\n                                                                 n_p_196694 +\n                                                                 gtid_207217];\n                \n                int64_t x_207242;\n                \n                x_207242 = ((__global int64_t *) ext_mem_222420)[gtid_207216 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_207217 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_207218];\n                \n                float x_207243;\n                \n                x_207243 = ((__global float *) ext_mem_222419)[gtid_207216 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_207217 *\n                                                               s_n_m_196745 +\n                          ",
                   "                                     gtid_207218];\n                \n                int64_t defunc_0_m_fun_res_207244;\n                \n                defunc_0_m_fun_res_207244 = ((__global\n                                              int64_t *) mem_223030)[gtid_207216 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_207217 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_207218];\n                \n                bool cond_207246 = sle64(x_207238, gtid_207219);\n                int64_t defunc_0_f_res_207247;\n                \n                if (cond_207246) {\n                    defunc_0_f_res_207247 = (int64_t) 0;\n                } else {\n                    int64_t i_207248 = add64(gtid_207219, x_207242);\n                    int64_t defunc_0_add_arg_207249;\n                    \n                    defunc_0_add_arg_207249 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_207216 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_207217 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_207248];\n                    \n                    int64_t defunc_1_add_res_207250 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_207249);\n                    \n                    defunc_0_f_res_207247 = defunc_1_add_res_207250;\n                }\n   ",
                   "             \n                float defunc_0_f_res_207251;\n                \n                if (cond_207246) {\n                    defunc_0_f_res_207251 = 0.0F;\n                } else {\n                    int64_t i_207252 = add64(gtid_207219, x_207242);\n                    float defunc_0_add_arg_207253;\n                    \n                    defunc_0_add_arg_207253 = ((__global\n                                                float *) mem_222588)[gtid_207216 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207217 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207252];\n                    defunc_0_f_res_207251 = defunc_0_add_arg_207253;\n                }\n                \n                int64_t binop_p_207254 = sub64(defunc_0_f_res_207247,\n                                               defunc_0_m_fun_res_207244);\n                float defunc_0_f_res_207255 = sitofp_i64_f32(binop_p_207254);\n                float abs_res_207256 = (float) fabs(defunc_0_f_res_207255);\n                float tmp1_207257 = abs_res_207256 / x_207243;\n                float x_207258 = tmp1_207257 * tmp1_207257;\n                float y_207259 = tmp1_207257 * x_207258;\n                float tmp2_207260 = 1.0F - y_207259;\n                float x_207261 = tmp2_207260 * tmp2_207260;\n                float tmp3_207262 = tmp2_207260 * x_207261;\n                float w_j_207263 = defunc_0_f_res_207251 * tmp3_207262;\n                float xw_j_207264 = defunc_0_f_res_207255 * w_j_207263;\n                float x2w_j_207265 = defunc_0_f_res_207255 * xw_j_207264;\n                \n                // save map-out results\n                { }\n                // load accumulator\n            ",
                   "    {\n                    x_207221 = x_acc_226397;\n                    x_207222 = x_acc_226398;\n                    x_207223 = x_acc_226399;\n                }\n                // load new values\n                {\n                    x_207224 = w_j_207263;\n                    x_207225 = xw_j_207264;\n                    x_207226 = x2w_j_207265;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_207227 = x_207221 + x_207224;\n                    float defunc_1_op_res_207228 = x_207222 + x_207225;\n                    float defunc_1_op_res_207229 = x_207223 + x_207226;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226397 = defunc_1_op_res_207227;\n                        x_acc_226398 = defunc_1_op_res_207228;\n                        x_acc_226399 = defunc_1_op_res_207229;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_207221 = x_acc_226397;\n            x_207222 = x_acc_226398;\n            x_207223 = x_acc_226399;\n            ((__local\n              float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                x_207221;\n            ((__local\n              float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                x_207222;\n            ((__local\n              float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                x_207223;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226411;\n        int32_t skip_waves_226412 = 1;\n        float x_226401;\n        float x_226402;\n        float x_226403;\n        float x_226404;\n        float x_226405;\n        float x_226406;\n        \n        offset_226411 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226374,\n                      sext_i64_i32(segre",
                   "d_group_sizze_207210))) {\n                x_226401 = ((__local\n                             float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n                                                          offset_226411)];\n                x_226402 = ((__local\n                             float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                          offset_226411)];\n                x_226403 = ((__local\n                             float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                          offset_226411)];\n            }\n        }\n        offset_226411 = 1;\n        while (slt32(offset_226411, wave_sizze_226376)) {\n            if (slt32(local_tid_226374 + offset_226411,\n                      sext_i64_i32(segred_group_sizze_207210)) &&\n                ((local_tid_226374 - squot32(local_tid_226374,\n                                             wave_sizze_226376) *\n                  wave_sizze_226376) & (2 * offset_226411 - 1)) == 0) {\n                // read array element\n                {\n                    x_226404 = ((volatile __local\n                                 float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n                                                              offset_226411)];\n                    x_226405 = ((volatile __local\n                                 float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                              offset_226411)];\n                    x_226406 = ((volatile __local\n                                 float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                              offset_226411)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226407 = x_226401 + x_226404;\n                    float defunc_1_op_res_226408 = x_22640",
                   "2 + x_226405;\n                    float defunc_1_op_res_226409 = x_226403 + x_226406;\n                    \n                    x_226401 = defunc_1_op_res_226407;\n                    x_226402 = defunc_1_op_res_226408;\n                    x_226403 = defunc_1_op_res_226409;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                        x_226401;\n                    ((volatile __local\n                      float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                        x_226402;\n                    ((volatile __local\n                      float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                        x_226403;\n                }\n            }\n            offset_226411 *= 2;\n        }\n        while (slt32(skip_waves_226412,\n                     squot32(sext_i64_i32(segred_group_sizze_207210) +\n                             wave_sizze_226376 - 1, wave_sizze_226376))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226411 = skip_waves_226412 * wave_sizze_226376;\n            if (slt32(local_tid_226374 + offset_226411,\n                      sext_i64_i32(segred_group_sizze_207210)) &&\n                ((local_tid_226374 - squot32(local_tid_226374,\n                                             wave_sizze_226376) *\n                  wave_sizze_226376) == 0 && (squot32(local_tid_226374,\n                                                      wave_sizze_226376) & (2 *\n                                                                            skip_waves_226412 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226404 = ((__local\n                                 float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n        ",
                   "                                                      offset_226411)];\n                    x_226405 = ((__local\n                                 float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                              offset_226411)];\n                    x_226406 = ((__local\n                                 float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                              offset_226411)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226407 = x_226401 + x_226404;\n                    float defunc_1_op_res_226408 = x_226402 + x_226405;\n                    float defunc_1_op_res_226409 = x_226403 + x_226406;\n                    \n                    x_226401 = defunc_1_op_res_226407;\n                    x_226402 = defunc_1_op_res_226408;\n                    x_226403 = defunc_1_op_res_226409;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                        x_226401;\n                    ((__local\n                      float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                        x_226402;\n                    ((__local\n                      float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                        x_226403;\n                }\n            }\n            skip_waves_226412 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226374) == (int64_t) 0) {\n                x_acc_226397 = x_226401;\n                x_acc_226398 = x_226402;\n                x_acc_226399 = x_226403;\n            }\n        }\n        if (groups_per_segment_226360 == (int64_t) 1) {\n            // first thread in group sav",
                   "es final result to memory\n            {\n                if (local_tid_226374 == 0) {\n                    ((__global float *) mem_223040)[gtid_207216 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_207217 *\n                                                    s_n_m_196745 +\n                                                    gtid_207218] = x_acc_226397;\n                    ((__global float *) mem_223045)[gtid_207216 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_207217 *\n                                                    s_n_m_196745 +\n                                                    gtid_207218] = x_acc_226398;\n                    ((__global float *) mem_223050)[gtid_207216 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_207217 *\n                                                    s_n_m_196745 +\n                                                    gtid_207218] = x_acc_226399;\n                }\n            }\n        } else {\n            int32_t old_counter_226413;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226374 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226365)[sext_i32_i64(virt_group_id_226388)] =\n                        x_acc_226397;\n                    ((__global\n                      float *) segred_tmp_mem_226367)[sext_i32_i64(virt_group_id_226388)] =\n                        x_acc_226398;\n                    ((__global\n                      float *) segred_tmp_mem_226369)[sext_i32_i64(virt_group_id_226388)] =\n                        x_acc_226399;\n                    mem_fence_global();\n                    old_counter_226413 =\n                        atom",
                   "ic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226371)[sext_i32_i64(srem32(flat_segment_id_226389,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226384)[(int64_t) 0] =\n                        old_counter_226413 == groups_per_segment_226360 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226414;\n            \n            is_last_group_226414 = ((__local\n                                     bool *) sync_arr_mem_226384)[(int64_t) 0];\n            if (is_last_group_226414) {\n                if (local_tid_226374 == 0) {\n                    old_counter_226413 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226371)[sext_i32_i64(srem32(flat_segment_id_226389,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226360));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226415 =\n                            sdiv_up64(groups_per_segment_226360,\n                                      segred_group_sizze_207210);\n                    \n                    x_207221 = 0.0F;\n                    x_207222 = 0.0F;\n                    x_207223 = 0.0F;\n                    for (int64_t i_226416 = 0; i_226416 <\n                         read_per_thread_226415; i_226416++) {\n                        int64_t group_res_id_226417 =\n                                sext_i3",
                   "2_i64(local_tid_226374) *\n                                read_per_thread_226415 + i_226416;\n                        int64_t index_of_group_res_226418 =\n                                sext_i32_i64(flat_segment_id_226389) *\n                                groups_per_segment_226360 + group_res_id_226417;\n                        \n                        if (slt64(group_res_id_226417,\n                                  groups_per_segment_226360)) {\n                            x_207224 = ((__global\n                                         float *) segred_tmp_mem_226365)[index_of_group_res_226418];\n                            x_207225 = ((__global\n                                         float *) segred_tmp_mem_226367)[index_of_group_res_226418];\n                            x_207226 = ((__global\n                                         float *) segred_tmp_mem_226369)[index_of_group_res_226418];\n                            \n                            float defunc_1_op_res_207227 = x_207221 + x_207224;\n                            float defunc_1_op_res_207228 = x_207222 + x_207225;\n                            float defunc_1_op_res_207229 = x_207223 + x_207226;\n                            \n                            x_207221 = defunc_1_op_res_207227;\n                            x_207222 = defunc_1_op_res_207228;\n                            x_207223 = defunc_1_op_res_207229;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                    x_207221;\n                ((__local\n                  float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                    x_207222;\n                ((__local\n                  float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                    x_207223;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    in",
                   "t32_t offset_226419;\n                    int32_t skip_waves_226420 = 1;\n                    float x_226401;\n                    float x_226402;\n                    float x_226403;\n                    float x_226404;\n                    float x_226405;\n                    float x_226406;\n                    \n                    offset_226419 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226374,\n                                  sext_i64_i32(segred_group_sizze_207210))) {\n                            x_226401 = ((__local\n                                         float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n                                                                      offset_226419)];\n                            x_226402 = ((__local\n                                         float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                                      offset_226419)];\n                            x_226403 = ((__local\n                                         float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                                      offset_226419)];\n                        }\n                    }\n                    offset_226419 = 1;\n                    while (slt32(offset_226419, wave_sizze_226376)) {\n                        if (slt32(local_tid_226374 + offset_226419,\n                                  sext_i64_i32(segred_group_sizze_207210)) &&\n                            ((local_tid_226374 - squot32(local_tid_226374,\n                                                         wave_sizze_226376) *\n                              wave_sizze_226376) & (2 * offset_226419 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226404 = ((volatile __local\n      ",
                   "                                       float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                                x_226405 = ((volatile __local\n                                             float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                                x_226406 = ((volatile __local\n                                             float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226407 = x_226401 +\n                                      x_226404;\n                                float defunc_1_op_res_226408 = x_226402 +\n                                      x_226405;\n                                float defunc_1_op_res_226409 = x_226403 +\n                                      x_226406;\n                                \n                                x_226401 = defunc_1_op_res_226407;\n                                x_226402 = defunc_1_op_res_226408;\n                                x_226403 = defunc_1_op_res_226409;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                                    x_226401;\n                                ((volatile __local\n                                  float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                                    x_226402;\n                                ((volatile __local\n                  ",
                   "                float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                                    x_226403;\n                            }\n                        }\n                        offset_226419 *= 2;\n                    }\n                    while (slt32(skip_waves_226420,\n                                 squot32(sext_i64_i32(segred_group_sizze_207210) +\n                                         wave_sizze_226376 - 1,\n                                         wave_sizze_226376))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226419 = skip_waves_226420 * wave_sizze_226376;\n                        if (slt32(local_tid_226374 + offset_226419,\n                                  sext_i64_i32(segred_group_sizze_207210)) &&\n                            ((local_tid_226374 - squot32(local_tid_226374,\n                                                         wave_sizze_226376) *\n                              wave_sizze_226376) == 0 &&\n                             (squot32(local_tid_226374, wave_sizze_226376) &\n                              (2 * skip_waves_226420 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226404 = ((__local\n                                             float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                                x_226405 = ((__local\n                                             float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                                x_226406 = ((__local\n                                             float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374 +\n                                                                          offset_226419)];\n                          ",
                   "  }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226407 = x_226401 +\n                                      x_226404;\n                                float defunc_1_op_res_226408 = x_226402 +\n                                      x_226405;\n                                float defunc_1_op_res_226409 = x_226403 +\n                                      x_226406;\n                                \n                                x_226401 = defunc_1_op_res_226407;\n                                x_226402 = defunc_1_op_res_226408;\n                                x_226403 = defunc_1_op_res_226409;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226378)[sext_i32_i64(local_tid_226374)] =\n                                    x_226401;\n                                ((__local\n                                  float *) red_arr_mem_226380)[sext_i32_i64(local_tid_226374)] =\n                                    x_226402;\n                                ((__local\n                                  float *) red_arr_mem_226382)[sext_i32_i64(local_tid_226374)] =\n                                    x_226403;\n                            }\n                        }\n                        skip_waves_226420 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226374 == 0) {\n                            ((__global float *) mem_223040)[gtid_207216 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207217 *\n                                                            s_n_m_196745 ",
                   "+\n                                                            gtid_207218] =\n                                x_226401;\n                            ((__global float *) mem_223045)[gtid_207216 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207217 *\n                                                            s_n_m_196745 +\n                                                            gtid_207218] =\n                                x_226402;\n                            ((__global float *) mem_223050)[gtid_207216 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207217 *\n                                                            s_n_m_196745 +\n                                                            gtid_207218] =\n                                x_226403;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_207210\n}\n__kernel void mainzisegred_large_207314(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226490_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226488_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226486_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                  ",
                   "      int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_207306,\n                                        int64_t groups_per_segment_226470,\n                                        int64_t elements_per_thread_226471,\n                                        int64_t virt_num_groups_226472,\n                                        int64_t threads_per_segment_226474,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223056,\n                                        __global unsigned char *mem_223061,\n                                        __global unsigned char *mem_223066,\n                                        __global unsigned char *mem_223071,\n                                        __global unsigned char *mem_223077,\n                                        __global unsigned char *mem_223082,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226475,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226477,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226479)\n{\n    #define segred_group_sizze_207305 (mainzisegred_group_sizze_206043)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_",
                   "mem_226490_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226490_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226488_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226488_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226486_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226486_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226481;\n    int32_t local_tid_226482;\n    int64_t group_sizze_226485;\n    int32_t wave_sizze_226484;\n    int32_t group_tid_226483;\n    \n    global_tid_226481 = get_global_id(0);\n    local_tid_226482 = get_local_id(0);\n    group_sizze_226485 = get_local_size(0);\n    wave_sizze_226484 = LOCKSTEP_WIDTH;\n    group_tid_226483 = get_group_id(0);\n    \n    int32_t phys_tid_207314 = global_tid_226481;\n    __local unsigned char *red_arr_mem_226486;\n    \n    red_arr_mem_226486 = (__local unsigned char *) red_arr_mem_226486_backing_0;\n    \n    __local unsigned char *red_arr_mem_226488;\n    \n    red_arr_mem_226488 = (__local unsigned char *) red_arr_mem_226488_backing_1;\n    \n    __local unsigned char *sync_arr_mem_226490;\n    \n    sync_arr_mem_226490 = (__local\n                           unsigned char *) sync_arr_mem_226490_backing_2;\n    \n    int32_t phys_group_id_226492;\n    \n    phys_group_id_226492 = get_group_id(0);\n    for (int32_t i_226493 = 0; i_226493 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226472) - phys_group_id_226492,\n                   sext_i64_i32(num_groups_207306)); i_226493++) {\n        int32_t virt_group_id_226494 = phys_group_id_226492 + i_226493 *\n                sext_i64_i32(num_groups_207306);\n        int32_t flat_segment_id_226495 = squot32(virt_group_id_226494,\n        ",
                   "                                         sext_i64_i32(groups_per_segment_226470));\n        int64_t global_tid_226496 = srem64(sext_i32_i64(virt_group_id_226494) *\n                                           segred_group_sizze_207305 +\n                                           sext_i32_i64(local_tid_226482),\n                                           segred_group_sizze_207305 *\n                                           groups_per_segment_226470);\n        int64_t slice_226497 = s_n_m_196745;\n        int64_t slice_226498 = n_p_196694 * slice_226497;\n        int64_t slice_226499 = m_196691 * slice_226498;\n        int64_t gtid_207310 = squot64(sext_i32_i64(flat_segment_id_226495),\n                                      slice_226498);\n        int64_t remnant_226500 = sext_i32_i64(flat_segment_id_226495) -\n                gtid_207310 * slice_226498;\n        int64_t gtid_207311 = squot64(remnant_226500, slice_226497);\n        int64_t remnant_226501 = remnant_226500 - gtid_207311 * slice_226497;\n        int64_t gtid_207312 = remnant_226501;\n        int64_t remnant_226502 = remnant_226501 - gtid_207312;\n        int64_t gtid_207313;\n        float x_acc_226503;\n        float x_acc_226504;\n        int64_t chunk_sizze_226505 = smin64(elements_per_thread_226471,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226496,\n                                                      threads_per_segment_226474));\n        float x_207315;\n        float x_207316;\n        float x_207317;\n        float x_207318;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226503 = 0.0F;\n            x_acc_226504 = 0.0F;\n        }\n        for (int64_t i_226512 = 0; i_226512 < chunk_sizze_226505; i_226512++) {\n            gtid_207313 = global_tid_226496 + threads_per_segment_226474 *\n                i_226512;\n            // apply map function\n            {\n                int64_t x_207334;\n       ",
                   "         \n                x_207334 = ((__global int64_t *) ext_mem_222321)[gtid_207310 *\n                                                                 n_p_196694 +\n                                                                 gtid_207311];\n                \n                int64_t x_207341;\n                \n                x_207341 = ((__global int64_t *) ext_mem_222420)[gtid_207310 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_207311 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_207312];\n                \n                float x_207342;\n                \n                x_207342 = ((__global float *) ext_mem_222419)[gtid_207310 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_207311 *\n                                                               s_n_m_196745 +\n                                                               gtid_207312];\n                \n                float a11_207343;\n                \n                a11_207343 = ((__global float *) mem_223056)[gtid_207310 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                                             s_n_m_196745 +\n                                                             gtid_207312];\n                \n                float b11_207344;\n                \n                b11_207344 = ((__global float *) mem_223061)[gtid_207310 *\n           ",
                   "                                                  (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                                             s_n_m_196745 +\n                                                             gtid_207312];\n                \n                float c11_207345;\n                \n                c11_207345 = ((__global float *) mem_223066)[gtid_207310 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                                             s_n_m_196745 +\n                                                             gtid_207312];\n                \n                int64_t defunc_0_m_fun_res_207346;\n                \n                defunc_0_m_fun_res_207346 = ((__global\n                                              int64_t *) mem_223071)[gtid_207310 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_207312];\n                \n                bool cond_207348 = sle64(x_207334, gtid_207313);\n                int64_t defunc_0_f_res_207349;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207349 = (int64_t) 0;\n                } else {\n                    int64_t i_207350 = add64(gtid_207313, x_207341);\n                    int64_t defunc_0_add_arg_207351;\n                    \n                    defunc_0_add_arg_207351 = ((__global\n     ",
                   "                                           int64_t *) ext_mem_222322)[gtid_207310 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_207311 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_207350];\n                    \n                    int64_t defunc_1_add_res_207352 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_207351);\n                    \n                    defunc_0_f_res_207349 = defunc_1_add_res_207352;\n                }\n                \n                float defunc_0_f_res_207353;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207353 = 0.0F;\n                } else {\n                    int64_t i_207354 = add64(gtid_207313, x_207341);\n                    float defunc_0_add_arg_207355;\n                    \n                    defunc_0_add_arg_207355 = ((__global\n                                                float *) mem_222588)[gtid_207310 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207354];\n                    defunc_0_f_res_207353 = defunc_0_add_arg_207355;\n                }\n                \n                int64_t binop_p_207356 = sub64(defunc_0_f_res_207349,\n                                               defunc_0_m_fun_res_207346);\n           ",
                   "     float defunc_0_f_res_207357 = sitofp_i64_f32(binop_p_207356);\n                float abs_res_207358 = (float) fabs(defunc_0_f_res_207357);\n                float tmp1_207359 = abs_res_207358 / x_207342;\n                float x_207360 = tmp1_207359 * tmp1_207359;\n                float y_207361 = tmp1_207359 * x_207360;\n                float tmp2_207362 = 1.0F - y_207361;\n                float x_207363 = tmp2_207362 * tmp2_207362;\n                float tmp3_207364 = tmp2_207362 * x_207363;\n                float tmp4_207365 = defunc_0_f_res_207353 * tmp3_207364;\n                float defunc_1_f_res_207366 = defunc_0_f_res_207357 *\n                      tmp4_207365;\n                float defunc_0_f_res_207367;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207367 = 0.0F;\n                } else {\n                    int64_t i_207368 = add64(gtid_207313, x_207341);\n                    float defunc_0_add_arg_207369;\n                    \n                    defunc_0_add_arg_207369 = ((__global\n                                                float *) mem_222583)[gtid_207310 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207368];\n                    defunc_0_f_res_207367 = defunc_0_add_arg_207369;\n                }\n                \n                float x_207370 = a11_207343 * tmp4_207365;\n                float y_207371 = b11_207344 * defunc_1_f_res_207366;\n                float x_207372 = x_207370 + y_207371;\n                float defunc_9_fit_fun_res_207373 = defunc_0_f_res_207367 *\n                      x_207372;\n                float x_207374 = b11_207344 *",
                   " tmp4_207365;\n                float y_207375 = c11_207345 * defunc_1_f_res_207366;\n                float x_207376 = x_207374 + y_207375;\n                float defunc_9_slope_fun_res_207377 = defunc_0_f_res_207367 *\n                      x_207376;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_207315 = x_acc_226503;\n                    x_207316 = x_acc_226504;\n                }\n                // load new values\n                {\n                    x_207317 = defunc_9_fit_fun_res_207373;\n                    x_207318 = defunc_9_slope_fun_res_207377;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_207319 = x_207315 + x_207317;\n                    float defunc_1_op_res_207320 = x_207316 + x_207318;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226503 = defunc_1_op_res_207319;\n                        x_acc_226504 = defunc_1_op_res_207320;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_207315 = x_acc_226503;\n            x_207316 = x_acc_226504;\n            ((__local\n              float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                x_207315;\n            ((__local\n              float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                x_207316;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226513;\n        int32_t skip_waves_226514 = 1;\n        float x_226506;\n        float x_226507;\n        float x_226508;\n        float x_226509;\n        \n        offset_226513 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226482,\n                      sext_i64_i32(segred_group_sizze_207305))) {\n  ",
                   "              x_226506 = ((__local\n                             float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                          offset_226513)];\n                x_226507 = ((__local\n                             float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                          offset_226513)];\n            }\n        }\n        offset_226513 = 1;\n        while (slt32(offset_226513, wave_sizze_226484)) {\n            if (slt32(local_tid_226482 + offset_226513,\n                      sext_i64_i32(segred_group_sizze_207305)) &&\n                ((local_tid_226482 - squot32(local_tid_226482,\n                                             wave_sizze_226484) *\n                  wave_sizze_226484) & (2 * offset_226513 - 1)) == 0) {\n                // read array element\n                {\n                    x_226508 = ((volatile __local\n                                 float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                              offset_226513)];\n                    x_226509 = ((volatile __local\n                                 float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                              offset_226513)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226510 = x_226506 + x_226508;\n                    float defunc_1_op_res_226511 = x_226507 + x_226509;\n                    \n                    x_226506 = defunc_1_op_res_226510;\n                    x_226507 = defunc_1_op_res_226511;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                        x_226506;\n                    ((volatile __local\n                      float *)",
                   " red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                        x_226507;\n                }\n            }\n            offset_226513 *= 2;\n        }\n        while (slt32(skip_waves_226514,\n                     squot32(sext_i64_i32(segred_group_sizze_207305) +\n                             wave_sizze_226484 - 1, wave_sizze_226484))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226513 = skip_waves_226514 * wave_sizze_226484;\n            if (slt32(local_tid_226482 + offset_226513,\n                      sext_i64_i32(segred_group_sizze_207305)) &&\n                ((local_tid_226482 - squot32(local_tid_226482,\n                                             wave_sizze_226484) *\n                  wave_sizze_226484) == 0 && (squot32(local_tid_226482,\n                                                      wave_sizze_226484) & (2 *\n                                                                            skip_waves_226514 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226508 = ((__local\n                                 float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                              offset_226513)];\n                    x_226509 = ((__local\n                                 float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                              offset_226513)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226510 = x_226506 + x_226508;\n                    float defunc_1_op_res_226511 = x_226507 + x_226509;\n                    \n                    x_226506 = defunc_1_op_res_226510;\n                    x_226507 = defunc_1_op_res_226511;\n                }\n                // write result of operation\n                {\n                ",
                   "    ((__local\n                      float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                        x_226506;\n                    ((__local\n                      float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                        x_226507;\n                }\n            }\n            skip_waves_226514 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226482) == (int64_t) 0) {\n                x_acc_226503 = x_226506;\n                x_acc_226504 = x_226507;\n            }\n        }\n        if (groups_per_segment_226470 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226482 == 0) {\n                    ((__global float *) mem_223077)[gtid_207310 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_207311 *\n                                                    s_n_m_196745 +\n                                                    gtid_207312] = x_acc_226503;\n                    ((__global float *) mem_223082)[gtid_207310 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_207311 *\n                                                    s_n_m_196745 +\n                                                    gtid_207312] = x_acc_226504;\n                }\n            }\n        } else {\n            int32_t old_counter_226515;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226482 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226475)[sext_i32_i64(virt_group_id_226494)] =\n                        x_acc_226503;\n                    ((__global\n                      float *) s",
                   "egred_tmp_mem_226477)[sext_i32_i64(virt_group_id_226494)] =\n                        x_acc_226504;\n                    mem_fence_global();\n                    old_counter_226515 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226479)[sext_i32_i64(srem32(flat_segment_id_226495,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226490)[(int64_t) 0] =\n                        old_counter_226515 == groups_per_segment_226470 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226516;\n            \n            is_last_group_226516 = ((__local\n                                     bool *) sync_arr_mem_226490)[(int64_t) 0];\n            if (is_last_group_226516) {\n                if (local_tid_226482 == 0) {\n                    old_counter_226515 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226479)[sext_i32_i64(srem32(flat_segment_id_226495,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226470));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226517 =\n                            sdiv_up64(groups_per_segment_226470,\n                                      segred_group_sizze_207305);\n                    \n                    x_207315 = 0.0F;\n                    x_207316 = 0.0F;\n                    for (int64_t i_226518 = ",
                   "0; i_226518 <\n                         read_per_thread_226517; i_226518++) {\n                        int64_t group_res_id_226519 =\n                                sext_i32_i64(local_tid_226482) *\n                                read_per_thread_226517 + i_226518;\n                        int64_t index_of_group_res_226520 =\n                                sext_i32_i64(flat_segment_id_226495) *\n                                groups_per_segment_226470 + group_res_id_226519;\n                        \n                        if (slt64(group_res_id_226519,\n                                  groups_per_segment_226470)) {\n                            x_207317 = ((__global\n                                         float *) segred_tmp_mem_226475)[index_of_group_res_226520];\n                            x_207318 = ((__global\n                                         float *) segred_tmp_mem_226477)[index_of_group_res_226520];\n                            \n                            float defunc_1_op_res_207319 = x_207315 + x_207317;\n                            float defunc_1_op_res_207320 = x_207316 + x_207318;\n                            \n                            x_207315 = defunc_1_op_res_207319;\n                            x_207316 = defunc_1_op_res_207320;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                    x_207315;\n                ((__local\n                  float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                    x_207316;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226521;\n                    int32_t skip_waves_226522 = 1;\n                    float x_226506;\n                    float x_226507;\n                    float x_226508;\n                    float x_226509;\n                    \n                    offs",
                   "et_226521 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226482,\n                                  sext_i64_i32(segred_group_sizze_207305))) {\n                            x_226506 = ((__local\n                                         float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                                      offset_226521)];\n                            x_226507 = ((__local\n                                         float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                                      offset_226521)];\n                        }\n                    }\n                    offset_226521 = 1;\n                    while (slt32(offset_226521, wave_sizze_226484)) {\n                        if (slt32(local_tid_226482 + offset_226521,\n                                  sext_i64_i32(segred_group_sizze_207305)) &&\n                            ((local_tid_226482 - squot32(local_tid_226482,\n                                                         wave_sizze_226484) *\n                              wave_sizze_226484) & (2 * offset_226521 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226508 = ((volatile __local\n                                             float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                                          offset_226521)];\n                                x_226509 = ((volatile __local\n                                             float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                                          offset_226521)];\n                            }\n                            // apply reduction operation\n                            {\n    ",
                   "                            float defunc_1_op_res_226510 = x_226506 +\n                                      x_226508;\n                                float defunc_1_op_res_226511 = x_226507 +\n                                      x_226509;\n                                \n                                x_226506 = defunc_1_op_res_226510;\n                                x_226507 = defunc_1_op_res_226511;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                                    x_226506;\n                                ((volatile __local\n                                  float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                                    x_226507;\n                            }\n                        }\n                        offset_226521 *= 2;\n                    }\n                    while (slt32(skip_waves_226522,\n                                 squot32(sext_i64_i32(segred_group_sizze_207305) +\n                                         wave_sizze_226484 - 1,\n                                         wave_sizze_226484))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226521 = skip_waves_226522 * wave_sizze_226484;\n                        if (slt32(local_tid_226482 + offset_226521,\n                                  sext_i64_i32(segred_group_sizze_207305)) &&\n                            ((local_tid_226482 - squot32(local_tid_226482,\n                                                         wave_sizze_226484) *\n                              wave_sizze_226484) == 0 &&\n                             (squot32(local_tid_226482, wave_sizze_226484) &\n                              (2 * skip_waves_226522 - 1)) == 0)) {\n                            // read array element\n                   ",
                   "         {\n                                x_226508 = ((__local\n                                             float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482 +\n                                                                          offset_226521)];\n                                x_226509 = ((__local\n                                             float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482 +\n                                                                          offset_226521)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226510 = x_226506 +\n                                      x_226508;\n                                float defunc_1_op_res_226511 = x_226507 +\n                                      x_226509;\n                                \n                                x_226506 = defunc_1_op_res_226510;\n                                x_226507 = defunc_1_op_res_226511;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226486)[sext_i32_i64(local_tid_226482)] =\n                                    x_226506;\n                                ((__local\n                                  float *) red_arr_mem_226488)[sext_i32_i64(local_tid_226482)] =\n                                    x_226507;\n                            }\n                        }\n                        skip_waves_226522 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226482 == 0) {\n                            ((__global float *) mem_223077)[gtid_207310 *\n                                                            (s_n_m_196745 *\n                                                           ",
                   "  n_p_196694) +\n                                                            gtid_207311 *\n                                                            s_n_m_196745 +\n                                                            gtid_207312] =\n                                x_226506;\n                            ((__global float *) mem_223082)[gtid_207310 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_207311 *\n                                                            s_n_m_196745 +\n                                                            gtid_207312] =\n                                x_226507;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_207305\n}\n__kernel void mainzisegred_large_209867(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226801_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226799_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226797_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226795_backing_aligned_3,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226793_backing_aligned_4,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226791_backing_aligned_5,\n                                        int64_t m_196691, int64_t n_",
                   "p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_209856,\n                                        int64_t groups_per_segment_226769,\n                                        int64_t elements_per_thread_226770,\n                                        int64_t virt_num_groups_226771,\n                                        int64_t threads_per_segment_226773,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223369,\n                                        __global unsigned char *mem_223379,\n                                        __global unsigned char *mem_223384,\n                                        __global unsigned char *mem_223389,\n                                        __global unsigned char *mem_223394,\n                                        __global unsigned char *mem_223399,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226774,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226776,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226778,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226780,\n                                        __global\n                      ",
                   "                  unsigned char *segred_tmp_mem_226782,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226784)\n{\n    #define segred_group_sizze_209855 (mainzisegred_group_sizze_208595)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_226801_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226801_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226799_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226799_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226797_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226797_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226795_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226795_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_226793_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226793_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_226791_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226791_backing_aligned_5;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226786;\n    int32_t local_tid_226787;\n    int64_t group_sizze_226790;\n    int32_t wave_sizze_226789;\n    int32_t group_tid_226788;\n    \n    global_tid_226786 = get_global_id(0);\n    local_tid_226787 = get_local_id(0);\n    group_sizze_226790 = g",
                   "et_local_size(0);\n    wave_sizze_226789 = LOCKSTEP_WIDTH;\n    group_tid_226788 = get_group_id(0);\n    \n    int32_t phys_tid_209867 = global_tid_226786;\n    __local unsigned char *red_arr_mem_226791;\n    \n    red_arr_mem_226791 = (__local unsigned char *) red_arr_mem_226791_backing_0;\n    \n    __local unsigned char *red_arr_mem_226793;\n    \n    red_arr_mem_226793 = (__local unsigned char *) red_arr_mem_226793_backing_1;\n    \n    __local unsigned char *red_arr_mem_226795;\n    \n    red_arr_mem_226795 = (__local unsigned char *) red_arr_mem_226795_backing_2;\n    \n    __local unsigned char *red_arr_mem_226797;\n    \n    red_arr_mem_226797 = (__local unsigned char *) red_arr_mem_226797_backing_3;\n    \n    __local unsigned char *red_arr_mem_226799;\n    \n    red_arr_mem_226799 = (__local unsigned char *) red_arr_mem_226799_backing_4;\n    \n    __local unsigned char *sync_arr_mem_226801;\n    \n    sync_arr_mem_226801 = (__local\n                           unsigned char *) sync_arr_mem_226801_backing_5;\n    \n    int32_t phys_group_id_226803;\n    \n    phys_group_id_226803 = get_group_id(0);\n    for (int32_t i_226804 = 0; i_226804 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226771) - phys_group_id_226803,\n                   sext_i64_i32(num_groups_209856)); i_226804++) {\n        int32_t virt_group_id_226805 = phys_group_id_226803 + i_226804 *\n                sext_i64_i32(num_groups_209856);\n        int32_t flat_segment_id_226806 = squot32(virt_group_id_226805,\n                                                 sext_i64_i32(groups_per_segment_226769));\n        int64_t global_tid_226807 = srem64(sext_i32_i64(virt_group_id_226805) *\n                                           segred_group_sizze_209855 +\n                                           sext_i32_i64(local_tid_226787),\n                                           segred_group_sizze_209855 *\n                                           groups_per_segment_226769);\n        int64_t slice_226808 = s_n_m_196745;\n        int64_t slice",
                   "_226809 = n_p_196694 * slice_226808;\n        int64_t slice_226810 = m_196691 * slice_226809;\n        int64_t gtid_209863 = squot64(sext_i32_i64(flat_segment_id_226806),\n                                      slice_226809);\n        int64_t remnant_226811 = sext_i32_i64(flat_segment_id_226806) -\n                gtid_209863 * slice_226809;\n        int64_t gtid_209864 = squot64(remnant_226811, slice_226808);\n        int64_t remnant_226812 = remnant_226811 - gtid_209864 * slice_226808;\n        int64_t gtid_209865 = remnant_226812;\n        int64_t remnant_226813 = remnant_226812 - gtid_209865;\n        int64_t gtid_209866;\n        float x_acc_226814;\n        float x_acc_226815;\n        float x_acc_226816;\n        float x_acc_226817;\n        float x_acc_226818;\n        int64_t chunk_sizze_226819 = smin64(elements_per_thread_226770,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226807,\n                                                      threads_per_segment_226773));\n        float x_209868;\n        float x_209869;\n        float x_209870;\n        float x_209871;\n        float x_209872;\n        float x_209873;\n        float x_209874;\n        float x_209875;\n        float x_209876;\n        float x_209877;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226814 = 0.0F;\n            x_acc_226815 = 0.0F;\n            x_acc_226816 = 0.0F;\n            x_acc_226817 = 0.0F;\n            x_acc_226818 = 0.0F;\n        }\n        for (int64_t i_226835 = 0; i_226835 < chunk_sizze_226819; i_226835++) {\n            gtid_209866 = global_tid_226807 + threads_per_segment_226773 *\n                i_226835;\n            // apply map function\n            {\n                int64_t x_209891;\n                \n                x_209891 = ((__global int64_t *) ext_mem_222321)[gtid_209863 *\n                                                                 n_p_196694 +\n                       ",
                   "                                          gtid_209864];\n                \n                int64_t x_209895;\n                \n                x_209895 = ((__global int64_t *) ext_mem_222420)[gtid_209863 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_209864 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_209865];\n                \n                float x_209896;\n                \n                x_209896 = ((__global float *) ext_mem_222419)[gtid_209863 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_209864 *\n                                                               s_n_m_196745 +\n                                                               gtid_209865];\n                \n                int64_t defunc_0_m_fun_res_209897;\n                \n                defunc_0_m_fun_res_209897 = ((__global\n                                              int64_t *) mem_223369)[gtid_209863 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_209864 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_209865];\n                \n                bool cond_209899 = sle64(x_209891, gtid_209866);\n                int64_t defunc_0_f_res_209900;\n                \n                if (cond_209899) {\n                    defunc_0_f_res_209900 =",
                   " (int64_t) 0;\n                } else {\n                    int64_t i_209901 = add64(gtid_209866, x_209895);\n                    int64_t defunc_0_add_arg_209902;\n                    \n                    defunc_0_add_arg_209902 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_209863 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_209864 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_209901];\n                    \n                    int64_t defunc_1_add_res_209903 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_209902);\n                    \n                    defunc_0_f_res_209900 = defunc_1_add_res_209903;\n                }\n                \n                float defunc_0_f_res_209904;\n                \n                if (cond_209899) {\n                    defunc_0_f_res_209904 = 0.0F;\n                } else {\n                    int64_t i_209905 = add64(gtid_209866, x_209895);\n                    float defunc_0_add_arg_209906;\n                    \n                    defunc_0_add_arg_209906 = ((__global\n                                                float *) mem_222588)[gtid_209863 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209864 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_209905];\n                ",
                   "    defunc_0_f_res_209904 = defunc_0_add_arg_209906;\n                }\n                \n                int64_t binop_p_209907 = sub64(defunc_0_f_res_209900,\n                                               defunc_0_m_fun_res_209897);\n                float defunc_0_f_res_209908 = sitofp_i64_f32(binop_p_209907);\n                float abs_res_209909 = (float) fabs(defunc_0_f_res_209908);\n                float tmp1_209910 = abs_res_209909 / x_209896;\n                float x_209911 = tmp1_209910 * tmp1_209910;\n                float y_209912 = tmp1_209910 * x_209911;\n                float tmp2_209913 = 1.0F - y_209912;\n                float x_209914 = tmp2_209913 * tmp2_209913;\n                float tmp3_209915 = tmp2_209913 * x_209914;\n                float w_j_209916 = defunc_0_f_res_209904 * tmp3_209915;\n                float xw_j_209917 = defunc_0_f_res_209908 * w_j_209916;\n                float x2w_j_209918 = defunc_0_f_res_209908 * xw_j_209917;\n                float x3w_j_209919 = defunc_0_f_res_209908 * x2w_j_209918;\n                float x4w_j_209920 = defunc_0_f_res_209908 * x3w_j_209919;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_209868 = x_acc_226814;\n                    x_209869 = x_acc_226815;\n                    x_209870 = x_acc_226816;\n                    x_209871 = x_acc_226817;\n                    x_209872 = x_acc_226818;\n                }\n                // load new values\n                {\n                    x_209873 = w_j_209916;\n                    x_209874 = xw_j_209917;\n                    x_209875 = x2w_j_209918;\n                    x_209876 = x3w_j_209919;\n                    x_209877 = x4w_j_209920;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_209878 = x_209868 + x_209873;\n                    float defunc_1_op_res_209879 = x_209869 + x_209874;\n                   ",
                   " float defunc_1_op_res_209880 = x_209870 + x_209875;\n                    float defunc_1_op_res_209881 = x_209871 + x_209876;\n                    float defunc_1_op_res_209882 = x_209872 + x_209877;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226814 = defunc_1_op_res_209878;\n                        x_acc_226815 = defunc_1_op_res_209879;\n                        x_acc_226816 = defunc_1_op_res_209880;\n                        x_acc_226817 = defunc_1_op_res_209881;\n                        x_acc_226818 = defunc_1_op_res_209882;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_209868 = x_acc_226814;\n            x_209869 = x_acc_226815;\n            x_209870 = x_acc_226816;\n            x_209871 = x_acc_226817;\n            x_209872 = x_acc_226818;\n            ((__local\n              float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                x_209868;\n            ((__local\n              float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n                x_209869;\n            ((__local\n              float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n                x_209870;\n            ((__local\n              float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                x_209871;\n            ((__local\n              float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                x_209872;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226836;\n        int32_t skip_waves_226837 = 1;\n        float x_226820;\n        float x_226821;\n        float x_226822;\n        float x_226823;\n        float x_226824;\n        float x_226825;\n        float x_226826;\n        float x_226827;\n        float x_226828;\n        float x_226829;\n        \n        offset_226836 = 0;\n        // participating threads read initial",
                   " accumulator\n        {\n            if (slt32(local_tid_226787,\n                      sext_i64_i32(segred_group_sizze_209855))) {\n                x_226820 = ((__local\n                             float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                          offset_226836)];\n                x_226821 = ((__local\n                             float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n                                                          offset_226836)];\n                x_226822 = ((__local\n                             float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                          offset_226836)];\n                x_226823 = ((__local\n                             float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                          offset_226836)];\n                x_226824 = ((__local\n                             float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                          offset_226836)];\n            }\n        }\n        offset_226836 = 1;\n        while (slt32(offset_226836, wave_sizze_226789)) {\n            if (slt32(local_tid_226787 + offset_226836,\n                      sext_i64_i32(segred_group_sizze_209855)) &&\n                ((local_tid_226787 - squot32(local_tid_226787,\n                                             wave_sizze_226789) *\n                  wave_sizze_226789) & (2 * offset_226836 - 1)) == 0) {\n                // read array element\n                {\n                    x_226825 = ((volatile __local\n                                 float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226826 = ((volatile __local\n                                 float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n      ",
                   "                                                        offset_226836)];\n                    x_226827 = ((volatile __local\n                                 float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226828 = ((volatile __local\n                                 float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226829 = ((volatile __local\n                                 float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226830 = x_226820 + x_226825;\n                    float defunc_1_op_res_226831 = x_226821 + x_226826;\n                    float defunc_1_op_res_226832 = x_226822 + x_226827;\n                    float defunc_1_op_res_226833 = x_226823 + x_226828;\n                    float defunc_1_op_res_226834 = x_226824 + x_226829;\n                    \n                    x_226820 = defunc_1_op_res_226830;\n                    x_226821 = defunc_1_op_res_226831;\n                    x_226822 = defunc_1_op_res_226832;\n                    x_226823 = defunc_1_op_res_226833;\n                    x_226824 = defunc_1_op_res_226834;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                        x_226820;\n                    ((volatile __local\n                      float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n                        x_226821;\n                    ((volatile __local\n                      float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n",
                   "                        x_226822;\n                    ((volatile __local\n                      float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                        x_226823;\n                    ((volatile __local\n                      float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                        x_226824;\n                }\n            }\n            offset_226836 *= 2;\n        }\n        while (slt32(skip_waves_226837,\n                     squot32(sext_i64_i32(segred_group_sizze_209855) +\n                             wave_sizze_226789 - 1, wave_sizze_226789))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226836 = skip_waves_226837 * wave_sizze_226789;\n            if (slt32(local_tid_226787 + offset_226836,\n                      sext_i64_i32(segred_group_sizze_209855)) &&\n                ((local_tid_226787 - squot32(local_tid_226787,\n                                             wave_sizze_226789) *\n                  wave_sizze_226789) == 0 && (squot32(local_tid_226787,\n                                                      wave_sizze_226789) & (2 *\n                                                                            skip_waves_226837 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226825 = ((__local\n                                 float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226826 = ((__local\n                                 float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226827 = ((__local\n                                 float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                         ",
                   "     offset_226836)];\n                    x_226828 = ((__local\n                                 float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                    x_226829 = ((__local\n                                 float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                              offset_226836)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226830 = x_226820 + x_226825;\n                    float defunc_1_op_res_226831 = x_226821 + x_226826;\n                    float defunc_1_op_res_226832 = x_226822 + x_226827;\n                    float defunc_1_op_res_226833 = x_226823 + x_226828;\n                    float defunc_1_op_res_226834 = x_226824 + x_226829;\n                    \n                    x_226820 = defunc_1_op_res_226830;\n                    x_226821 = defunc_1_op_res_226831;\n                    x_226822 = defunc_1_op_res_226832;\n                    x_226823 = defunc_1_op_res_226833;\n                    x_226824 = defunc_1_op_res_226834;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                        x_226820;\n                    ((__local\n                      float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n                        x_226821;\n                    ((__local\n                      float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n                        x_226822;\n                    ((__local\n                      float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                        x_226823;\n                    ((__local\n                      float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                     ",
                   "   x_226824;\n                }\n            }\n            skip_waves_226837 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226787) == (int64_t) 0) {\n                x_acc_226814 = x_226820;\n                x_acc_226815 = x_226821;\n                x_acc_226816 = x_226822;\n                x_acc_226817 = x_226823;\n                x_acc_226818 = x_226824;\n            }\n        }\n        if (groups_per_segment_226769 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226787 == 0) {\n                    ((__global float *) mem_223379)[gtid_209863 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209864 *\n                                                    s_n_m_196745 +\n                                                    gtid_209865] = x_acc_226814;\n                    ((__global float *) mem_223384)[gtid_209863 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209864 *\n                                                    s_n_m_196745 +\n                                                    gtid_209865] = x_acc_226815;\n                    ((__global float *) mem_223389)[gtid_209863 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209864 *\n                                                    s_n_m_196745 +\n                                                    gtid_209865] = x_acc_226816;\n                    ((__global float *) mem_223394)[gtid_209863 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209864 *\n                          ",
                   "                          s_n_m_196745 +\n                                                    gtid_209865] = x_acc_226817;\n                    ((__global float *) mem_223399)[gtid_209863 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209864 *\n                                                    s_n_m_196745 +\n                                                    gtid_209865] = x_acc_226818;\n                }\n            }\n        } else {\n            int32_t old_counter_226838;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_226787 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226774)[sext_i32_i64(virt_group_id_226805)] =\n                        x_acc_226814;\n                    ((__global\n                      float *) segred_tmp_mem_226776)[sext_i32_i64(virt_group_id_226805)] =\n                        x_acc_226815;\n                    ((__global\n                      float *) segred_tmp_mem_226778)[sext_i32_i64(virt_group_id_226805)] =\n                        x_acc_226816;\n                    ((__global\n                      float *) segred_tmp_mem_226780)[sext_i32_i64(virt_group_id_226805)] =\n                        x_acc_226817;\n                    ((__global\n                      float *) segred_tmp_mem_226782)[sext_i32_i64(virt_group_id_226805)] =\n                        x_acc_226818;\n                    mem_fence_global();\n                    old_counter_226838 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226784)[sext_i32_i64(srem32(flat_segment_id_226806,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool",
                   " *) sync_arr_mem_226801)[(int64_t) 0] =\n                        old_counter_226838 == groups_per_segment_226769 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226839;\n            \n            is_last_group_226839 = ((__local\n                                     bool *) sync_arr_mem_226801)[(int64_t) 0];\n            if (is_last_group_226839) {\n                if (local_tid_226787 == 0) {\n                    old_counter_226838 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226784)[sext_i32_i64(srem32(flat_segment_id_226806,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226769));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226840 =\n                            sdiv_up64(groups_per_segment_226769,\n                                      segred_group_sizze_209855);\n                    \n                    x_209868 = 0.0F;\n                    x_209869 = 0.0F;\n                    x_209870 = 0.0F;\n                    x_209871 = 0.0F;\n                    x_209872 = 0.0F;\n                    for (int64_t i_226841 = 0; i_226841 <\n                         read_per_thread_226840; i_226841++) {\n                        int64_t group_res_id_226842 =\n                                sext_i32_i64(local_tid_226787) *\n                                read_per_thread_226840 + i_226841;\n                        int64_t index_of_group_res_226843 =\n                                sext_i32_i64(flat_segment_id_226806) *\n                                groups_per_segment_226769 + group_res",
                   "_id_226842;\n                        \n                        if (slt64(group_res_id_226842,\n                                  groups_per_segment_226769)) {\n                            x_209873 = ((__global\n                                         float *) segred_tmp_mem_226774)[index_of_group_res_226843];\n                            x_209874 = ((__global\n                                         float *) segred_tmp_mem_226776)[index_of_group_res_226843];\n                            x_209875 = ((__global\n                                         float *) segred_tmp_mem_226778)[index_of_group_res_226843];\n                            x_209876 = ((__global\n                                         float *) segred_tmp_mem_226780)[index_of_group_res_226843];\n                            x_209877 = ((__global\n                                         float *) segred_tmp_mem_226782)[index_of_group_res_226843];\n                            \n                            float defunc_1_op_res_209878 = x_209868 + x_209873;\n                            float defunc_1_op_res_209879 = x_209869 + x_209874;\n                            float defunc_1_op_res_209880 = x_209870 + x_209875;\n                            float defunc_1_op_res_209881 = x_209871 + x_209876;\n                            float defunc_1_op_res_209882 = x_209872 + x_209877;\n                            \n                            x_209868 = defunc_1_op_res_209878;\n                            x_209869 = defunc_1_op_res_209879;\n                            x_209870 = defunc_1_op_res_209880;\n                            x_209871 = defunc_1_op_res_209881;\n                            x_209872 = defunc_1_op_res_209882;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                    x_209868;\n                ((__local\n                  float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n      ",
                   "              x_209869;\n                ((__local\n                  float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n                    x_209870;\n                ((__local\n                  float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                    x_209871;\n                ((__local\n                  float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                    x_209872;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_226844;\n                    int32_t skip_waves_226845 = 1;\n                    float x_226820;\n                    float x_226821;\n                    float x_226822;\n                    float x_226823;\n                    float x_226824;\n                    float x_226825;\n                    float x_226826;\n                    float x_226827;\n                    float x_226828;\n                    float x_226829;\n                    \n                    offset_226844 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226787,\n                                  sext_i64_i32(segred_group_sizze_209855))) {\n                            x_226820 = ((__local\n                                         float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                                      offset_226844)];\n                            x_226821 = ((__local\n                                         float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n                                                                      offset_226844)];\n                            x_226822 = ((__local\n                                         float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                                      offset_226844)];\n   ",
                   "                         x_226823 = ((__local\n                                         float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                                      offset_226844)];\n                            x_226824 = ((__local\n                                         float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                                      offset_226844)];\n                        }\n                    }\n                    offset_226844 = 1;\n                    while (slt32(offset_226844, wave_sizze_226789)) {\n                        if (slt32(local_tid_226787 + offset_226844,\n                                  sext_i64_i32(segred_group_sizze_209855)) &&\n                            ((local_tid_226787 - squot32(local_tid_226787,\n                                                         wave_sizze_226789) *\n                              wave_sizze_226789) & (2 * offset_226844 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226825 = ((volatile __local\n                                             float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226826 = ((volatile __local\n                                             float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226827 = ((volatile __local\n                                             float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226828 = ((volatile __local\n                                        ",
                   "     float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226829 = ((volatile __local\n                                             float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226830 = x_226820 +\n                                      x_226825;\n                                float defunc_1_op_res_226831 = x_226821 +\n                                      x_226826;\n                                float defunc_1_op_res_226832 = x_226822 +\n                                      x_226827;\n                                float defunc_1_op_res_226833 = x_226823 +\n                                      x_226828;\n                                float defunc_1_op_res_226834 = x_226824 +\n                                      x_226829;\n                                \n                                x_226820 = defunc_1_op_res_226830;\n                                x_226821 = defunc_1_op_res_226831;\n                                x_226822 = defunc_1_op_res_226832;\n                                x_226823 = defunc_1_op_res_226833;\n                                x_226824 = defunc_1_op_res_226834;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                                    x_226820;\n                                ((volatile __local\n                                  float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n                              ",
                   "      x_226821;\n                                ((volatile __local\n                                  float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n                                    x_226822;\n                                ((volatile __local\n                                  float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                                    x_226823;\n                                ((volatile __local\n                                  float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                                    x_226824;\n                            }\n                        }\n                        offset_226844 *= 2;\n                    }\n                    while (slt32(skip_waves_226845,\n                                 squot32(sext_i64_i32(segred_group_sizze_209855) +\n                                         wave_sizze_226789 - 1,\n                                         wave_sizze_226789))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226844 = skip_waves_226845 * wave_sizze_226789;\n                        if (slt32(local_tid_226787 + offset_226844,\n                                  sext_i64_i32(segred_group_sizze_209855)) &&\n                            ((local_tid_226787 - squot32(local_tid_226787,\n                                                         wave_sizze_226789) *\n                              wave_sizze_226789) == 0 &&\n                             (squot32(local_tid_226787, wave_sizze_226789) &\n                              (2 * skip_waves_226845 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226825 = ((__local\n                                             float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226826 = ((__local\n",
                   "                                             float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226827 = ((__local\n                                             float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226828 = ((__local\n                                             float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                                x_226829 = ((__local\n                                             float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787 +\n                                                                          offset_226844)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226830 = x_226820 +\n                                      x_226825;\n                                float defunc_1_op_res_226831 = x_226821 +\n                                      x_226826;\n                                float defunc_1_op_res_226832 = x_226822 +\n                                      x_226827;\n                                float defunc_1_op_res_226833 = x_226823 +\n                                      x_226828;\n                                float defunc_1_op_res_226834 = x_226824 +\n                                      x_226829;\n                                \n                                x_226820 = defunc_1_op_res_226830;\n                                x_226821 = defunc_1_op_res_226831;\n                                x_226822 = defunc_1_op_res_226832;\n                                x_226823 = defunc_1_op_res_226833;\n                         ",
                   "       x_226824 = defunc_1_op_res_226834;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226791)[sext_i32_i64(local_tid_226787)] =\n                                    x_226820;\n                                ((__local\n                                  float *) red_arr_mem_226793)[sext_i32_i64(local_tid_226787)] =\n                                    x_226821;\n                                ((__local\n                                  float *) red_arr_mem_226795)[sext_i32_i64(local_tid_226787)] =\n                                    x_226822;\n                                ((__local\n                                  float *) red_arr_mem_226797)[sext_i32_i64(local_tid_226787)] =\n                                    x_226823;\n                                ((__local\n                                  float *) red_arr_mem_226799)[sext_i32_i64(local_tid_226787)] =\n                                    x_226824;\n                            }\n                        }\n                        skip_waves_226845 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_226787 == 0) {\n                            ((__global float *) mem_223379)[gtid_209863 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209864 *\n                                                            s_n_m_196745 +\n                                                            gtid_209865] =\n                                x_226820;\n                            ((__global float *) mem_223384)[gtid_209863 *\n                                                            (s_n_m_196745 *\n          ",
                   "                                                   n_p_196694) +\n                                                            gtid_209864 *\n                                                            s_n_m_196745 +\n                                                            gtid_209865] =\n                                x_226821;\n                            ((__global float *) mem_223389)[gtid_209863 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209864 *\n                                                            s_n_m_196745 +\n                                                            gtid_209865] =\n                                x_226822;\n                            ((__global float *) mem_223394)[gtid_209863 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209864 *\n                                                            s_n_m_196745 +\n                                                            gtid_209865] =\n                                x_226823;\n                            ((__global float *) mem_223399)[gtid_209863 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209864 *\n                                                            s_n_m_196745 +\n                                                            gtid_209865] =\n                                x_226824;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef ",
                   "segred_group_sizze_209855\n}\n__kernel void mainzisegred_large_209990(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_226915_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226913_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226911_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_209982,\n                                        int64_t groups_per_segment_226895,\n                                        int64_t elements_per_thread_226896,\n                                        int64_t virt_num_groups_226897,\n                                        int64_t threads_per_segment_226899,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223405,\n                                        __global unsigned char *mem_223410,\n                                        __global unsigned char *mem_223415,\n                                        __global unsigned char *mem_223420,\n                                        __global unsigne",
                   "d char *mem_223425,\n                                        __global unsigned char *mem_223430,\n                                        __global unsigned char *mem_223436,\n                                        __global unsigned char *mem_223441,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226900,\n                                        __global\n                                        unsigned char *segred_tmp_mem_226902,\n                                        __global\n                                        unsigned char *mainzicounter_mem_226904)\n{\n    #define segred_group_sizze_209981 (mainzisegred_group_sizze_208426)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_226915_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_226915_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226913_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226913_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226911_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226911_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226906;\n    int32_t local_tid_226907;\n    int64_t group_sizze_226910;\n    int32_t wave_sizze_226909;\n    int32_t group_tid_226908;\n    \n    global_tid_226906 = get_global_id(0);\n    local_tid_226907 = get_local_id(0);\n    group_sizze_226910 = get_local_size(0);\n    wave_sizze_226909 = LOCKSTEP_WIDTH;\n    group_tid_226908 = get_group_id(0);\n    \n    int32_t phys_tid_209990 = global_tid_226906;\n    __local unsigned char *red_arr_mem_226911;\n    \n    red_ar",
                   "r_mem_226911 = (__local unsigned char *) red_arr_mem_226911_backing_0;\n    \n    __local unsigned char *red_arr_mem_226913;\n    \n    red_arr_mem_226913 = (__local unsigned char *) red_arr_mem_226913_backing_1;\n    \n    __local unsigned char *sync_arr_mem_226915;\n    \n    sync_arr_mem_226915 = (__local\n                           unsigned char *) sync_arr_mem_226915_backing_2;\n    \n    int32_t phys_group_id_226917;\n    \n    phys_group_id_226917 = get_group_id(0);\n    for (int32_t i_226918 = 0; i_226918 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_226897) - phys_group_id_226917,\n                   sext_i64_i32(num_groups_209982)); i_226918++) {\n        int32_t virt_group_id_226919 = phys_group_id_226917 + i_226918 *\n                sext_i64_i32(num_groups_209982);\n        int32_t flat_segment_id_226920 = squot32(virt_group_id_226919,\n                                                 sext_i64_i32(groups_per_segment_226895));\n        int64_t global_tid_226921 = srem64(sext_i32_i64(virt_group_id_226919) *\n                                           segred_group_sizze_209981 +\n                                           sext_i32_i64(local_tid_226907),\n                                           segred_group_sizze_209981 *\n                                           groups_per_segment_226895);\n        int64_t slice_226922 = s_n_m_196745;\n        int64_t slice_226923 = n_p_196694 * slice_226922;\n        int64_t slice_226924 = m_196691 * slice_226923;\n        int64_t gtid_209986 = squot64(sext_i32_i64(flat_segment_id_226920),\n                                      slice_226923);\n        int64_t remnant_226925 = sext_i32_i64(flat_segment_id_226920) -\n                gtid_209986 * slice_226923;\n        int64_t gtid_209987 = squot64(remnant_226925, slice_226922);\n        int64_t remnant_226926 = remnant_226925 - gtid_209987 * slice_226922;\n        int64_t gtid_209988 = remnant_226926;\n        int64_t remnant_226927 = remnant_226926 - gtid_209988;\n        int64_t gtid_209989;\n     ",
                   "   float x_acc_226928;\n        float x_acc_226929;\n        int64_t chunk_sizze_226930 = smin64(elements_per_thread_226896,\n                                            sdiv_up64(q_s_196695 -\n                                                      global_tid_226921,\n                                                      threads_per_segment_226899));\n        float x_209991;\n        float x_209992;\n        float x_209993;\n        float x_209994;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_226928 = 0.0F;\n            x_acc_226929 = 0.0F;\n        }\n        for (int64_t i_226937 = 0; i_226937 < chunk_sizze_226930; i_226937++) {\n            gtid_209989 = global_tid_226921 + threads_per_segment_226899 *\n                i_226937;\n            // apply map function\n            {\n                int64_t x_210012;\n                \n                x_210012 = ((__global int64_t *) ext_mem_222321)[gtid_209986 *\n                                                                 n_p_196694 +\n                                                                 gtid_209987];\n                \n                int64_t x_210021;\n                \n                x_210021 = ((__global int64_t *) ext_mem_222420)[gtid_209986 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_209987 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_209988];\n                \n                float x_210022;\n                \n                x_210022 = ((__global float *) ext_mem_222419)[gtid_209986 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                     ",
                   "          gtid_209987 *\n                                                               s_n_m_196745 +\n                                                               gtid_209988];\n                \n                float a12_210023;\n                \n                a12_210023 = ((__global float *) mem_223405)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float b12_210024;\n                \n                b12_210024 = ((__global float *) mem_223410)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float c12_210025;\n                \n                c12_210025 = ((__global float *) mem_223415)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float b2_210026;\n                \n                b2_210026 = ((__global float *) mem_223420)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                      ",
                   "                       n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988];\n                \n                float c2_210027;\n                \n                c2_210027 = ((__global float *) mem_223425)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988];\n                \n                int64_t defunc_0_m_fun_res_210028;\n                \n                defunc_0_m_fun_res_210028 = ((__global\n                                              int64_t *) mem_223430)[gtid_209986 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_209988];\n                \n                bool cond_210030 = sle64(x_210012, gtid_209989);\n                int64_t defunc_0_f_res_210031;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210031 = (int64_t) 0;\n                } else {\n                    int64_t i_210032 = add64(gtid_209989, x_210021);\n                    int64_t defunc_0_add_arg_210033;\n                    \n                    defunc_0_add_arg_210033 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_209986 *\n                               ",
                   "                                            (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_209987 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_210032];\n                    \n                    int64_t defunc_1_add_res_210034 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_210033);\n                    \n                    defunc_0_f_res_210031 = defunc_1_add_res_210034;\n                }\n                \n                float defunc_0_f_res_210035;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210035 = 0.0F;\n                } else {\n                    int64_t i_210036 = add64(gtid_209989, x_210021);\n                    float defunc_0_add_arg_210037;\n                    \n                    defunc_0_add_arg_210037 = ((__global\n                                                float *) mem_222588)[gtid_209986 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_210036];\n                    defunc_0_f_res_210035 = defunc_0_add_arg_210037;\n                }\n                \n                int64_t binop_p_210038 = sub64(defunc_0_f_res_210031,\n                                               defunc_0_m_fun_res_210028);\n                float defunc_0_f_res_210039 = sitofp_i64_f32(binop_p_210038);\n                float abs_res_210040 = (float) f",
                   "abs(defunc_0_f_res_210039);\n                float tmp1_210041 = abs_res_210040 / x_210022;\n                float x_210042 = tmp1_210041 * tmp1_210041;\n                float y_210043 = tmp1_210041 * x_210042;\n                float tmp2_210044 = 1.0F - y_210043;\n                float x_210045 = tmp2_210044 * tmp2_210044;\n                float tmp3_210046 = tmp2_210044 * x_210045;\n                float tmp4_210047 = defunc_0_f_res_210035 * tmp3_210046;\n                float defunc_1_f_res_210048 = defunc_0_f_res_210039 *\n                      tmp4_210047;\n                float defunc_1_f_res_210049 = defunc_0_f_res_210039 *\n                      defunc_1_f_res_210048;\n                float defunc_0_f_res_210050;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210050 = 0.0F;\n                } else {\n                    int64_t i_210051 = add64(gtid_209989, x_210021);\n                    float defunc_0_add_arg_210052;\n                    \n                    defunc_0_add_arg_210052 = ((__global\n                                                float *) mem_222583)[gtid_209986 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_210051];\n                    defunc_0_f_res_210050 = defunc_0_add_arg_210052;\n                }\n                \n                float x_210053 = a12_210023 * tmp4_210047;\n                float y_210054 = b12_210024 * defunc_1_f_res_210048;\n                float x_210055 = x_210053 + y_210054;\n                float y_210056 = c12_210025 * defunc_1_f_res_210049;\n                float x_210057 = x_210055 + y_210056;\n                float defunc_9",
                   "_fit_fun_res_210058 = defunc_0_f_res_210050 *\n                      x_210057;\n                float x_210059 = b12_210024 * tmp4_210047;\n                float y_210060 = b2_210026 * defunc_1_f_res_210048;\n                float x_210061 = x_210059 + y_210060;\n                float y_210062 = c2_210027 * defunc_1_f_res_210049;\n                float x_210063 = x_210061 + y_210062;\n                float defunc_9_slope_fun_res_210064 = defunc_0_f_res_210050 *\n                      x_210063;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_209991 = x_acc_226928;\n                    x_209992 = x_acc_226929;\n                }\n                // load new values\n                {\n                    x_209993 = defunc_9_fit_fun_res_210058;\n                    x_209994 = defunc_9_slope_fun_res_210064;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_209995 = x_209991 + x_209993;\n                    float defunc_1_op_res_209996 = x_209992 + x_209994;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_226928 = defunc_1_op_res_209995;\n                        x_acc_226929 = defunc_1_op_res_209996;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_209991 = x_acc_226928;\n            x_209992 = x_acc_226929;\n            ((__local\n              float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                x_209991;\n            ((__local\n              float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                x_209992;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_226938;\n        int32_t skip_waves_226939 = 1;\n        float x_226931;\n        float x_226932;\n        float x_",
                   "226933;\n        float x_226934;\n        \n        offset_226938 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_226907,\n                      sext_i64_i32(segred_group_sizze_209981))) {\n                x_226931 = ((__local\n                             float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                          offset_226938)];\n                x_226932 = ((__local\n                             float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907 +\n                                                          offset_226938)];\n            }\n        }\n        offset_226938 = 1;\n        while (slt32(offset_226938, wave_sizze_226909)) {\n            if (slt32(local_tid_226907 + offset_226938,\n                      sext_i64_i32(segred_group_sizze_209981)) &&\n                ((local_tid_226907 - squot32(local_tid_226907,\n                                             wave_sizze_226909) *\n                  wave_sizze_226909) & (2 * offset_226938 - 1)) == 0) {\n                // read array element\n                {\n                    x_226933 = ((volatile __local\n                                 float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                              offset_226938)];\n                    x_226934 = ((volatile __local\n                                 float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907 +\n                                                              offset_226938)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226935 = x_226931 + x_226933;\n                    float defunc_1_op_res_226936 = x_226932 + x_226934;\n                    \n                    x_226931 = defunc_1_op_res_226935;\n                    x_226932 = defunc_1_op_res_226936;\n                }\n                // write result of operation\n ",
                   "               {\n                    ((volatile __local\n                      float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                        x_226931;\n                    ((volatile __local\n                      float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                        x_226932;\n                }\n            }\n            offset_226938 *= 2;\n        }\n        while (slt32(skip_waves_226939,\n                     squot32(sext_i64_i32(segred_group_sizze_209981) +\n                             wave_sizze_226909 - 1, wave_sizze_226909))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_226938 = skip_waves_226939 * wave_sizze_226909;\n            if (slt32(local_tid_226907 + offset_226938,\n                      sext_i64_i32(segred_group_sizze_209981)) &&\n                ((local_tid_226907 - squot32(local_tid_226907,\n                                             wave_sizze_226909) *\n                  wave_sizze_226909) == 0 && (squot32(local_tid_226907,\n                                                      wave_sizze_226909) & (2 *\n                                                                            skip_waves_226939 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_226933 = ((__local\n                                 float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                              offset_226938)];\n                    x_226934 = ((__local\n                                 float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907 +\n                                                              offset_226938)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_226935 = x_226931 + x_226933;\n                    float defunc_1_op_res_226936 = x_226",
                   "932 + x_226934;\n                    \n                    x_226931 = defunc_1_op_res_226935;\n                    x_226932 = defunc_1_op_res_226936;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                        x_226931;\n                    ((__local\n                      float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                        x_226932;\n                }\n            }\n            skip_waves_226939 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_226907) == (int64_t) 0) {\n                x_acc_226928 = x_226931;\n                x_acc_226929 = x_226932;\n            }\n        }\n        if (groups_per_segment_226895 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_226907 == 0) {\n                    ((__global float *) mem_223436)[gtid_209986 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209987 *\n                                                    s_n_m_196745 +\n                                                    gtid_209988] = x_acc_226928;\n                    ((__global float *) mem_223441)[gtid_209986 *\n                                                    (s_n_m_196745 *\n                                                     n_p_196694) + gtid_209987 *\n                                                    s_n_m_196745 +\n                                                    gtid_209988] = x_acc_226929;\n                }\n            }\n        } else {\n            int32_t old_counter_226940;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local",
                   "_tid_226907 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_226900)[sext_i32_i64(virt_group_id_226919)] =\n                        x_acc_226928;\n                    ((__global\n                      float *) segred_tmp_mem_226902)[sext_i32_i64(virt_group_id_226919)] =\n                        x_acc_226929;\n                    mem_fence_global();\n                    old_counter_226940 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226904)[sext_i32_i64(srem32(flat_segment_id_226920,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_226915)[(int64_t) 0] =\n                        old_counter_226940 == groups_per_segment_226895 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_226941;\n            \n            is_last_group_226941 = ((__local\n                                     bool *) sync_arr_mem_226915)[(int64_t) 0];\n            if (is_last_group_226941) {\n                if (local_tid_226907 == 0) {\n                    old_counter_226940 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_226904)[sext_i32_i64(srem32(flat_segment_id_226920,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_226895));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_226942 =\n                          ",
                   "  sdiv_up64(groups_per_segment_226895,\n                                      segred_group_sizze_209981);\n                    \n                    x_209991 = 0.0F;\n                    x_209992 = 0.0F;\n                    for (int64_t i_226943 = 0; i_226943 <\n                         read_per_thread_226942; i_226943++) {\n                        int64_t group_res_id_226944 =\n                                sext_i32_i64(local_tid_226907) *\n                                read_per_thread_226942 + i_226943;\n                        int64_t index_of_group_res_226945 =\n                                sext_i32_i64(flat_segment_id_226920) *\n                                groups_per_segment_226895 + group_res_id_226944;\n                        \n                        if (slt64(group_res_id_226944,\n                                  groups_per_segment_226895)) {\n                            x_209993 = ((__global\n                                         float *) segred_tmp_mem_226900)[index_of_group_res_226945];\n                            x_209994 = ((__global\n                                         float *) segred_tmp_mem_226902)[index_of_group_res_226945];\n                            \n                            float defunc_1_op_res_209995 = x_209991 + x_209993;\n                            float defunc_1_op_res_209996 = x_209992 + x_209994;\n                            \n                            x_209991 = defunc_1_op_res_209995;\n                            x_209992 = defunc_1_op_res_209996;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                    x_209991;\n                ((__local\n                  float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                    x_209992;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_2269",
                   "46;\n                    int32_t skip_waves_226947 = 1;\n                    float x_226931;\n                    float x_226932;\n                    float x_226933;\n                    float x_226934;\n                    \n                    offset_226946 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_226907,\n                                  sext_i64_i32(segred_group_sizze_209981))) {\n                            x_226931 = ((__local\n                                         float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                                      offset_226946)];\n                            x_226932 = ((__local\n                                         float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907 +\n                                                                      offset_226946)];\n                        }\n                    }\n                    offset_226946 = 1;\n                    while (slt32(offset_226946, wave_sizze_226909)) {\n                        if (slt32(local_tid_226907 + offset_226946,\n                                  sext_i64_i32(segred_group_sizze_209981)) &&\n                            ((local_tid_226907 - squot32(local_tid_226907,\n                                                         wave_sizze_226909) *\n                              wave_sizze_226909) & (2 * offset_226946 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_226933 = ((volatile __local\n                                             float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                                          offset_226946)];\n                                x_226934 = ((volatile __local\n                                             float *) red_arr_mem_226913)[",
                   "sext_i32_i64(local_tid_226907 +\n                                                                          offset_226946)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226935 = x_226931 +\n                                      x_226933;\n                                float defunc_1_op_res_226936 = x_226932 +\n                                      x_226934;\n                                \n                                x_226931 = defunc_1_op_res_226935;\n                                x_226932 = defunc_1_op_res_226936;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                                    x_226931;\n                                ((volatile __local\n                                  float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                                    x_226932;\n                            }\n                        }\n                        offset_226946 *= 2;\n                    }\n                    while (slt32(skip_waves_226947,\n                                 squot32(sext_i64_i32(segred_group_sizze_209981) +\n                                         wave_sizze_226909 - 1,\n                                         wave_sizze_226909))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_226946 = skip_waves_226947 * wave_sizze_226909;\n                        if (slt32(local_tid_226907 + offset_226946,\n                                  sext_i64_i32(segred_group_sizze_209981)) &&\n                            ((local_tid_226907 - squot32(local_tid_226907,\n                                                         wave_sizze_226909) *\n                           ",
                   "   wave_sizze_226909) == 0 &&\n                             (squot32(local_tid_226907, wave_sizze_226909) &\n                              (2 * skip_waves_226947 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_226933 = ((__local\n                                             float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907 +\n                                                                          offset_226946)];\n                                x_226934 = ((__local\n                                             float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907 +\n                                                                          offset_226946)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_226935 = x_226931 +\n                                      x_226933;\n                                float defunc_1_op_res_226936 = x_226932 +\n                                      x_226934;\n                                \n                                x_226931 = defunc_1_op_res_226935;\n                                x_226932 = defunc_1_op_res_226936;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_226911)[sext_i32_i64(local_tid_226907)] =\n                                    x_226931;\n                                ((__local\n                                  float *) red_arr_mem_226913)[sext_i32_i64(local_tid_226907)] =\n                                    x_226932;\n                            }\n                        }\n                        skip_waves_226947 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                  ",
                   "      if (local_tid_226907 == 0) {\n                            ((__global float *) mem_223436)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988] =\n                                x_226931;\n                            ((__global float *) mem_223441)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988] =\n                                x_226932;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_209981\n}\n__kernel void mainzisegred_large_211714(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227108_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227106_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t C_len_196743,\n                                        int64_t num_groups_211709,\n                                        int64_t groups_per_segment_227092,\n                                        int64_t elements_per_thread_227093,\n                                        in",
                   "t64_t virt_num_groups_227094,\n                                        int64_t threads_per_segment_227096,\n                                        __global unsigned char *mem_223557,\n                                        __global unsigned char *mem_223568,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227097,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227099)\n{\n    #define segred_group_sizze_211708 (mainzisegred_group_sizze_211691)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227108_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227108_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227106_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227106_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227101;\n    int32_t local_tid_227102;\n    int64_t group_sizze_227105;\n    int32_t wave_sizze_227104;\n    int32_t group_tid_227103;\n    \n    global_tid_227101 = get_global_id(0);\n    local_tid_227102 = get_local_id(0);\n    group_sizze_227105 = get_local_size(0);\n    wave_sizze_227104 = LOCKSTEP_WIDTH;\n    group_tid_227103 = get_group_id(0);\n    \n    int32_t phys_tid_211714 = global_tid_227101;\n    __local unsigned char *red_arr_mem_227106;\n    \n    red_arr_mem_227106 = (__local unsigned char *) red_arr_mem_227106_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227108;\n    \n    sync_arr_mem_227108 = (__local\n                           unsigned char *) sync_arr_mem_227108_backing_1;\n    \n    int32_t phys_group_id_227110;\n    \n    phys_group_id_227110 = get_group_id(0);\n    for (i",
                   "nt32_t i_227111 = 0; i_227111 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227094) - phys_group_id_227110,\n                   sext_i64_i32(num_groups_211709)); i_227111++) {\n        int32_t virt_group_id_227112 = phys_group_id_227110 + i_227111 *\n                sext_i64_i32(num_groups_211709);\n        int32_t flat_segment_id_227113 = squot32(virt_group_id_227112,\n                                                 sext_i64_i32(groups_per_segment_227092));\n        int64_t global_tid_227114 = srem64(sext_i32_i64(virt_group_id_227112) *\n                                           segred_group_sizze_211708 +\n                                           sext_i32_i64(local_tid_227102),\n                                           segred_group_sizze_211708 *\n                                           groups_per_segment_227092);\n        int64_t slice_227115 = m_196691;\n        int64_t gtid_211712 = sext_i32_i64(flat_segment_id_227113);\n        int64_t remnant_227116 = sext_i32_i64(flat_segment_id_227113) -\n                gtid_211712;\n        int64_t gtid_211713;\n        float x_acc_227117;\n        int64_t chunk_sizze_227118 = smin64(elements_per_thread_227093,\n                                            sdiv_up64(n_p_196694 -\n                                                      global_tid_227114,\n                                                      threads_per_segment_227096));\n        float x_211715;\n        float x_211716;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227117 = 0.0F;\n        }\n        for (int64_t i_227122 = 0; i_227122 < chunk_sizze_227118; i_227122++) {\n            gtid_211713 = global_tid_227114 + threads_per_segment_227096 *\n                i_227122;\n            // apply map function\n            {\n                float x_211719;\n                \n                x_211719 = ((__global float *) mem_223557)[gtid_211712 *\n                                                           C_len_196743 +\n                        ",
                   "                                   gtid_211713];\n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_211715 = x_acc_227117;\n                }\n                // load new values\n                {\n                    x_211716 = x_211719;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_211717 = x_211715 + x_211716;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227117 = defunc_1_op_res_211717;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_211715 = x_acc_227117;\n            ((__local\n              float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                x_211715;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227123;\n        int32_t skip_waves_227124 = 1;\n        float x_227119;\n        float x_227120;\n        \n        offset_227123 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227102,\n                      sext_i64_i32(segred_group_sizze_211708))) {\n                x_227119 = ((__local\n                             float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102 +\n                                                          offset_227123)];\n            }\n        }\n        offset_227123 = 1;\n        while (slt32(offset_227123, wave_sizze_227104)) {\n            if (slt32(local_tid_227102 + offset_227123,\n                      sext_i64_i32(segred_group_sizze_211708)) &&\n                ((local_tid_227102 - squot32(local_tid_227102,\n                                             wave_sizze_227104) *\n                  wave_sizze_227104) & (2 * offset_227123 - 1)) == 0) {\n                // read array element\n                ",
                   "{\n                    x_227120 = ((volatile __local\n                                 float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102 +\n                                                              offset_227123)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227121 = x_227119 + x_227120;\n                    \n                    x_227119 = defunc_1_op_res_227121;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                        x_227119;\n                }\n            }\n            offset_227123 *= 2;\n        }\n        while (slt32(skip_waves_227124,\n                     squot32(sext_i64_i32(segred_group_sizze_211708) +\n                             wave_sizze_227104 - 1, wave_sizze_227104))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227123 = skip_waves_227124 * wave_sizze_227104;\n            if (slt32(local_tid_227102 + offset_227123,\n                      sext_i64_i32(segred_group_sizze_211708)) &&\n                ((local_tid_227102 - squot32(local_tid_227102,\n                                             wave_sizze_227104) *\n                  wave_sizze_227104) == 0 && (squot32(local_tid_227102,\n                                                      wave_sizze_227104) & (2 *\n                                                                            skip_waves_227124 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227120 = ((__local\n                                 float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102 +\n                                                              offset_227123)];\n                }\n                // apply reduction operation\n",
                   "                {\n                    float defunc_1_op_res_227121 = x_227119 + x_227120;\n                    \n                    x_227119 = defunc_1_op_res_227121;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                        x_227119;\n                }\n            }\n            skip_waves_227124 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227102) == (int64_t) 0) {\n                x_acc_227117 = x_227119;\n            }\n        }\n        if (groups_per_segment_227092 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227102 == 0) {\n                    ((__global float *) mem_223568)[gtid_211712] = x_acc_227117;\n                }\n            }\n        } else {\n            int32_t old_counter_227125;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227102 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227097)[sext_i32_i64(virt_group_id_227112)] =\n                        x_acc_227117;\n                    mem_fence_global();\n                    old_counter_227125 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227099)[sext_i32_i64(srem32(flat_segment_id_227113,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227108)[(int64_t) 0] =\n                        old_counter_227125 == groups_per_segment_227092 -\n                        (int64_t) 1;\n        ",
                   "        }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227126;\n            \n            is_last_group_227126 = ((__local\n                                     bool *) sync_arr_mem_227108)[(int64_t) 0];\n            if (is_last_group_227126) {\n                if (local_tid_227102 == 0) {\n                    old_counter_227125 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227099)[sext_i32_i64(srem32(flat_segment_id_227113,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227092));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227127 =\n                            sdiv_up64(groups_per_segment_227092,\n                                      segred_group_sizze_211708);\n                    \n                    x_211715 = 0.0F;\n                    for (int64_t i_227128 = 0; i_227128 <\n                         read_per_thread_227127; i_227128++) {\n                        int64_t group_res_id_227129 =\n                                sext_i32_i64(local_tid_227102) *\n                                read_per_thread_227127 + i_227128;\n                        int64_t index_of_group_res_227130 =\n                                sext_i32_i64(flat_segment_id_227113) *\n                                groups_per_segment_227092 + group_res_id_227129;\n                        \n                        if (slt64(group_res_id_227129,\n                                  groups_per_segment_227092)) {\n                            x_211716 = ((__global\n                                         float *) segred_tmp_mem_227097)[index_of_group_res_227130];\n",
                   "                            \n                            float defunc_1_op_res_211717 = x_211715 + x_211716;\n                            \n                            x_211715 = defunc_1_op_res_211717;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                    x_211715;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227131;\n                    int32_t skip_waves_227132 = 1;\n                    float x_227119;\n                    float x_227120;\n                    \n                    offset_227131 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227102,\n                                  sext_i64_i32(segred_group_sizze_211708))) {\n                            x_227119 = ((__local\n                                         float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102 +\n                                                                      offset_227131)];\n                        }\n                    }\n                    offset_227131 = 1;\n                    while (slt32(offset_227131, wave_sizze_227104)) {\n                        if (slt32(local_tid_227102 + offset_227131,\n                                  sext_i64_i32(segred_group_sizze_211708)) &&\n                            ((local_tid_227102 - squot32(local_tid_227102,\n                                                         wave_sizze_227104) *\n                              wave_sizze_227104) & (2 * offset_227131 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227120 = ((volatile __local\n                                             float *) red_arr_mem_227106)[sext_i32_i64(l",
                   "ocal_tid_227102 +\n                                                                          offset_227131)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227121 = x_227119 +\n                                      x_227120;\n                                \n                                x_227119 = defunc_1_op_res_227121;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                                    x_227119;\n                            }\n                        }\n                        offset_227131 *= 2;\n                    }\n                    while (slt32(skip_waves_227132,\n                                 squot32(sext_i64_i32(segred_group_sizze_211708) +\n                                         wave_sizze_227104 - 1,\n                                         wave_sizze_227104))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227131 = skip_waves_227132 * wave_sizze_227104;\n                        if (slt32(local_tid_227102 + offset_227131,\n                                  sext_i64_i32(segred_group_sizze_211708)) &&\n                            ((local_tid_227102 - squot32(local_tid_227102,\n                                                         wave_sizze_227104) *\n                              wave_sizze_227104) == 0 &&\n                             (squot32(local_tid_227102, wave_sizze_227104) &\n                              (2 * skip_waves_227132 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227120 = ((__local\n                                             float *) red_arr_mem_227106)[sext_i32_i64(lo",
                   "cal_tid_227102 +\n                                                                          offset_227131)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227121 = x_227119 +\n                                      x_227120;\n                                \n                                x_227119 = defunc_1_op_res_227121;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227106)[sext_i32_i64(local_tid_227102)] =\n                                    x_227119;\n                            }\n                        }\n                        skip_waves_227132 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227102 == 0) {\n                            ((__global float *) mem_223568)[gtid_211712] =\n                                x_227119;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211708\n}\n__kernel void mainzisegred_large_211845(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227251_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227249_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t lifted_single_ma_l_arg_197247,\n                                        int64_t num_groups_211840,\n                                        int64_t groups_per_seg",
                   "ment_227235,\n                                        int64_t elements_per_thread_227236,\n                                        int64_t virt_num_groups_227237,\n                                        int64_t threads_per_segment_227239,\n                                        __global unsigned char *mem_223574,\n                                        __global unsigned char *mem_223585,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227240,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227242)\n{\n    #define segred_group_sizze_211839 (mainzisegred_group_sizze_211822)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227251_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227251_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227249_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227249_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227244;\n    int32_t local_tid_227245;\n    int64_t group_sizze_227248;\n    int32_t wave_sizze_227247;\n    int32_t group_tid_227246;\n    \n    global_tid_227244 = get_global_id(0);\n    local_tid_227245 = get_local_id(0);\n    group_sizze_227248 = get_local_size(0);\n    wave_sizze_227247 = LOCKSTEP_WIDTH;\n    group_tid_227246 = get_group_id(0);\n    \n    int32_t phys_tid_211845 = global_tid_227244;\n    __local unsigned char *red_arr_mem_227249;\n    \n    red_arr_mem_227249 = (__local unsigned char *) red_arr_mem_227249_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227251;\n    \n    sync_arr_mem_227251 = (__local\n                           unsigned char *",
                   ") sync_arr_mem_227251_backing_1;\n    \n    int32_t phys_group_id_227253;\n    \n    phys_group_id_227253 = get_group_id(0);\n    for (int32_t i_227254 = 0; i_227254 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227237) - phys_group_id_227253,\n                   sext_i64_i32(num_groups_211840)); i_227254++) {\n        int32_t virt_group_id_227255 = phys_group_id_227253 + i_227254 *\n                sext_i64_i32(num_groups_211840);\n        int32_t flat_segment_id_227256 = squot32(virt_group_id_227255,\n                                                 sext_i64_i32(groups_per_segment_227235));\n        int64_t global_tid_227257 = srem64(sext_i32_i64(virt_group_id_227255) *\n                                           segred_group_sizze_211839 +\n                                           sext_i32_i64(local_tid_227245),\n                                           segred_group_sizze_211839 *\n                                           groups_per_segment_227235);\n        int64_t slice_227258 = m_196691;\n        int64_t gtid_211843 = sext_i32_i64(flat_segment_id_227256);\n        int64_t remnant_227259 = sext_i32_i64(flat_segment_id_227256) -\n                gtid_211843;\n        int64_t gtid_211844;\n        float x_acc_227260;\n        int64_t chunk_sizze_227261 = smin64(elements_per_thread_227236,\n                                            sdiv_up64(n_p_196694 -\n                                                      global_tid_227257,\n                                                      threads_per_segment_227239));\n        float x_211846;\n        float x_211847;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227260 = 0.0F;\n        }\n        for (int64_t i_227265 = 0; i_227265 < chunk_sizze_227261; i_227265++) {\n            gtid_211844 = global_tid_227257 + threads_per_segment_227239 *\n                i_227265;\n            // apply map function\n            {\n                float x_211850;\n                \n                x_211850 = ((__global fl",
                   "oat *) mem_223574)[gtid_211843 *\n                                                           lifted_single_ma_l_arg_197247 +\n                                                           gtid_211844];\n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_211846 = x_acc_227260;\n                }\n                // load new values\n                {\n                    x_211847 = x_211850;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_211848 = x_211846 + x_211847;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227260 = defunc_1_op_res_211848;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_211846 = x_acc_227260;\n            ((__local\n              float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                x_211846;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227266;\n        int32_t skip_waves_227267 = 1;\n        float x_227262;\n        float x_227263;\n        \n        offset_227266 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227245,\n                      sext_i64_i32(segred_group_sizze_211839))) {\n                x_227262 = ((__local\n                             float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245 +\n                                                          offset_227266)];\n            }\n        }\n        offset_227266 = 1;\n        while (slt32(offset_227266, wave_sizze_227247)) {\n            if (slt32(local_tid_227245 + offset_227266,\n                      sext_i64_i32(segred_group_sizze_211839)) &&\n                ((local_tid_227245 - squot32(local_tid_227245,\n                                            ",
                   " wave_sizze_227247) *\n                  wave_sizze_227247) & (2 * offset_227266 - 1)) == 0) {\n                // read array element\n                {\n                    x_227263 = ((volatile __local\n                                 float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245 +\n                                                              offset_227266)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227264 = x_227262 + x_227263;\n                    \n                    x_227262 = defunc_1_op_res_227264;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                        x_227262;\n                }\n            }\n            offset_227266 *= 2;\n        }\n        while (slt32(skip_waves_227267,\n                     squot32(sext_i64_i32(segred_group_sizze_211839) +\n                             wave_sizze_227247 - 1, wave_sizze_227247))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227266 = skip_waves_227267 * wave_sizze_227247;\n            if (slt32(local_tid_227245 + offset_227266,\n                      sext_i64_i32(segred_group_sizze_211839)) &&\n                ((local_tid_227245 - squot32(local_tid_227245,\n                                             wave_sizze_227247) *\n                  wave_sizze_227247) == 0 && (squot32(local_tid_227245,\n                                                      wave_sizze_227247) & (2 *\n                                                                            skip_waves_227267 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227263 = ((__local\n                                 float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227",
                   "245 +\n                                                              offset_227266)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227264 = x_227262 + x_227263;\n                    \n                    x_227262 = defunc_1_op_res_227264;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                        x_227262;\n                }\n            }\n            skip_waves_227267 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227245) == (int64_t) 0) {\n                x_acc_227260 = x_227262;\n            }\n        }\n        if (groups_per_segment_227235 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227245 == 0) {\n                    ((__global float *) mem_223585)[gtid_211843] = x_acc_227260;\n                }\n            }\n        } else {\n            int32_t old_counter_227268;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227245 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227240)[sext_i32_i64(virt_group_id_227255)] =\n                        x_acc_227260;\n                    mem_fence_global();\n                    old_counter_227268 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227242)[sext_i32_i64(srem32(flat_segment_id_227256,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_ar",
                   "r_mem_227251)[(int64_t) 0] =\n                        old_counter_227268 == groups_per_segment_227235 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227269;\n            \n            is_last_group_227269 = ((__local\n                                     bool *) sync_arr_mem_227251)[(int64_t) 0];\n            if (is_last_group_227269) {\n                if (local_tid_227245 == 0) {\n                    old_counter_227268 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227242)[sext_i32_i64(srem32(flat_segment_id_227256,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227235));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227270 =\n                            sdiv_up64(groups_per_segment_227235,\n                                      segred_group_sizze_211839);\n                    \n                    x_211846 = 0.0F;\n                    for (int64_t i_227271 = 0; i_227271 <\n                         read_per_thread_227270; i_227271++) {\n                        int64_t group_res_id_227272 =\n                                sext_i32_i64(local_tid_227245) *\n                                read_per_thread_227270 + i_227271;\n                        int64_t index_of_group_res_227273 =\n                                sext_i32_i64(flat_segment_id_227256) *\n                                groups_per_segment_227235 + group_res_id_227272;\n                        \n                        if (slt64(group_res_id_227272,\n                                  groups_per_segment_227235)) {\n   ",
                   "                         x_211847 = ((__global\n                                         float *) segred_tmp_mem_227240)[index_of_group_res_227273];\n                            \n                            float defunc_1_op_res_211848 = x_211846 + x_211847;\n                            \n                            x_211846 = defunc_1_op_res_211848;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                    x_211846;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227274;\n                    int32_t skip_waves_227275 = 1;\n                    float x_227262;\n                    float x_227263;\n                    \n                    offset_227274 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227245,\n                                  sext_i64_i32(segred_group_sizze_211839))) {\n                            x_227262 = ((__local\n                                         float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245 +\n                                                                      offset_227274)];\n                        }\n                    }\n                    offset_227274 = 1;\n                    while (slt32(offset_227274, wave_sizze_227247)) {\n                        if (slt32(local_tid_227245 + offset_227274,\n                                  sext_i64_i32(segred_group_sizze_211839)) &&\n                            ((local_tid_227245 - squot32(local_tid_227245,\n                                                         wave_sizze_227247) *\n                              wave_sizze_227247) & (2 * offset_227274 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n  ",
                   "                              x_227263 = ((volatile __local\n                                             float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245 +\n                                                                          offset_227274)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227264 = x_227262 +\n                                      x_227263;\n                                \n                                x_227262 = defunc_1_op_res_227264;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                                    x_227262;\n                            }\n                        }\n                        offset_227274 *= 2;\n                    }\n                    while (slt32(skip_waves_227275,\n                                 squot32(sext_i64_i32(segred_group_sizze_211839) +\n                                         wave_sizze_227247 - 1,\n                                         wave_sizze_227247))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227274 = skip_waves_227275 * wave_sizze_227247;\n                        if (slt32(local_tid_227245 + offset_227274,\n                                  sext_i64_i32(segred_group_sizze_211839)) &&\n                            ((local_tid_227245 - squot32(local_tid_227245,\n                                                         wave_sizze_227247) *\n                              wave_sizze_227247) == 0 &&\n                             (squot32(local_tid_227245, wave_sizze_227247) &\n                              (2 * skip_waves_227275 - 1)) == 0)) {\n                            // read array element\n                        ",
                   "    {\n                                x_227263 = ((__local\n                                             float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245 +\n                                                                          offset_227274)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227264 = x_227262 +\n                                      x_227263;\n                                \n                                x_227262 = defunc_1_op_res_227264;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227249)[sext_i32_i64(local_tid_227245)] =\n                                    x_227262;\n                            }\n                        }\n                        skip_waves_227275 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227245 == 0) {\n                            ((__global float *) mem_223585)[gtid_211843] =\n                                x_227262;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211839\n}\n__kernel void mainzisegred_large_211976(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227394_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227392_backing_aligned_1,\n                                        int64_t m_196691,\n                                        int64_t dyn_lifted_single_ma_l_arg_19725",
                   "7,\n                                        int64_t num_groups_211971,\n                                        int64_t groups_per_segment_227378,\n                                        int64_t elements_per_thread_227379,\n                                        int64_t virt_num_groups_227380,\n                                        int64_t threads_per_segment_227382,\n                                        __global unsigned char *mem_223591,\n                                        __global unsigned char *mem_223602,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227383,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227385)\n{\n    #define segred_group_sizze_211970 (mainzisegred_group_sizze_211953)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227394_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227394_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227392_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227392_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227387;\n    int32_t local_tid_227388;\n    int64_t group_sizze_227391;\n    int32_t wave_sizze_227390;\n    int32_t group_tid_227389;\n    \n    global_tid_227387 = get_global_id(0);\n    local_tid_227388 = get_local_id(0);\n    group_sizze_227391 = get_local_size(0);\n    wave_sizze_227390 = LOCKSTEP_WIDTH;\n    group_tid_227389 = get_group_id(0);\n    \n    int32_t phys_tid_211976 = global_tid_227387;\n    __local unsigned char *red_arr_mem_227392;\n    \n    red_arr_mem_227392 = (__local unsigned char *) red_arr_mem_227392_backing_0;\n   ",
                   " \n    __local unsigned char *sync_arr_mem_227394;\n    \n    sync_arr_mem_227394 = (__local\n                           unsigned char *) sync_arr_mem_227394_backing_1;\n    \n    int32_t phys_group_id_227396;\n    \n    phys_group_id_227396 = get_group_id(0);\n    for (int32_t i_227397 = 0; i_227397 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227380) - phys_group_id_227396,\n                   sext_i64_i32(num_groups_211971)); i_227397++) {\n        int32_t virt_group_id_227398 = phys_group_id_227396 + i_227397 *\n                sext_i64_i32(num_groups_211971);\n        int32_t flat_segment_id_227399 = squot32(virt_group_id_227398,\n                                                 sext_i64_i32(groups_per_segment_227378));\n        int64_t global_tid_227400 = srem64(sext_i32_i64(virt_group_id_227398) *\n                                           segred_group_sizze_211970 +\n                                           sext_i32_i64(local_tid_227388),\n                                           segred_group_sizze_211970 *\n                                           groups_per_segment_227378);\n        int64_t slice_227401 = m_196691;\n        int64_t gtid_211974 = sext_i32_i64(flat_segment_id_227399);\n        int64_t remnant_227402 = sext_i32_i64(flat_segment_id_227399) -\n                gtid_211974;\n        int64_t gtid_211975;\n        float x_acc_227403;\n        int64_t chunk_sizze_227404 = smin64(elements_per_thread_227379,\n                                            sdiv_up64((int64_t) 3 -\n                                                      global_tid_227400,\n                                                      threads_per_segment_227382));\n        float x_211977;\n        float x_211978;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227403 = 0.0F;\n        }\n        for (int64_t i_227408 = 0; i_227408 < chunk_sizze_227404; i_227408++) {\n            gtid_211975 = global_tid_227400 + threads_per_segment_227382 *\n                i_227408;\n    ",
                   "        // apply map function\n            {\n                float x_211981;\n                \n                x_211981 = ((__global float *) mem_223591)[gtid_211974 *\n                                                           dyn_lifted_single_ma_l_arg_197257 +\n                                                           gtid_211975];\n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_211977 = x_acc_227403;\n                }\n                // load new values\n                {\n                    x_211978 = x_211981;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_211979 = x_211977 + x_211978;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227403 = defunc_1_op_res_211979;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_211977 = x_acc_227403;\n            ((__local\n              float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                x_211977;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227409;\n        int32_t skip_waves_227410 = 1;\n        float x_227405;\n        float x_227406;\n        \n        offset_227409 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227388,\n                      sext_i64_i32(segred_group_sizze_211970))) {\n                x_227405 = ((__local\n                             float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                          offset_227409)];\n            }\n        }\n        offset_227409 = 1;\n        while (slt32(offset_227409, wave_sizze_227390)) {\n            if (slt32(local_tid_227388 + offset_227409,\n                      sext_i64_i32(s",
                   "egred_group_sizze_211970)) &&\n                ((local_tid_227388 - squot32(local_tid_227388,\n                                             wave_sizze_227390) *\n                  wave_sizze_227390) & (2 * offset_227409 - 1)) == 0) {\n                // read array element\n                {\n                    x_227406 = ((volatile __local\n                                 float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                              offset_227409)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227407 = x_227405 + x_227406;\n                    \n                    x_227405 = defunc_1_op_res_227407;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                        x_227405;\n                }\n            }\n            offset_227409 *= 2;\n        }\n        while (slt32(skip_waves_227410,\n                     squot32(sext_i64_i32(segred_group_sizze_211970) +\n                             wave_sizze_227390 - 1, wave_sizze_227390))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227409 = skip_waves_227410 * wave_sizze_227390;\n            if (slt32(local_tid_227388 + offset_227409,\n                      sext_i64_i32(segred_group_sizze_211970)) &&\n                ((local_tid_227388 - squot32(local_tid_227388,\n                                             wave_sizze_227390) *\n                  wave_sizze_227390) == 0 && (squot32(local_tid_227388,\n                                                      wave_sizze_227390) & (2 *\n                                                                            skip_waves_227410 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n          ",
                   "      {\n                    x_227406 = ((__local\n                                 float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                              offset_227409)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227407 = x_227405 + x_227406;\n                    \n                    x_227405 = defunc_1_op_res_227407;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                        x_227405;\n                }\n            }\n            skip_waves_227410 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227388) == (int64_t) 0) {\n                x_acc_227403 = x_227405;\n            }\n        }\n        if (groups_per_segment_227378 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227388 == 0) {\n                    ((__global float *) mem_223602)[gtid_211974] = x_acc_227403;\n                }\n            }\n        } else {\n            int32_t old_counter_227411;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227388 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227383)[sext_i32_i64(virt_group_id_227398)] =\n                        x_acc_227403;\n                    mem_fence_global();\n                    old_counter_227411 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227385)[sext_i32_i64(srem32(flat_segment_id_227399,\n                                                                            ",
                   "                          10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227394)[(int64_t) 0] =\n                        old_counter_227411 == groups_per_segment_227378 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227412;\n            \n            is_last_group_227412 = ((__local\n                                     bool *) sync_arr_mem_227394)[(int64_t) 0];\n            if (is_last_group_227412) {\n                if (local_tid_227388 == 0) {\n                    old_counter_227411 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227385)[sext_i32_i64(srem32(flat_segment_id_227399,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227378));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227413 =\n                            sdiv_up64(groups_per_segment_227378,\n                                      segred_group_sizze_211970);\n                    \n                    x_211977 = 0.0F;\n                    for (int64_t i_227414 = 0; i_227414 <\n                         read_per_thread_227413; i_227414++) {\n                        int64_t group_res_id_227415 =\n                                sext_i32_i64(local_tid_227388) *\n                                read_per_thread_227413 + i_227414;\n                        int64_t index_of_group_res_227416 =\n                                sext_i32_i64(flat_segment_id_227399) *\n                                groups_per_segment_227378 + group_res_id_227415;\n          ",
                   "              \n                        if (slt64(group_res_id_227415,\n                                  groups_per_segment_227378)) {\n                            x_211978 = ((__global\n                                         float *) segred_tmp_mem_227383)[index_of_group_res_227416];\n                            \n                            float defunc_1_op_res_211979 = x_211977 + x_211978;\n                            \n                            x_211977 = defunc_1_op_res_211979;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                    x_211977;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227417;\n                    int32_t skip_waves_227418 = 1;\n                    float x_227405;\n                    float x_227406;\n                    \n                    offset_227417 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227388,\n                                  sext_i64_i32(segred_group_sizze_211970))) {\n                            x_227405 = ((__local\n                                         float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                                      offset_227417)];\n                        }\n                    }\n                    offset_227417 = 1;\n                    while (slt32(offset_227417, wave_sizze_227390)) {\n                        if (slt32(local_tid_227388 + offset_227417,\n                                  sext_i64_i32(segred_group_sizze_211970)) &&\n                            ((local_tid_227388 - squot32(local_tid_227388,\n                                                         wave_sizze_227390) *\n                              wave_sizze_227390) & (2 * o",
                   "ffset_227417 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227406 = ((volatile __local\n                                             float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                                          offset_227417)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227407 = x_227405 +\n                                      x_227406;\n                                \n                                x_227405 = defunc_1_op_res_227407;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                                    x_227405;\n                            }\n                        }\n                        offset_227417 *= 2;\n                    }\n                    while (slt32(skip_waves_227418,\n                                 squot32(sext_i64_i32(segred_group_sizze_211970) +\n                                         wave_sizze_227390 - 1,\n                                         wave_sizze_227390))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227417 = skip_waves_227418 * wave_sizze_227390;\n                        if (slt32(local_tid_227388 + offset_227417,\n                                  sext_i64_i32(segred_group_sizze_211970)) &&\n                            ((local_tid_227388 - squot32(local_tid_227388,\n                                                         wave_sizze_227390) *\n                              wave_sizze_227390) == 0 &&\n                             (squot32(local_tid_227388, wave_sizze_227390) &\n     ",
                   "                         (2 * skip_waves_227418 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227406 = ((__local\n                                             float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388 +\n                                                                          offset_227417)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227407 = x_227405 +\n                                      x_227406;\n                                \n                                x_227405 = defunc_1_op_res_227407;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227392)[sext_i32_i64(local_tid_227388)] =\n                                    x_227405;\n                            }\n                        }\n                        skip_waves_227418 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227388 == 0) {\n                            ((__global float *) mem_223602)[gtid_211974] =\n                                x_227405;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211970\n}\n__kernel void mainzisegred_large_212598(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227573_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227571_backing_aligned_1,\n ",
                   "                                       int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_212592,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_227557,\n                                        int64_t elements_per_thread_227558,\n                                        int64_t virt_num_groups_227559,\n                                        int64_t threads_per_segment_227561,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223653,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227562,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227564)\n{\n    #define segred_group_sizze_212591 (mainzisegred_group_sizze_212343)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227573_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227573_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227571_backing_0 =\n                                   (__local volatile\n           ",
                   "                         unsigned char *) red_arr_mem_227571_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227566;\n    int32_t local_tid_227567;\n    int64_t group_sizze_227570;\n    int32_t wave_sizze_227569;\n    int32_t group_tid_227568;\n    \n    global_tid_227566 = get_global_id(0);\n    local_tid_227567 = get_local_id(0);\n    group_sizze_227570 = get_local_size(0);\n    wave_sizze_227569 = LOCKSTEP_WIDTH;\n    group_tid_227568 = get_group_id(0);\n    \n    int32_t phys_tid_212598 = global_tid_227566;\n    __local unsigned char *red_arr_mem_227571;\n    \n    red_arr_mem_227571 = (__local unsigned char *) red_arr_mem_227571_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227573;\n    \n    sync_arr_mem_227573 = (__local\n                           unsigned char *) sync_arr_mem_227573_backing_1;\n    \n    int32_t phys_group_id_227575;\n    \n    phys_group_id_227575 = get_group_id(0);\n    for (int32_t i_227576 = 0; i_227576 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227559) - phys_group_id_227575,\n                   sext_i64_i32(num_groups_212592)); i_227576++) {\n        int32_t virt_group_id_227577 = phys_group_id_227575 + i_227576 *\n                sext_i64_i32(num_groups_212592);\n        int32_t flat_segment_id_227578 = squot32(virt_group_id_227577,\n                                                 sext_i64_i32(groups_per_segment_227557));\n        int64_t global_tid_227579 = srem64(sext_i32_i64(virt_group_id_227577) *\n                                           segred_group_sizze_212591 +\n                                           sext_i32_i64(local_tid_227567),\n                                           segred_group_sizze_212591 *\n                                           groups_per_segment_227557);\n        int64_t slice_227580 = l_n_m_196752;\n        int64_t slice_227581 = m_196691 * slice_227580;\n        int64_t gtid_212595 = squot64(sext_i32_i64(flat_segment_id_227578),\n                                      ",
                   "slice_227580);\n        int64_t remnant_227582 = sext_i32_i64(flat_segment_id_227578) -\n                gtid_212595 * slice_227580;\n        int64_t gtid_212596 = remnant_227582;\n        int64_t remnant_227583 = remnant_227582 - gtid_212596;\n        int64_t gtid_212597;\n        float x_acc_227584;\n        int64_t chunk_sizze_227585 = smin64(elements_per_thread_227558,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227579,\n                                                      threads_per_segment_227561));\n        float x_212599;\n        float x_212600;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227584 = 0.0F;\n        }\n        for (int64_t i_227589 = 0; i_227589 < chunk_sizze_227585; i_227589++) {\n            gtid_212597 = global_tid_227579 + threads_per_segment_227561 *\n                i_227589;\n            // apply map function\n            {\n                int64_t x_212606;\n                \n                x_212606 = ((__global int64_t *) ext_mem_222469)[gtid_212595 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_212596];\n                \n                float x_212607;\n                \n                x_212607 = ((__global float *) ext_mem_222468)[gtid_212595 *\n                                                               l_n_m_196752 +\n                                                               gtid_212596];\n                \n                int64_t binop_y_221782 = mul64(jump_t_196702, gtid_212596);\n                int64_t binop_y_221783 = smin64(i_196779, binop_y_221782);\n                int64_t index_primexp_221784 = add64((int64_t) 1,\n                                                     binop_y_221783);\n                bool cond_212610 = sle64(n_196692, gtid_212597);\n                int64_t defunc_0_f_res_212611;\n                \n ",
                   "               if (cond_212610) {\n                    defunc_0_f_res_212611 = (int64_t) 0;\n                } else {\n                    int64_t i_212612 = add64(gtid_212597, x_212606);\n                    int64_t defunc_1_add_res_212613 = add64((int64_t) 1,\n                                                            i_212612);\n                    \n                    defunc_0_f_res_212611 = defunc_1_add_res_212613;\n                }\n                \n                float defunc_0_f_res_212614;\n                \n                if (cond_212610) {\n                    defunc_0_f_res_212614 = 0.0F;\n                } else {\n                    int64_t i_212615 = add64(gtid_212597, x_212606);\n                    float defunc_0_add_arg_212616;\n                    \n                    defunc_0_add_arg_212616 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_212595 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_212615 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_212614 = defunc_0_add_arg_212616;\n                }\n                \n                int64_t binop_p_212617 = sub64(defunc_0_f_res_212611,\n                                               index_primexp_221784);\n                float defunc_0_f_res_212618 = sitofp_i64_f32(binop_p_212617);\n                float abs_res_212619 = (float) fabs(defunc_0_f_res_212618);\n                float tmp1_212620 = abs_res_212619 / x_212607;\n                float x_212621 = tmp1_212620 * tmp1_212620;\n                float y_212622 = tmp1_212620 * x_212621;\n                float tmp2_212623 = 1.0F - y_212622;\n                float x_212624 = tmp2_212623 * tmp2_212623;\n           ",
                   "     float tmp3_212625 = tmp2_212623 * x_212624;\n                float w_j_212626 = defunc_0_f_res_212614 * tmp3_212625;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_212599 = x_acc_227584;\n                }\n                // load new values\n                {\n                    x_212600 = w_j_212626;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_212601 = x_212599 + x_212600;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227584 = defunc_1_op_res_212601;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_212599 = x_acc_227584;\n            ((__local\n              float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                x_212599;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227590;\n        int32_t skip_waves_227591 = 1;\n        float x_227586;\n        float x_227587;\n        \n        offset_227590 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227567,\n                      sext_i64_i32(segred_group_sizze_212591))) {\n                x_227586 = ((__local\n                             float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                          offset_227590)];\n            }\n        }\n        offset_227590 = 1;\n        while (slt32(offset_227590, wave_sizze_227569)) {\n            if (slt32(local_tid_227567 + offset_227590,\n                      sext_i64_i32(segred_group_sizze_212591)) &&\n                ((local_tid_227567 - squot32(local_tid_227567,\n                                             wave_sizze_227569) *\n                  wave_sizze_227569",
                   ") & (2 * offset_227590 - 1)) == 0) {\n                // read array element\n                {\n                    x_227587 = ((volatile __local\n                                 float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                              offset_227590)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227588 = x_227586 + x_227587;\n                    \n                    x_227586 = defunc_1_op_res_227588;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                        x_227586;\n                }\n            }\n            offset_227590 *= 2;\n        }\n        while (slt32(skip_waves_227591,\n                     squot32(sext_i64_i32(segred_group_sizze_212591) +\n                             wave_sizze_227569 - 1, wave_sizze_227569))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227590 = skip_waves_227591 * wave_sizze_227569;\n            if (slt32(local_tid_227567 + offset_227590,\n                      sext_i64_i32(segred_group_sizze_212591)) &&\n                ((local_tid_227567 - squot32(local_tid_227567,\n                                             wave_sizze_227569) *\n                  wave_sizze_227569) == 0 && (squot32(local_tid_227567,\n                                                      wave_sizze_227569) & (2 *\n                                                                            skip_waves_227591 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227587 = ((__local\n                                 float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                   ",
                   "           offset_227590)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227588 = x_227586 + x_227587;\n                    \n                    x_227586 = defunc_1_op_res_227588;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                        x_227586;\n                }\n            }\n            skip_waves_227591 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227567) == (int64_t) 0) {\n                x_acc_227584 = x_227586;\n            }\n        }\n        if (groups_per_segment_227557 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227567 == 0) {\n                    ((__global float *) mem_223653)[gtid_212595 * l_n_m_196752 +\n                                                    gtid_212596] = x_acc_227584;\n                }\n            }\n        } else {\n            int32_t old_counter_227592;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227567 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227562)[sext_i32_i64(virt_group_id_227577)] =\n                        x_acc_227584;\n                    mem_fence_global();\n                    old_counter_227592 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227564)[sext_i32_i64(srem32(flat_segment_id_227578,\n                                                                                                      10240))],\n                                              (int) 1);\n                    (",
                   "(__local bool *) sync_arr_mem_227573)[(int64_t) 0] =\n                        old_counter_227592 == groups_per_segment_227557 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227593;\n            \n            is_last_group_227593 = ((__local\n                                     bool *) sync_arr_mem_227573)[(int64_t) 0];\n            if (is_last_group_227593) {\n                if (local_tid_227567 == 0) {\n                    old_counter_227592 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227564)[sext_i32_i64(srem32(flat_segment_id_227578,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227557));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227594 =\n                            sdiv_up64(groups_per_segment_227557,\n                                      segred_group_sizze_212591);\n                    \n                    x_212599 = 0.0F;\n                    for (int64_t i_227595 = 0; i_227595 <\n                         read_per_thread_227594; i_227595++) {\n                        int64_t group_res_id_227596 =\n                                sext_i32_i64(local_tid_227567) *\n                                read_per_thread_227594 + i_227595;\n                        int64_t index_of_group_res_227597 =\n                                sext_i32_i64(flat_segment_id_227578) *\n                                groups_per_segment_227557 + group_res_id_227596;\n                        \n                        if (slt64(group_res_id_227596,\n                                  groups_pe",
                   "r_segment_227557)) {\n                            x_212600 = ((__global\n                                         float *) segred_tmp_mem_227562)[index_of_group_res_227597];\n                            \n                            float defunc_1_op_res_212601 = x_212599 + x_212600;\n                            \n                            x_212599 = defunc_1_op_res_212601;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                    x_212599;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227598;\n                    int32_t skip_waves_227599 = 1;\n                    float x_227586;\n                    float x_227587;\n                    \n                    offset_227598 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227567,\n                                  sext_i64_i32(segred_group_sizze_212591))) {\n                            x_227586 = ((__local\n                                         float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                                      offset_227598)];\n                        }\n                    }\n                    offset_227598 = 1;\n                    while (slt32(offset_227598, wave_sizze_227569)) {\n                        if (slt32(local_tid_227567 + offset_227598,\n                                  sext_i64_i32(segred_group_sizze_212591)) &&\n                            ((local_tid_227567 - squot32(local_tid_227567,\n                                                         wave_sizze_227569) *\n                              wave_sizze_227569) & (2 * offset_227598 - 1)) ==\n                            0) {\n                            // read array element\n        ",
                   "                    {\n                                x_227587 = ((volatile __local\n                                             float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                                          offset_227598)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227588 = x_227586 +\n                                      x_227587;\n                                \n                                x_227586 = defunc_1_op_res_227588;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                                    x_227586;\n                            }\n                        }\n                        offset_227598 *= 2;\n                    }\n                    while (slt32(skip_waves_227599,\n                                 squot32(sext_i64_i32(segred_group_sizze_212591) +\n                                         wave_sizze_227569 - 1,\n                                         wave_sizze_227569))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227598 = skip_waves_227599 * wave_sizze_227569;\n                        if (slt32(local_tid_227567 + offset_227598,\n                                  sext_i64_i32(segred_group_sizze_212591)) &&\n                            ((local_tid_227567 - squot32(local_tid_227567,\n                                                         wave_sizze_227569) *\n                              wave_sizze_227569) == 0 &&\n                             (squot32(local_tid_227567, wave_sizze_227569) &\n                              (2 * skip_waves_227599 - 1)) == 0)) {\n                            // read array element\n",
                   "                            {\n                                x_227587 = ((__local\n                                             float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567 +\n                                                                          offset_227598)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227588 = x_227586 +\n                                      x_227587;\n                                \n                                x_227586 = defunc_1_op_res_227588;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227571)[sext_i32_i64(local_tid_227567)] =\n                                    x_227586;\n                            }\n                        }\n                        skip_waves_227599 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227567 == 0) {\n                            ((__global float *) mem_223653)[gtid_212595 *\n                                                            l_n_m_196752 +\n                                                            gtid_212596] =\n                                x_227586;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_212591\n}\n__kernel void mainzisegred_large_212647(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227655_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red",
                   "_arr_mem_227653_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_212641,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_227639,\n                                        int64_t elements_per_thread_227640,\n                                        int64_t virt_num_groups_227641,\n                                        int64_t threads_per_segment_227643,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223658,\n                                        __global unsigned char *mem_223663,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227644,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227646)\n{\n    #define segred_group_sizze_212640 (mainzisegred_group_sizze_212276)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227655_backing_1 =\n                                   (__local volatile\n                                    unsigned",
                   " char *) sync_arr_mem_227655_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227653_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227653_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227648;\n    int32_t local_tid_227649;\n    int64_t group_sizze_227652;\n    int32_t wave_sizze_227651;\n    int32_t group_tid_227650;\n    \n    global_tid_227648 = get_global_id(0);\n    local_tid_227649 = get_local_id(0);\n    group_sizze_227652 = get_local_size(0);\n    wave_sizze_227651 = LOCKSTEP_WIDTH;\n    group_tid_227650 = get_group_id(0);\n    \n    int32_t phys_tid_212647 = global_tid_227648;\n    __local unsigned char *red_arr_mem_227653;\n    \n    red_arr_mem_227653 = (__local unsigned char *) red_arr_mem_227653_backing_0;\n    \n    __local unsigned char *sync_arr_mem_227655;\n    \n    sync_arr_mem_227655 = (__local\n                           unsigned char *) sync_arr_mem_227655_backing_1;\n    \n    int32_t phys_group_id_227657;\n    \n    phys_group_id_227657 = get_group_id(0);\n    for (int32_t i_227658 = 0; i_227658 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227641) - phys_group_id_227657,\n                   sext_i64_i32(num_groups_212641)); i_227658++) {\n        int32_t virt_group_id_227659 = phys_group_id_227657 + i_227658 *\n                sext_i64_i32(num_groups_212641);\n        int32_t flat_segment_id_227660 = squot32(virt_group_id_227659,\n                                                 sext_i64_i32(groups_per_segment_227639));\n        int64_t global_tid_227661 = srem64(sext_i32_i64(virt_group_id_227659) *\n                                           segred_group_sizze_212640 +\n                                           sext_i32_i64(local_tid_227649),\n                                           segred_group_sizze_212640 *\n                                           groups_per_segment_227639);\n        int64_t slice_22766",
                   "2 = l_n_m_196752;\n        int64_t slice_227663 = m_196691 * slice_227662;\n        int64_t gtid_212644 = squot64(sext_i32_i64(flat_segment_id_227660),\n                                      slice_227662);\n        int64_t remnant_227664 = sext_i32_i64(flat_segment_id_227660) -\n                gtid_212644 * slice_227662;\n        int64_t gtid_212645 = remnant_227664;\n        int64_t remnant_227665 = remnant_227664 - gtid_212645;\n        int64_t gtid_212646;\n        float x_acc_227666;\n        int64_t chunk_sizze_227667 = smin64(elements_per_thread_227640,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227661,\n                                                      threads_per_segment_227643));\n        float x_212648;\n        float x_212649;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227666 = 0.0F;\n        }\n        for (int64_t i_227671 = 0; i_227671 < chunk_sizze_227667; i_227671++) {\n            gtid_212646 = global_tid_227661 + threads_per_segment_227643 *\n                i_227671;\n            // apply map function\n            {\n                int64_t x_212657;\n                \n                x_212657 = ((__global int64_t *) ext_mem_222469)[gtid_212644 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_212645];\n                \n                float x_212658;\n                \n                x_212658 = ((__global float *) ext_mem_222468)[gtid_212644 *\n                                                               l_n_m_196752 +\n                                                               gtid_212645];\n                \n                int64_t binop_y_221777 = mul64(jump_t_196702, gtid_212645);\n                int64_t binop_y_221778 = smin64(i_196779, binop_y_221777);\n                int64_t index_primexp_221779 = add64((int64_t) 1,\n            ",
                   "                                         binop_y_221778);\n                float a0_212660;\n                \n                a0_212660 = ((__global float *) mem_223658)[gtid_212644 *\n                                                            l_n_m_196752 +\n                                                            gtid_212645];\n                \n                bool cond_212662 = sle64(n_196692, gtid_212646);\n                int64_t defunc_0_f_res_212663;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212663 = (int64_t) 0;\n                } else {\n                    int64_t i_212664 = add64(gtid_212646, x_212657);\n                    int64_t defunc_1_add_res_212665 = add64((int64_t) 1,\n                                                            i_212664);\n                    \n                    defunc_0_f_res_212663 = defunc_1_add_res_212665;\n                }\n                \n                float defunc_0_f_res_212666;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212666 = 0.0F;\n                } else {\n                    int64_t i_212667 = add64(gtid_212646, x_212657);\n                    float defunc_0_add_arg_212668;\n                    \n                    defunc_0_add_arg_212668 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_212644 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_212667 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_212666 = defunc_0_add_arg_212668;\n                }\n                \n                int64_t binop_p_212669 = sub64(defunc_0_f_res_212663,\n                                               ind",
                   "ex_primexp_221779);\n                float defunc_0_f_res_212670 = sitofp_i64_f32(binop_p_212669);\n                float abs_res_212671 = (float) fabs(defunc_0_f_res_212670);\n                float tmp1_212672 = abs_res_212671 / x_212658;\n                float x_212673 = tmp1_212672 * tmp1_212672;\n                float y_212674 = tmp1_212672 * x_212673;\n                float tmp2_212675 = 1.0F - y_212674;\n                float x_212676 = tmp2_212675 * tmp2_212675;\n                float tmp3_212677 = tmp2_212675 * x_212676;\n                float tmp4_212678 = defunc_0_f_res_212666 * tmp3_212677;\n                float defunc_0_f_res_212679;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212679 = 0.0F;\n                } else {\n                    int64_t i_212680 = add64(gtid_212646, x_212657);\n                    float defunc_0_add_arg_212681;\n                    \n                    defunc_0_add_arg_212681 = ((__global\n                                                float *) mem_223608)[gtid_212644 *\n                                                                     n_196692 +\n                                                                     i_212680];\n                    defunc_0_f_res_212679 = defunc_0_add_arg_212681;\n                }\n                \n                float x_212682 = a0_212660 * tmp4_212678;\n                float defunc_9_fit_fun_res_212683 = defunc_0_f_res_212679 *\n                      x_212682;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_212648 = x_acc_227666;\n                }\n                // load new values\n                {\n                    x_212649 = defunc_9_fit_fun_res_212683;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_212650 = x_212648 + x_212649;\n                    \n                    // store in accum",
                   "ulator\n                    {\n                        x_acc_227666 = defunc_1_op_res_212650;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_212648 = x_acc_227666;\n            ((__local\n              float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                x_212648;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227672;\n        int32_t skip_waves_227673 = 1;\n        float x_227668;\n        float x_227669;\n        \n        offset_227672 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227649,\n                      sext_i64_i32(segred_group_sizze_212640))) {\n                x_227668 = ((__local\n                             float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                          offset_227672)];\n            }\n        }\n        offset_227672 = 1;\n        while (slt32(offset_227672, wave_sizze_227651)) {\n            if (slt32(local_tid_227649 + offset_227672,\n                      sext_i64_i32(segred_group_sizze_212640)) &&\n                ((local_tid_227649 - squot32(local_tid_227649,\n                                             wave_sizze_227651) *\n                  wave_sizze_227651) & (2 * offset_227672 - 1)) == 0) {\n                // read array element\n                {\n                    x_227669 = ((volatile __local\n                                 float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                              offset_227672)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227670 = x_227668 + x_227669;\n                    \n                    x_227668 = defunc_1_op_res_227670;\n                }\n                // write result of operation\n             ",
                   "   {\n                    ((volatile __local\n                      float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                        x_227668;\n                }\n            }\n            offset_227672 *= 2;\n        }\n        while (slt32(skip_waves_227673,\n                     squot32(sext_i64_i32(segred_group_sizze_212640) +\n                             wave_sizze_227651 - 1, wave_sizze_227651))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227672 = skip_waves_227673 * wave_sizze_227651;\n            if (slt32(local_tid_227649 + offset_227672,\n                      sext_i64_i32(segred_group_sizze_212640)) &&\n                ((local_tid_227649 - squot32(local_tid_227649,\n                                             wave_sizze_227651) *\n                  wave_sizze_227651) == 0 && (squot32(local_tid_227649,\n                                                      wave_sizze_227651) & (2 *\n                                                                            skip_waves_227673 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227669 = ((__local\n                                 float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                              offset_227672)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227670 = x_227668 + x_227669;\n                    \n                    x_227668 = defunc_1_op_res_227670;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                        x_227668;\n                }\n            }\n            skip_waves_227673 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first t",
                   "hread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227649) == (int64_t) 0) {\n                x_acc_227666 = x_227668;\n            }\n        }\n        if (groups_per_segment_227639 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227649 == 0) {\n                    ((__global float *) mem_223663)[gtid_212644 * l_n_m_196752 +\n                                                    gtid_212645] = x_acc_227666;\n                }\n            }\n        } else {\n            int32_t old_counter_227674;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227649 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227644)[sext_i32_i64(virt_group_id_227659)] =\n                        x_acc_227666;\n                    mem_fence_global();\n                    old_counter_227674 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227646)[sext_i32_i64(srem32(flat_segment_id_227660,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227655)[(int64_t) 0] =\n                        old_counter_227674 == groups_per_segment_227639 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227675;\n            \n            is_last_group_227675 = ((__local\n                                     bool *) sync_arr_mem_227655)[(int64_t) 0];\n            if (is_last_group_227675) {\n                if (local_tid_227649 == 0) {\n                    old_counter_227674 =\n                        atomic_add_i32_globa",
                   "l(&((volatile __global\n                                                 int *) mainzicounter_mem_227646)[sext_i32_i64(srem32(flat_segment_id_227660,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227639));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227676 =\n                            sdiv_up64(groups_per_segment_227639,\n                                      segred_group_sizze_212640);\n                    \n                    x_212648 = 0.0F;\n                    for (int64_t i_227677 = 0; i_227677 <\n                         read_per_thread_227676; i_227677++) {\n                        int64_t group_res_id_227678 =\n                                sext_i32_i64(local_tid_227649) *\n                                read_per_thread_227676 + i_227677;\n                        int64_t index_of_group_res_227679 =\n                                sext_i32_i64(flat_segment_id_227660) *\n                                groups_per_segment_227639 + group_res_id_227678;\n                        \n                        if (slt64(group_res_id_227678,\n                                  groups_per_segment_227639)) {\n                            x_212649 = ((__global\n                                         float *) segred_tmp_mem_227644)[index_of_group_res_227679];\n                            \n                            float defunc_1_op_res_212650 = x_212648 + x_212649;\n                            \n                            x_212648 = defunc_1_op_res_212650;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                    x_212648;\n                barrier(CLK_LOCAL_MEM_FENCE);",
                   "\n                // reduce the per-group results\n                {\n                    int32_t offset_227680;\n                    int32_t skip_waves_227681 = 1;\n                    float x_227668;\n                    float x_227669;\n                    \n                    offset_227680 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227649,\n                                  sext_i64_i32(segred_group_sizze_212640))) {\n                            x_227668 = ((__local\n                                         float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                                      offset_227680)];\n                        }\n                    }\n                    offset_227680 = 1;\n                    while (slt32(offset_227680, wave_sizze_227651)) {\n                        if (slt32(local_tid_227649 + offset_227680,\n                                  sext_i64_i32(segred_group_sizze_212640)) &&\n                            ((local_tid_227649 - squot32(local_tid_227649,\n                                                         wave_sizze_227651) *\n                              wave_sizze_227651) & (2 * offset_227680 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227669 = ((volatile __local\n                                             float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                                          offset_227680)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227670 = x_227668 +\n                                      x_227669;\n                                \n                                x_227668 = defunc_1_op_res_227670;\n ",
                   "                           }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                                    x_227668;\n                            }\n                        }\n                        offset_227680 *= 2;\n                    }\n                    while (slt32(skip_waves_227681,\n                                 squot32(sext_i64_i32(segred_group_sizze_212640) +\n                                         wave_sizze_227651 - 1,\n                                         wave_sizze_227651))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227680 = skip_waves_227681 * wave_sizze_227651;\n                        if (slt32(local_tid_227649 + offset_227680,\n                                  sext_i64_i32(segred_group_sizze_212640)) &&\n                            ((local_tid_227649 - squot32(local_tid_227649,\n                                                         wave_sizze_227651) *\n                              wave_sizze_227651) == 0 &&\n                             (squot32(local_tid_227649, wave_sizze_227651) &\n                              (2 * skip_waves_227681 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227669 = ((__local\n                                             float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649 +\n                                                                          offset_227680)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227670 = x_227668 +\n                                      x_227669;\n                                \n                                x_227668 = defunc_1_op_res_227670;\n  ",
                   "                          }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227653)[sext_i32_i64(local_tid_227649)] =\n                                    x_227668;\n                            }\n                        }\n                        skip_waves_227681 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227649 == 0) {\n                            ((__global float *) mem_223663)[gtid_212644 *\n                                                            l_n_m_196752 +\n                                                            gtid_212645] =\n                                x_227668;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_212640\n}\n__kernel void mainzisegred_large_213427(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227801_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227799_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227797_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227795_backing_aligned_3,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                   ",
                   "                     int64_t num_groups_213419,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_227777,\n                                        int64_t elements_per_thread_227778,\n                                        int64_t virt_num_groups_227779,\n                                        int64_t threads_per_segment_227781,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223733,\n                                        __global unsigned char *mem_223737,\n                                        __global unsigned char *mem_223741,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227782,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227784,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227786,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227788)\n{\n    #define segred_group_sizze_213418 (mainzisegred_group_sizze_213095)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227801_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227801_backing_aligned_0;\n    __local volatile unsigned c",
                   "har *restrict red_arr_mem_227799_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227799_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_227797_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227797_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_227795_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227795_backing_aligned_3;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227790;\n    int32_t local_tid_227791;\n    int64_t group_sizze_227794;\n    int32_t wave_sizze_227793;\n    int32_t group_tid_227792;\n    \n    global_tid_227790 = get_global_id(0);\n    local_tid_227791 = get_local_id(0);\n    group_sizze_227794 = get_local_size(0);\n    wave_sizze_227793 = LOCKSTEP_WIDTH;\n    group_tid_227792 = get_group_id(0);\n    \n    int32_t phys_tid_213427 = global_tid_227790;\n    __local unsigned char *red_arr_mem_227795;\n    \n    red_arr_mem_227795 = (__local unsigned char *) red_arr_mem_227795_backing_0;\n    \n    __local unsigned char *red_arr_mem_227797;\n    \n    red_arr_mem_227797 = (__local unsigned char *) red_arr_mem_227797_backing_1;\n    \n    __local unsigned char *red_arr_mem_227799;\n    \n    red_arr_mem_227799 = (__local unsigned char *) red_arr_mem_227799_backing_2;\n    \n    __local unsigned char *sync_arr_mem_227801;\n    \n    sync_arr_mem_227801 = (__local\n                           unsigned char *) sync_arr_mem_227801_backing_3;\n    \n    int32_t phys_group_id_227803;\n    \n    phys_group_id_227803 = get_group_id(0);\n    for (int32_t i_227804 = 0; i_227804 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227779) - phys_group_id_227803,\n                   sext_i64_i32(num_groups_213419)); i_227804++) {\n        int32_t virt_group_id_227805 = phy",
                   "s_group_id_227803 + i_227804 *\n                sext_i64_i32(num_groups_213419);\n        int32_t flat_segment_id_227806 = squot32(virt_group_id_227805,\n                                                 sext_i64_i32(groups_per_segment_227777));\n        int64_t global_tid_227807 = srem64(sext_i32_i64(virt_group_id_227805) *\n                                           segred_group_sizze_213418 +\n                                           sext_i32_i64(local_tid_227791),\n                                           segred_group_sizze_213418 *\n                                           groups_per_segment_227777);\n        int64_t slice_227808 = l_n_m_196752;\n        int64_t slice_227809 = m_196691 * slice_227808;\n        int64_t gtid_213424 = squot64(sext_i32_i64(flat_segment_id_227806),\n                                      slice_227808);\n        int64_t remnant_227810 = sext_i32_i64(flat_segment_id_227806) -\n                gtid_213424 * slice_227808;\n        int64_t gtid_213425 = remnant_227810;\n        int64_t remnant_227811 = remnant_227810 - gtid_213425;\n        int64_t gtid_213426;\n        float x_acc_227812;\n        float x_acc_227813;\n        float x_acc_227814;\n        int64_t chunk_sizze_227815 = smin64(elements_per_thread_227778,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227807,\n                                                      threads_per_segment_227781));\n        float x_213428;\n        float x_213429;\n        float x_213430;\n        float x_213431;\n        float x_213432;\n        float x_213433;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227812 = 0.0F;\n            x_acc_227813 = 0.0F;\n            x_acc_227814 = 0.0F;\n        }\n        for (int64_t i_227825 = 0; i_227825 < chunk_sizze_227815; i_227825++) {\n            gtid_213426 = global_tid_227807 + threads_per_segment_227781 *\n                i_227825;\n            // apply map f",
                   "unction\n            {\n                int64_t x_213441;\n                \n                x_213441 = ((__global int64_t *) ext_mem_222469)[gtid_213424 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_213425];\n                \n                float x_213442;\n                \n                x_213442 = ((__global float *) ext_mem_222468)[gtid_213424 *\n                                                               l_n_m_196752 +\n                                                               gtid_213425];\n                \n                int64_t binop_y_221792 = mul64(jump_t_196702, gtid_213425);\n                int64_t binop_y_221793 = smin64(i_196779, binop_y_221792);\n                int64_t index_primexp_221794 = add64((int64_t) 1,\n                                                     binop_y_221793);\n                bool cond_213445 = sle64(n_196692, gtid_213426);\n                int64_t defunc_0_f_res_213446;\n                \n                if (cond_213445) {\n                    defunc_0_f_res_213446 = (int64_t) 0;\n                } else {\n                    int64_t i_213447 = add64(gtid_213426, x_213441);\n                    int64_t defunc_1_add_res_213448 = add64((int64_t) 1,\n                                                            i_213447);\n                    \n                    defunc_0_f_res_213446 = defunc_1_add_res_213448;\n                }\n                \n                float defunc_0_f_res_213449;\n                \n                if (cond_213445) {\n                    defunc_0_f_res_213449 = 0.0F;\n                } else {\n                    int64_t i_213450 = add64(gtid_213426, x_213441);\n                    float defunc_0_add_arg_213451;\n                    \n                    defunc_0_add_arg_213451 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                   ",
                   "                                        (gtid_213424 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_213450 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_213449 = defunc_0_add_arg_213451;\n                }\n                \n                int64_t binop_p_213452 = sub64(defunc_0_f_res_213446,\n                                               index_primexp_221794);\n                float defunc_0_f_res_213453 = sitofp_i64_f32(binop_p_213452);\n                float abs_res_213454 = (float) fabs(defunc_0_f_res_213453);\n                float tmp1_213455 = abs_res_213454 / x_213442;\n                float x_213456 = tmp1_213455 * tmp1_213455;\n                float y_213457 = tmp1_213455 * x_213456;\n                float tmp2_213458 = 1.0F - y_213457;\n                float x_213459 = tmp2_213458 * tmp2_213458;\n                float tmp3_213460 = tmp2_213458 * x_213459;\n                float w_j_213461 = defunc_0_f_res_213449 * tmp3_213460;\n                float xw_j_213462 = defunc_0_f_res_213453 * w_j_213461;\n                float x2w_j_213463 = defunc_0_f_res_213453 * xw_j_213462;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_213428 = x_acc_227812;\n                    x_213429 = x_acc_227813;\n                    x_213430 = x_acc_227814;\n                }\n                // load new values\n                {\n                    x_213431 = w_j_213461;\n                    x_213432 = xw_j_213462;\n                    x_213433 = x2w_j_213463;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_213434 = x_213428 + x_213431;\n                    float defunc_1_op_res_213435 = x_213429 + x_21343",
                   "2;\n                    float defunc_1_op_res_213436 = x_213430 + x_213433;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227812 = defunc_1_op_res_213434;\n                        x_acc_227813 = defunc_1_op_res_213435;\n                        x_acc_227814 = defunc_1_op_res_213436;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_213428 = x_acc_227812;\n            x_213429 = x_acc_227813;\n            x_213430 = x_acc_227814;\n            ((__local\n              float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                x_213428;\n            ((__local\n              float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                x_213429;\n            ((__local\n              float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                x_213430;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227826;\n        int32_t skip_waves_227827 = 1;\n        float x_227816;\n        float x_227817;\n        float x_227818;\n        float x_227819;\n        float x_227820;\n        float x_227821;\n        \n        offset_227826 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227791,\n                      sext_i64_i32(segred_group_sizze_213418))) {\n                x_227816 = ((__local\n                             float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                          offset_227826)];\n                x_227817 = ((__local\n                             float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                          offset_227826)];\n                x_227818 = ((__local\n                             float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791 +\n        ",
                   "                                                  offset_227826)];\n            }\n        }\n        offset_227826 = 1;\n        while (slt32(offset_227826, wave_sizze_227793)) {\n            if (slt32(local_tid_227791 + offset_227826,\n                      sext_i64_i32(segred_group_sizze_213418)) &&\n                ((local_tid_227791 - squot32(local_tid_227791,\n                                             wave_sizze_227793) *\n                  wave_sizze_227793) & (2 * offset_227826 - 1)) == 0) {\n                // read array element\n                {\n                    x_227819 = ((volatile __local\n                                 float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                    x_227820 = ((volatile __local\n                                 float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                    x_227821 = ((volatile __local\n                                 float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227822 = x_227816 + x_227819;\n                    float defunc_1_op_res_227823 = x_227817 + x_227820;\n                    float defunc_1_op_res_227824 = x_227818 + x_227821;\n                    \n                    x_227816 = defunc_1_op_res_227822;\n                    x_227817 = defunc_1_op_res_227823;\n                    x_227818 = defunc_1_op_res_227824;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                        x_227816;\n                    ((volatile __local\n               ",
                   "       float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                        x_227817;\n                    ((volatile __local\n                      float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                        x_227818;\n                }\n            }\n            offset_227826 *= 2;\n        }\n        while (slt32(skip_waves_227827,\n                     squot32(sext_i64_i32(segred_group_sizze_213418) +\n                             wave_sizze_227793 - 1, wave_sizze_227793))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227826 = skip_waves_227827 * wave_sizze_227793;\n            if (slt32(local_tid_227791 + offset_227826,\n                      sext_i64_i32(segred_group_sizze_213418)) &&\n                ((local_tid_227791 - squot32(local_tid_227791,\n                                             wave_sizze_227793) *\n                  wave_sizze_227793) == 0 && (squot32(local_tid_227791,\n                                                      wave_sizze_227793) & (2 *\n                                                                            skip_waves_227827 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227819 = ((__local\n                                 float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                    x_227820 = ((__local\n                                 float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                    x_227821 = ((__local\n                                 float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791 +\n                                                              offset_227826)];\n                }\n                // apply reduction operation\n   ",
                   "             {\n                    float defunc_1_op_res_227822 = x_227816 + x_227819;\n                    float defunc_1_op_res_227823 = x_227817 + x_227820;\n                    float defunc_1_op_res_227824 = x_227818 + x_227821;\n                    \n                    x_227816 = defunc_1_op_res_227822;\n                    x_227817 = defunc_1_op_res_227823;\n                    x_227818 = defunc_1_op_res_227824;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                        x_227816;\n                    ((__local\n                      float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                        x_227817;\n                    ((__local\n                      float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                        x_227818;\n                }\n            }\n            skip_waves_227827 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227791) == (int64_t) 0) {\n                x_acc_227812 = x_227816;\n                x_acc_227813 = x_227817;\n                x_acc_227814 = x_227818;\n            }\n        }\n        if (groups_per_segment_227777 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227791 == 0) {\n                    ((__global float *) mem_223733)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_227812;\n                    ((__global float *) mem_223737)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_227813;\n                    ((__global float *) mem_223741)[gtid_213424 * l_n_m_196752 +\n                                                    gtid_213425] = x_acc_22",
                   "7814;\n                }\n            }\n        } else {\n            int32_t old_counter_227828;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227791 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227782)[sext_i32_i64(virt_group_id_227805)] =\n                        x_acc_227812;\n                    ((__global\n                      float *) segred_tmp_mem_227784)[sext_i32_i64(virt_group_id_227805)] =\n                        x_acc_227813;\n                    ((__global\n                      float *) segred_tmp_mem_227786)[sext_i32_i64(virt_group_id_227805)] =\n                        x_acc_227814;\n                    mem_fence_global();\n                    old_counter_227828 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227788)[sext_i32_i64(srem32(flat_segment_id_227806,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227801)[(int64_t) 0] =\n                        old_counter_227828 == groups_per_segment_227777 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227829;\n            \n            is_last_group_227829 = ((__local\n                                     bool *) sync_arr_mem_227801)[(int64_t) 0];\n            if (is_last_group_227829) {\n                if (local_tid_227791 == 0) {\n                    old_counter_227828 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227788)[sext_i32_i64(srem32(flat_segment_id_227806,\n                                            ",
                   "                                                          10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227777));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227830 =\n                            sdiv_up64(groups_per_segment_227777,\n                                      segred_group_sizze_213418);\n                    \n                    x_213428 = 0.0F;\n                    x_213429 = 0.0F;\n                    x_213430 = 0.0F;\n                    for (int64_t i_227831 = 0; i_227831 <\n                         read_per_thread_227830; i_227831++) {\n                        int64_t group_res_id_227832 =\n                                sext_i32_i64(local_tid_227791) *\n                                read_per_thread_227830 + i_227831;\n                        int64_t index_of_group_res_227833 =\n                                sext_i32_i64(flat_segment_id_227806) *\n                                groups_per_segment_227777 + group_res_id_227832;\n                        \n                        if (slt64(group_res_id_227832,\n                                  groups_per_segment_227777)) {\n                            x_213431 = ((__global\n                                         float *) segred_tmp_mem_227782)[index_of_group_res_227833];\n                            x_213432 = ((__global\n                                         float *) segred_tmp_mem_227784)[index_of_group_res_227833];\n                            x_213433 = ((__global\n                                         float *) segred_tmp_mem_227786)[index_of_group_res_227833];\n                            \n                            float defunc_1_op_res_213434 = x_213428 + x_213431;\n                            float defunc_1_op_res_213435 = x_213429 + x_213432;\n                            float defunc_1_op_res_213436 = x_213430 + x_21343",
                   "3;\n                            \n                            x_213428 = defunc_1_op_res_213434;\n                            x_213429 = defunc_1_op_res_213435;\n                            x_213430 = defunc_1_op_res_213436;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                    x_213428;\n                ((__local\n                  float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                    x_213429;\n                ((__local\n                  float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                    x_213430;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227834;\n                    int32_t skip_waves_227835 = 1;\n                    float x_227816;\n                    float x_227817;\n                    float x_227818;\n                    float x_227819;\n                    float x_227820;\n                    float x_227821;\n                    \n                    offset_227834 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227791,\n                                  sext_i64_i32(segred_group_sizze_213418))) {\n                            x_227816 = ((__local\n                                         float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                                      offset_227834)];\n                            x_227817 = ((__local\n                                         float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                                      offset_227834)];\n                            x_227818 = ((__local\n                                         float *) red_arr_mem_227799)[sex",
                   "t_i32_i64(local_tid_227791 +\n                                                                      offset_227834)];\n                        }\n                    }\n                    offset_227834 = 1;\n                    while (slt32(offset_227834, wave_sizze_227793)) {\n                        if (slt32(local_tid_227791 + offset_227834,\n                                  sext_i64_i32(segred_group_sizze_213418)) &&\n                            ((local_tid_227791 - squot32(local_tid_227791,\n                                                         wave_sizze_227793) *\n                              wave_sizze_227793) & (2 * offset_227834 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_227819 = ((volatile __local\n                                             float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                                x_227820 = ((volatile __local\n                                             float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                                x_227821 = ((volatile __local\n                                             float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227822 = x_227816 +\n                                      x_227819;\n                                float defunc_1_op_res_227823 = x_227817 +\n                                      x_227820;\n                                float defunc_1_op_res_227824 = x_227818 +\n                        ",
                   "              x_227821;\n                                \n                                x_227816 = defunc_1_op_res_227822;\n                                x_227817 = defunc_1_op_res_227823;\n                                x_227818 = defunc_1_op_res_227824;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                                    x_227816;\n                                ((volatile __local\n                                  float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                                    x_227817;\n                                ((volatile __local\n                                  float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                                    x_227818;\n                            }\n                        }\n                        offset_227834 *= 2;\n                    }\n                    while (slt32(skip_waves_227835,\n                                 squot32(sext_i64_i32(segred_group_sizze_213418) +\n                                         wave_sizze_227793 - 1,\n                                         wave_sizze_227793))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227834 = skip_waves_227835 * wave_sizze_227793;\n                        if (slt32(local_tid_227791 + offset_227834,\n                                  sext_i64_i32(segred_group_sizze_213418)) &&\n                            ((local_tid_227791 - squot32(local_tid_227791,\n                                                         wave_sizze_227793) *\n                              wave_sizze_227793) == 0 &&\n                             (squot32(local_tid_227791, wave_sizze_227793) &\n                              (2 * skip_waves_227835 - 1)) == 0)) {\n                        ",
                   "    // read array element\n                            {\n                                x_227819 = ((__local\n                                             float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                                x_227820 = ((__local\n                                             float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                                x_227821 = ((__local\n                                             float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791 +\n                                                                          offset_227834)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227822 = x_227816 +\n                                      x_227819;\n                                float defunc_1_op_res_227823 = x_227817 +\n                                      x_227820;\n                                float defunc_1_op_res_227824 = x_227818 +\n                                      x_227821;\n                                \n                                x_227816 = defunc_1_op_res_227822;\n                                x_227817 = defunc_1_op_res_227823;\n                                x_227818 = defunc_1_op_res_227824;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227795)[sext_i32_i64(local_tid_227791)] =\n                                    x_227816;\n                                ((__local\n                                  float *) red_arr_mem_227797)[sext_i32_i64(local_tid_227791)] =\n                                    ",
                   "x_227817;\n                                ((__local\n                                  float *) red_arr_mem_227799)[sext_i32_i64(local_tid_227791)] =\n                                    x_227818;\n                            }\n                        }\n                        skip_waves_227835 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227791 == 0) {\n                            ((__global float *) mem_223733)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_227816;\n                            ((__global float *) mem_223737)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_227817;\n                            ((__global float *) mem_223741)[gtid_213424 *\n                                                            l_n_m_196752 +\n                                                            gtid_213425] =\n                                x_227818;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_213418\n}\n__kernel void mainzisegred_large_213496(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_227901_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227899_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227897_backing_aligned_2,\n               ",
                   "                         int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_213489,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_227881,\n                                        int64_t elements_per_thread_227882,\n                                        int64_t virt_num_groups_227883,\n                                        int64_t threads_per_segment_227885,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223746,\n                                        __global unsigned char *mem_223750,\n                                        __global unsigned char *mem_223754,\n                                        __global unsigned char *mem_223759,\n                                        __global unsigned char *mem_223763,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227886,\n                                        __global\n                                        unsigned char *segred_tmp_mem_227888,\n                                        __global\n                                        unsigned char *mainzicounter_mem_227890)\n{\n    #define segred_group_sizze_21348",
                   "8 (mainzisegred_group_sizze_213001)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_227901_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_227901_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227899_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227899_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_227897_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227897_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227892;\n    int32_t local_tid_227893;\n    int64_t group_sizze_227896;\n    int32_t wave_sizze_227895;\n    int32_t group_tid_227894;\n    \n    global_tid_227892 = get_global_id(0);\n    local_tid_227893 = get_local_id(0);\n    group_sizze_227896 = get_local_size(0);\n    wave_sizze_227895 = LOCKSTEP_WIDTH;\n    group_tid_227894 = get_group_id(0);\n    \n    int32_t phys_tid_213496 = global_tid_227892;\n    __local unsigned char *red_arr_mem_227897;\n    \n    red_arr_mem_227897 = (__local unsigned char *) red_arr_mem_227897_backing_0;\n    \n    __local unsigned char *red_arr_mem_227899;\n    \n    red_arr_mem_227899 = (__local unsigned char *) red_arr_mem_227899_backing_1;\n    \n    __local unsigned char *sync_arr_mem_227901;\n    \n    sync_arr_mem_227901 = (__local\n                           unsigned char *) sync_arr_mem_227901_backing_2;\n    \n    int32_t phys_group_id_227903;\n    \n    phys_group_id_227903 = get_group_id(0);\n    for (int32_t i_227904 = 0; i_227904 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_227883) - phys_group_id_227903,\n                   sext_i64_i32(num_groups_213489)); i_227904++) {\n        int32_t ",
                   "virt_group_id_227905 = phys_group_id_227903 + i_227904 *\n                sext_i64_i32(num_groups_213489);\n        int32_t flat_segment_id_227906 = squot32(virt_group_id_227905,\n                                                 sext_i64_i32(groups_per_segment_227881));\n        int64_t global_tid_227907 = srem64(sext_i32_i64(virt_group_id_227905) *\n                                           segred_group_sizze_213488 +\n                                           sext_i32_i64(local_tid_227893),\n                                           segred_group_sizze_213488 *\n                                           groups_per_segment_227881);\n        int64_t slice_227908 = l_n_m_196752;\n        int64_t slice_227909 = m_196691 * slice_227908;\n        int64_t gtid_213493 = squot64(sext_i32_i64(flat_segment_id_227906),\n                                      slice_227908);\n        int64_t remnant_227910 = sext_i32_i64(flat_segment_id_227906) -\n                gtid_213493 * slice_227908;\n        int64_t gtid_213494 = remnant_227910;\n        int64_t remnant_227911 = remnant_227910 - gtid_213494;\n        int64_t gtid_213495;\n        float x_acc_227912;\n        float x_acc_227913;\n        int64_t chunk_sizze_227914 = smin64(elements_per_thread_227882,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_227907,\n                                                      threads_per_segment_227885));\n        float x_213497;\n        float x_213498;\n        float x_213499;\n        float x_213500;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_227912 = 0.0F;\n            x_acc_227913 = 0.0F;\n        }\n        for (int64_t i_227921 = 0; i_227921 < chunk_sizze_227914; i_227921++) {\n            gtid_213495 = global_tid_227907 + threads_per_segment_227885 *\n                i_227921;\n            // apply map function\n            {\n                int64_t x_213511;\n                \n          ",
                   "      x_213511 = ((__global int64_t *) ext_mem_222469)[gtid_213493 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_213494];\n                \n                float x_213512;\n                \n                x_213512 = ((__global float *) ext_mem_222468)[gtid_213493 *\n                                                               l_n_m_196752 +\n                                                               gtid_213494];\n                \n                int64_t binop_y_221787 = mul64(jump_t_196702, gtid_213494);\n                int64_t binop_y_221788 = smin64(i_196779, binop_y_221787);\n                int64_t index_primexp_221789 = add64((int64_t) 1,\n                                                     binop_y_221788);\n                float a11_213514;\n                \n                a11_213514 = ((__global float *) mem_223746)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                float b11_213515;\n                \n                b11_213515 = ((__global float *) mem_223750)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                float c11_213516;\n                \n                c11_213516 = ((__global float *) mem_223754)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                bool cond_213518 = sle64(n_196692, gtid_213495);\n                int64_t defunc_0_f_res_213519;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213519 = (int64_t) 0;\n                } else {\n                    int64_t i_213520 = add",
                   "64(gtid_213495, x_213511);\n                    int64_t defunc_1_add_res_213521 = add64((int64_t) 1,\n                                                            i_213520);\n                    \n                    defunc_0_f_res_213519 = defunc_1_add_res_213521;\n                }\n                \n                float defunc_0_f_res_213522;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213522 = 0.0F;\n                } else {\n                    int64_t i_213523 = add64(gtid_213495, x_213511);\n                    float defunc_0_add_arg_213524;\n                    \n                    defunc_0_add_arg_213524 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_213493 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_213523 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_213522 = defunc_0_add_arg_213524;\n                }\n                \n                int64_t binop_p_213525 = sub64(defunc_0_f_res_213519,\n                                               index_primexp_221789);\n                float defunc_0_f_res_213526 = sitofp_i64_f32(binop_p_213525);\n                float abs_res_213527 = (float) fabs(defunc_0_f_res_213526);\n                float tmp1_213528 = abs_res_213527 / x_213512;\n                float x_213529 = tmp1_213528 * tmp1_213528;\n                float y_213530 = tmp1_213528 * x_213529;\n                float tmp2_213531 = 1.0F - y_213530;\n                float x_213532 = tmp2_213531 * tmp2_213531;\n                float tmp3_213533 = tmp2_213531 * x_213532;\n                float tmp4_213534 = defunc_0_f_res_213522 * tmp3_213533;\n                float defunc_1_f_res",
                   "_213535 = defunc_0_f_res_213526 *\n                      tmp4_213534;\n                float defunc_0_f_res_213536;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213536 = 0.0F;\n                } else {\n                    int64_t i_213537 = add64(gtid_213495, x_213511);\n                    float defunc_0_add_arg_213538;\n                    \n                    defunc_0_add_arg_213538 = ((__global\n                                                float *) mem_223608)[gtid_213493 *\n                                                                     n_196692 +\n                                                                     i_213537];\n                    defunc_0_f_res_213536 = defunc_0_add_arg_213538;\n                }\n                \n                float x_213539 = a11_213514 * tmp4_213534;\n                float y_213540 = b11_213515 * defunc_1_f_res_213535;\n                float x_213541 = x_213539 + y_213540;\n                float defunc_9_fit_fun_res_213542 = defunc_0_f_res_213536 *\n                      x_213541;\n                float x_213543 = b11_213515 * tmp4_213534;\n                float y_213544 = c11_213516 * defunc_1_f_res_213535;\n                float x_213545 = x_213543 + y_213544;\n                float defunc_9_slope_fun_res_213546 = defunc_0_f_res_213536 *\n                      x_213545;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_213497 = x_acc_227912;\n                    x_213498 = x_acc_227913;\n                }\n                // load new values\n                {\n                    x_213499 = defunc_9_fit_fun_res_213542;\n                    x_213500 = defunc_9_slope_fun_res_213546;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_213501 = x_213497 + x_213499;\n                    float defunc_1_op_res_213502 = x_213498 + x_21",
                   "3500;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_227912 = defunc_1_op_res_213501;\n                        x_acc_227913 = defunc_1_op_res_213502;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_213497 = x_acc_227912;\n            x_213498 = x_acc_227913;\n            ((__local\n              float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893)] =\n                x_213497;\n            ((__local\n              float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                x_213498;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_227922;\n        int32_t skip_waves_227923 = 1;\n        float x_227915;\n        float x_227916;\n        float x_227917;\n        float x_227918;\n        \n        offset_227922 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_227893,\n                      sext_i64_i32(segred_group_sizze_213488))) {\n                x_227915 = ((__local\n                             float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                          offset_227922)];\n                x_227916 = ((__local\n                             float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                          offset_227922)];\n            }\n        }\n        offset_227922 = 1;\n        while (slt32(offset_227922, wave_sizze_227895)) {\n            if (slt32(local_tid_227893 + offset_227922,\n                      sext_i64_i32(segred_group_sizze_213488)) &&\n                ((local_tid_227893 - squot32(local_tid_227893,\n                                             wave_sizze_227895) *\n                  wave_sizze_227895) & (2 * offset_227922 - 1)) == 0) {\n                // read array element\n       ",
                   "         {\n                    x_227917 = ((volatile __local\n                                 float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                              offset_227922)];\n                    x_227918 = ((volatile __local\n                                 float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                              offset_227922)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227919 = x_227915 + x_227917;\n                    float defunc_1_op_res_227920 = x_227916 + x_227918;\n                    \n                    x_227915 = defunc_1_op_res_227919;\n                    x_227916 = defunc_1_op_res_227920;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893)] =\n                        x_227915;\n                    ((volatile __local\n                      float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                        x_227916;\n                }\n            }\n            offset_227922 *= 2;\n        }\n        while (slt32(skip_waves_227923,\n                     squot32(sext_i64_i32(segred_group_sizze_213488) +\n                             wave_sizze_227895 - 1, wave_sizze_227895))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_227922 = skip_waves_227923 * wave_sizze_227895;\n            if (slt32(local_tid_227893 + offset_227922,\n                      sext_i64_i32(segred_group_sizze_213488)) &&\n                ((local_tid_227893 - squot32(local_tid_227893,\n                                             wave_sizze_227895) *\n                  wave_sizze_227895) == 0 && (squot32(local_tid_227893,\n                                                      wave_sizze_227895) & (2 *\n                  ",
                   "                                                          skip_waves_227923 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_227917 = ((__local\n                                 float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                              offset_227922)];\n                    x_227918 = ((__local\n                                 float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                              offset_227922)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_227919 = x_227915 + x_227917;\n                    float defunc_1_op_res_227920 = x_227916 + x_227918;\n                    \n                    x_227915 = defunc_1_op_res_227919;\n                    x_227916 = defunc_1_op_res_227920;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893)] =\n                        x_227915;\n                    ((__local\n                      float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                        x_227916;\n                }\n            }\n            skip_waves_227923 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_227893) == (int64_t) 0) {\n                x_acc_227912 = x_227915;\n                x_acc_227913 = x_227916;\n            }\n        }\n        if (groups_per_segment_227881 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_227893 == 0) {\n                    ((__global float *) mem_223759)[gtid_213493",
                   " * l_n_m_196752 +\n                                                    gtid_213494] = x_acc_227912;\n                    ((__global float *) mem_223763)[gtid_213493 * l_n_m_196752 +\n                                                    gtid_213494] = x_acc_227913;\n                }\n            }\n        } else {\n            int32_t old_counter_227924;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_227893 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_227886)[sext_i32_i64(virt_group_id_227905)] =\n                        x_acc_227912;\n                    ((__global\n                      float *) segred_tmp_mem_227888)[sext_i32_i64(virt_group_id_227905)] =\n                        x_acc_227913;\n                    mem_fence_global();\n                    old_counter_227924 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_227890)[sext_i32_i64(srem32(flat_segment_id_227906,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_227901)[(int64_t) 0] =\n                        old_counter_227924 == groups_per_segment_227881 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_227925;\n            \n            is_last_group_227925 = ((__local\n                                     bool *) sync_arr_mem_227901)[(int64_t) 0];\n            if (is_last_group_227925) {\n                if (local_tid_227893 == 0) {\n                    old_counter_227924 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_22",
                   "7890)[sext_i32_i64(srem32(flat_segment_id_227906,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_227881));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_227926 =\n                            sdiv_up64(groups_per_segment_227881,\n                                      segred_group_sizze_213488);\n                    \n                    x_213497 = 0.0F;\n                    x_213498 = 0.0F;\n                    for (int64_t i_227927 = 0; i_227927 <\n                         read_per_thread_227926; i_227927++) {\n                        int64_t group_res_id_227928 =\n                                sext_i32_i64(local_tid_227893) *\n                                read_per_thread_227926 + i_227927;\n                        int64_t index_of_group_res_227929 =\n                                sext_i32_i64(flat_segment_id_227906) *\n                                groups_per_segment_227881 + group_res_id_227928;\n                        \n                        if (slt64(group_res_id_227928,\n                                  groups_per_segment_227881)) {\n                            x_213499 = ((__global\n                                         float *) segred_tmp_mem_227886)[index_of_group_res_227929];\n                            x_213500 = ((__global\n                                         float *) segred_tmp_mem_227888)[index_of_group_res_227929];\n                            \n                            float defunc_1_op_res_213501 = x_213497 + x_213499;\n                            float defunc_1_op_res_213502 = x_213498 + x_213500;\n                            \n                            x_213497 = defunc_1_op_res_213501;\n                            x_213498 = defunc_1_op_res_213502;\n                ",
                   "        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893)] =\n                    x_213497;\n                ((__local\n                  float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                    x_213498;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_227930;\n                    int32_t skip_waves_227931 = 1;\n                    float x_227915;\n                    float x_227916;\n                    float x_227917;\n                    float x_227918;\n                    \n                    offset_227930 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_227893,\n                                  sext_i64_i32(segred_group_sizze_213488))) {\n                            x_227915 = ((__local\n                                         float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                                      offset_227930)];\n                            x_227916 = ((__local\n                                         float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                                      offset_227930)];\n                        }\n                    }\n                    offset_227930 = 1;\n                    while (slt32(offset_227930, wave_sizze_227895)) {\n                        if (slt32(local_tid_227893 + offset_227930,\n                                  sext_i64_i32(segred_group_sizze_213488)) &&\n                            ((local_tid_227893 - squot32(local_tid_227893,\n                                                         wave_sizze_227895) *\n                              wave_sizze_227895) & (2 * offset_227930 - 1)) ==\n                            0) {\n",
                   "                            // read array element\n                            {\n                                x_227917 = ((volatile __local\n                                             float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                                          offset_227930)];\n                                x_227918 = ((volatile __local\n                                             float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                                          offset_227930)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227919 = x_227915 +\n                                      x_227917;\n                                float defunc_1_op_res_227920 = x_227916 +\n                                      x_227918;\n                                \n                                x_227915 = defunc_1_op_res_227919;\n                                x_227916 = defunc_1_op_res_227920;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893)] =\n                                    x_227915;\n                                ((volatile __local\n                                  float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                                    x_227916;\n                            }\n                        }\n                        offset_227930 *= 2;\n                    }\n                    while (slt32(skip_waves_227931,\n                                 squot32(sext_i64_i32(segred_group_sizze_213488) +\n                                         wave_sizze_227895 - 1,\n                                         wave_si",
                   "zze_227895))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_227930 = skip_waves_227931 * wave_sizze_227895;\n                        if (slt32(local_tid_227893 + offset_227930,\n                                  sext_i64_i32(segred_group_sizze_213488)) &&\n                            ((local_tid_227893 - squot32(local_tid_227893,\n                                                         wave_sizze_227895) *\n                              wave_sizze_227895) == 0 &&\n                             (squot32(local_tid_227893, wave_sizze_227895) &\n                              (2 * skip_waves_227931 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_227917 = ((__local\n                                             float *) red_arr_mem_227897)[sext_i32_i64(local_tid_227893 +\n                                                                          offset_227930)];\n                                x_227918 = ((__local\n                                             float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893 +\n                                                                          offset_227930)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_227919 = x_227915 +\n                                      x_227917;\n                                float defunc_1_op_res_227920 = x_227916 +\n                                      x_227918;\n                                \n                                x_227915 = defunc_1_op_res_227919;\n                                x_227916 = defunc_1_op_res_227920;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_227897)[sext_i32_i64(local_t",
                   "id_227893)] =\n                                    x_227915;\n                                ((__local\n                                  float *) red_arr_mem_227899)[sext_i32_i64(local_tid_227893)] =\n                                    x_227916;\n                            }\n                        }\n                        skip_waves_227931 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_227893 == 0) {\n                            ((__global float *) mem_223759)[gtid_213493 *\n                                                            l_n_m_196752 +\n                                                            gtid_213494] =\n                                x_227915;\n                            ((__global float *) mem_223763)[gtid_213493 *\n                                                            l_n_m_196752 +\n                                                            gtid_213494] =\n                                x_227916;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_213488\n}\n__kernel void mainzisegred_large_214506(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228075_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228073_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228071_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228069_backing_aligned_3,\n                                        __local volatile\n                              ",
                   "          int64_t *red_arr_mem_228067_backing_aligned_4,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228065_backing_aligned_5,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_214496,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_228043,\n                                        int64_t elements_per_thread_228044,\n                                        int64_t virt_num_groups_228045,\n                                        int64_t threads_per_segment_228047,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223840,\n                                        __global unsigned char *mem_223844,\n                                        __global unsigned char *mem_223848,\n                                        __global unsigned char *mem_223852,\n                                        __global unsigned char *mem_223856,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228048,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228050,\n                            ",
                   "            __global\n                                        unsigned char *segred_tmp_mem_228052,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228054,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228056,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228058)\n{\n    #define segred_group_sizze_214495 (mainzisegred_group_sizze_214092)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228075_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228075_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228073_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228073_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228071_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228071_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_228069_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228069_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_228067_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228067_backing_aligned_4;\n    __local volatile unsigned char *restrict red_arr_mem_228065_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228065_backing_aligned_5;\n    \n    if (*global_failu",
                   "re >= 0)\n        return;\n    \n    int32_t global_tid_228060;\n    int32_t local_tid_228061;\n    int64_t group_sizze_228064;\n    int32_t wave_sizze_228063;\n    int32_t group_tid_228062;\n    \n    global_tid_228060 = get_global_id(0);\n    local_tid_228061 = get_local_id(0);\n    group_sizze_228064 = get_local_size(0);\n    wave_sizze_228063 = LOCKSTEP_WIDTH;\n    group_tid_228062 = get_group_id(0);\n    \n    int32_t phys_tid_214506 = global_tid_228060;\n    __local unsigned char *red_arr_mem_228065;\n    \n    red_arr_mem_228065 = (__local unsigned char *) red_arr_mem_228065_backing_0;\n    \n    __local unsigned char *red_arr_mem_228067;\n    \n    red_arr_mem_228067 = (__local unsigned char *) red_arr_mem_228067_backing_1;\n    \n    __local unsigned char *red_arr_mem_228069;\n    \n    red_arr_mem_228069 = (__local unsigned char *) red_arr_mem_228069_backing_2;\n    \n    __local unsigned char *red_arr_mem_228071;\n    \n    red_arr_mem_228071 = (__local unsigned char *) red_arr_mem_228071_backing_3;\n    \n    __local unsigned char *red_arr_mem_228073;\n    \n    red_arr_mem_228073 = (__local unsigned char *) red_arr_mem_228073_backing_4;\n    \n    __local unsigned char *sync_arr_mem_228075;\n    \n    sync_arr_mem_228075 = (__local\n                           unsigned char *) sync_arr_mem_228075_backing_5;\n    \n    int32_t phys_group_id_228077;\n    \n    phys_group_id_228077 = get_group_id(0);\n    for (int32_t i_228078 = 0; i_228078 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228045) - phys_group_id_228077,\n                   sext_i64_i32(num_groups_214496)); i_228078++) {\n        int32_t virt_group_id_228079 = phys_group_id_228077 + i_228078 *\n                sext_i64_i32(num_groups_214496);\n        int32_t flat_segment_id_228080 = squot32(virt_group_id_228079,\n                                                 sext_i64_i32(groups_per_segment_228043));\n        int64_t global_tid_228081 = srem64(sext_i32_i64(virt_group_id_228079) *\n                                           segred_group_s",
                   "izze_214495 +\n                                           sext_i32_i64(local_tid_228061),\n                                           segred_group_sizze_214495 *\n                                           groups_per_segment_228043);\n        int64_t slice_228082 = l_n_m_196752;\n        int64_t slice_228083 = m_196691 * slice_228082;\n        int64_t gtid_214503 = squot64(sext_i32_i64(flat_segment_id_228080),\n                                      slice_228082);\n        int64_t remnant_228084 = sext_i32_i64(flat_segment_id_228080) -\n                gtid_214503 * slice_228082;\n        int64_t gtid_214504 = remnant_228084;\n        int64_t remnant_228085 = remnant_228084 - gtid_214504;\n        int64_t gtid_214505;\n        float x_acc_228086;\n        float x_acc_228087;\n        float x_acc_228088;\n        float x_acc_228089;\n        float x_acc_228090;\n        int64_t chunk_sizze_228091 = smin64(elements_per_thread_228044,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228081,\n                                                      threads_per_segment_228047));\n        float x_214507;\n        float x_214508;\n        float x_214509;\n        float x_214510;\n        float x_214511;\n        float x_214512;\n        float x_214513;\n        float x_214514;\n        float x_214515;\n        float x_214516;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228086 = 0.0F;\n            x_acc_228087 = 0.0F;\n            x_acc_228088 = 0.0F;\n            x_acc_228089 = 0.0F;\n            x_acc_228090 = 0.0F;\n        }\n        for (int64_t i_228107 = 0; i_228107 < chunk_sizze_228091; i_228107++) {\n            gtid_214505 = global_tid_228081 + threads_per_segment_228047 *\n                i_228107;\n            // apply map function\n            {\n                int64_t x_214526;\n                \n                x_214526 = ((__global int64_t *) ext_mem_222469)[gtid_214503 *\n         ",
                   "                                                        l_n_m_196752 +\n                                                                 gtid_214504];\n                \n                float x_214527;\n                \n                x_214527 = ((__global float *) ext_mem_222468)[gtid_214503 *\n                                                               l_n_m_196752 +\n                                                               gtid_214504];\n                \n                int64_t binop_y_221802 = mul64(jump_t_196702, gtid_214504);\n                int64_t binop_y_221803 = smin64(i_196779, binop_y_221802);\n                int64_t index_primexp_221804 = add64((int64_t) 1,\n                                                     binop_y_221803);\n                bool cond_214530 = sle64(n_196692, gtid_214505);\n                int64_t defunc_0_f_res_214531;\n                \n                if (cond_214530) {\n                    defunc_0_f_res_214531 = (int64_t) 0;\n                } else {\n                    int64_t i_214532 = add64(gtid_214505, x_214526);\n                    int64_t defunc_1_add_res_214533 = add64((int64_t) 1,\n                                                            i_214532);\n                    \n                    defunc_0_f_res_214531 = defunc_1_add_res_214533;\n                }\n                \n                float defunc_0_f_res_214534;\n                \n                if (cond_214530) {\n                    defunc_0_f_res_214534 = 0.0F;\n                } else {\n                    int64_t i_214535 = add64(gtid_214505, x_214526);\n                    float defunc_0_add_arg_214536;\n                    \n                    defunc_0_add_arg_214536 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_214503 *\n                                                                            ctx_param_ext_222546 +\n       ",
                   "                                                                     i_214535 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_214534 = defunc_0_add_arg_214536;\n                }\n                \n                int64_t binop_p_214537 = sub64(defunc_0_f_res_214531,\n                                               index_primexp_221804);\n                float defunc_0_f_res_214538 = sitofp_i64_f32(binop_p_214537);\n                float abs_res_214539 = (float) fabs(defunc_0_f_res_214538);\n                float tmp1_214540 = abs_res_214539 / x_214527;\n                float x_214541 = tmp1_214540 * tmp1_214540;\n                float y_214542 = tmp1_214540 * x_214541;\n                float tmp2_214543 = 1.0F - y_214542;\n                float x_214544 = tmp2_214543 * tmp2_214543;\n                float tmp3_214545 = tmp2_214543 * x_214544;\n                float w_j_214546 = defunc_0_f_res_214534 * tmp3_214545;\n                float xw_j_214547 = defunc_0_f_res_214538 * w_j_214546;\n                float x2w_j_214548 = defunc_0_f_res_214538 * xw_j_214547;\n                float x3w_j_214549 = defunc_0_f_res_214538 * x2w_j_214548;\n                float x4w_j_214550 = defunc_0_f_res_214538 * x3w_j_214549;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_214507 = x_acc_228086;\n                    x_214508 = x_acc_228087;\n                    x_214509 = x_acc_228088;\n                    x_214510 = x_acc_228089;\n                    x_214511 = x_acc_228090;\n                }\n                // load new values\n                {\n                    x_214512 = w_j_214546;\n                    x_214513 = xw_j_214547;\n                    x_214514 = x2w_j_214548;\n                    x_214515 = x3w_j_214549;\n                    x_214516 = x4w_j_214550;\n                }\n                // apply reduction",
                   " operator\n                {\n                    float defunc_1_op_res_214517 = x_214507 + x_214512;\n                    float defunc_1_op_res_214518 = x_214508 + x_214513;\n                    float defunc_1_op_res_214519 = x_214509 + x_214514;\n                    float defunc_1_op_res_214520 = x_214510 + x_214515;\n                    float defunc_1_op_res_214521 = x_214511 + x_214516;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228086 = defunc_1_op_res_214517;\n                        x_acc_228087 = defunc_1_op_res_214518;\n                        x_acc_228088 = defunc_1_op_res_214519;\n                        x_acc_228089 = defunc_1_op_res_214520;\n                        x_acc_228090 = defunc_1_op_res_214521;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_214507 = x_acc_228086;\n            x_214508 = x_acc_228087;\n            x_214509 = x_acc_228088;\n            x_214510 = x_acc_228089;\n            x_214511 = x_acc_228090;\n            ((__local\n              float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                x_214507;\n            ((__local\n              float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061)] =\n                x_214508;\n            ((__local\n              float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                x_214509;\n            ((__local\n              float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061)] =\n                x_214510;\n            ((__local\n              float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                x_214511;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228108;\n        int32_t skip_waves_228109 = 1;\n        float x_228092;\n        float x_228093;\n        float x_228094;\n        float x_228095;\n        float x_228096;\n        fl",
                   "oat x_228097;\n        float x_228098;\n        float x_228099;\n        float x_228100;\n        float x_228101;\n        \n        offset_228108 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228061,\n                      sext_i64_i32(segred_group_sizze_214495))) {\n                x_228092 = ((__local\n                             float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                                          offset_228108)];\n                x_228093 = ((__local\n                             float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                          offset_228108)];\n                x_228094 = ((__local\n                             float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                          offset_228108)];\n                x_228095 = ((__local\n                             float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                          offset_228108)];\n                x_228096 = ((__local\n                             float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061 +\n                                                          offset_228108)];\n            }\n        }\n        offset_228108 = 1;\n        while (slt32(offset_228108, wave_sizze_228063)) {\n            if (slt32(local_tid_228061 + offset_228108,\n                      sext_i64_i32(segred_group_sizze_214495)) &&\n                ((local_tid_228061 - squot32(local_tid_228061,\n                                             wave_sizze_228063) *\n                  wave_sizze_228063) & (2 * offset_228108 - 1)) == 0) {\n                // read array element\n                {\n                    x_228097 = ((volatile __local\n                                 float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                      ",
                   "                        offset_228108)];\n                    x_228098 = ((volatile __local\n                                 float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228099 = ((volatile __local\n                                 float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228100 = ((volatile __local\n                                 float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228101 = ((volatile __local\n                                 float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228102 = x_228092 + x_228097;\n                    float defunc_1_op_res_228103 = x_228093 + x_228098;\n                    float defunc_1_op_res_228104 = x_228094 + x_228099;\n                    float defunc_1_op_res_228105 = x_228095 + x_228100;\n                    float defunc_1_op_res_228106 = x_228096 + x_228101;\n                    \n                    x_228092 = defunc_1_op_res_228102;\n                    x_228093 = defunc_1_op_res_228103;\n                    x_228094 = defunc_1_op_res_228104;\n                    x_228095 = defunc_1_op_res_228105;\n                    x_228096 = defunc_1_op_res_228106;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                        x_228092;\n                    ((volatile __local\n                      float *) red_arr_mem_228067)[s",
                   "ext_i32_i64(local_tid_228061)] =\n                        x_228093;\n                    ((volatile __local\n                      float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                        x_228094;\n                    ((volatile __local\n                      float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061)] =\n                        x_228095;\n                    ((volatile __local\n                      float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                        x_228096;\n                }\n            }\n            offset_228108 *= 2;\n        }\n        while (slt32(skip_waves_228109,\n                     squot32(sext_i64_i32(segred_group_sizze_214495) +\n                             wave_sizze_228063 - 1, wave_sizze_228063))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228108 = skip_waves_228109 * wave_sizze_228063;\n            if (slt32(local_tid_228061 + offset_228108,\n                      sext_i64_i32(segred_group_sizze_214495)) &&\n                ((local_tid_228061 - squot32(local_tid_228061,\n                                             wave_sizze_228063) *\n                  wave_sizze_228063) == 0 && (squot32(local_tid_228061,\n                                                      wave_sizze_228063) & (2 *\n                                                                            skip_waves_228109 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228097 = ((__local\n                                 float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228098 = ((__local\n                                 float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n ",
                   "                   x_228099 = ((__local\n                                 float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228100 = ((__local\n                                 float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                    x_228101 = ((__local\n                                 float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061 +\n                                                              offset_228108)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228102 = x_228092 + x_228097;\n                    float defunc_1_op_res_228103 = x_228093 + x_228098;\n                    float defunc_1_op_res_228104 = x_228094 + x_228099;\n                    float defunc_1_op_res_228105 = x_228095 + x_228100;\n                    float defunc_1_op_res_228106 = x_228096 + x_228101;\n                    \n                    x_228092 = defunc_1_op_res_228102;\n                    x_228093 = defunc_1_op_res_228103;\n                    x_228094 = defunc_1_op_res_228104;\n                    x_228095 = defunc_1_op_res_228105;\n                    x_228096 = defunc_1_op_res_228106;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                        x_228092;\n                    ((__local\n                      float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061)] =\n                        x_228093;\n                    ((__local\n                      float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                        x_228094;\n                    ((__local\n                      float *) red_arr_mem_228071)[sext_i32_i64(",
                   "local_tid_228061)] =\n                        x_228095;\n                    ((__local\n                      float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                        x_228096;\n                }\n            }\n            skip_waves_228109 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228061) == (int64_t) 0) {\n                x_acc_228086 = x_228092;\n                x_acc_228087 = x_228093;\n                x_acc_228088 = x_228094;\n                x_acc_228089 = x_228095;\n                x_acc_228090 = x_228096;\n            }\n        }\n        if (groups_per_segment_228043 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228061 == 0) {\n                    ((__global float *) mem_223840)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228086;\n                    ((__global float *) mem_223844)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228087;\n                    ((__global float *) mem_223848)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228088;\n                    ((__global float *) mem_223852)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228089;\n                    ((__global float *) mem_223856)[gtid_214503 * l_n_m_196752 +\n                                                    gtid_214504] = x_acc_228090;\n                }\n            }\n        } else {\n            int32_t old_counter_228110;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228061 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228048)[sext_i32_i",
                   "64(virt_group_id_228079)] =\n                        x_acc_228086;\n                    ((__global\n                      float *) segred_tmp_mem_228050)[sext_i32_i64(virt_group_id_228079)] =\n                        x_acc_228087;\n                    ((__global\n                      float *) segred_tmp_mem_228052)[sext_i32_i64(virt_group_id_228079)] =\n                        x_acc_228088;\n                    ((__global\n                      float *) segred_tmp_mem_228054)[sext_i32_i64(virt_group_id_228079)] =\n                        x_acc_228089;\n                    ((__global\n                      float *) segred_tmp_mem_228056)[sext_i32_i64(virt_group_id_228079)] =\n                        x_acc_228090;\n                    mem_fence_global();\n                    old_counter_228110 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228058)[sext_i32_i64(srem32(flat_segment_id_228080,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228075)[(int64_t) 0] =\n                        old_counter_228110 == groups_per_segment_228043 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228111;\n            \n            is_last_group_228111 = ((__local\n                                     bool *) sync_arr_mem_228075)[(int64_t) 0];\n            if (is_last_group_228111) {\n                if (local_tid_228061 == 0) {\n                    old_counter_228110 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228058)[sext_i32_i64(srem32(flat_segment_id_228080,\n                                                         ",
                   "                                             10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228043));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228112 =\n                            sdiv_up64(groups_per_segment_228043,\n                                      segred_group_sizze_214495);\n                    \n                    x_214507 = 0.0F;\n                    x_214508 = 0.0F;\n                    x_214509 = 0.0F;\n                    x_214510 = 0.0F;\n                    x_214511 = 0.0F;\n                    for (int64_t i_228113 = 0; i_228113 <\n                         read_per_thread_228112; i_228113++) {\n                        int64_t group_res_id_228114 =\n                                sext_i32_i64(local_tid_228061) *\n                                read_per_thread_228112 + i_228113;\n                        int64_t index_of_group_res_228115 =\n                                sext_i32_i64(flat_segment_id_228080) *\n                                groups_per_segment_228043 + group_res_id_228114;\n                        \n                        if (slt64(group_res_id_228114,\n                                  groups_per_segment_228043)) {\n                            x_214512 = ((__global\n                                         float *) segred_tmp_mem_228048)[index_of_group_res_228115];\n                            x_214513 = ((__global\n                                         float *) segred_tmp_mem_228050)[index_of_group_res_228115];\n                            x_214514 = ((__global\n                                         float *) segred_tmp_mem_228052)[index_of_group_res_228115];\n                            x_214515 = ((__global\n                                         float *) segred_tmp_mem_228054)[index_of_group_res_228115];\n                            x_214516 = ((__global\n    ",
                   "                                     float *) segred_tmp_mem_228056)[index_of_group_res_228115];\n                            \n                            float defunc_1_op_res_214517 = x_214507 + x_214512;\n                            float defunc_1_op_res_214518 = x_214508 + x_214513;\n                            float defunc_1_op_res_214519 = x_214509 + x_214514;\n                            float defunc_1_op_res_214520 = x_214510 + x_214515;\n                            float defunc_1_op_res_214521 = x_214511 + x_214516;\n                            \n                            x_214507 = defunc_1_op_res_214517;\n                            x_214508 = defunc_1_op_res_214518;\n                            x_214509 = defunc_1_op_res_214519;\n                            x_214510 = defunc_1_op_res_214520;\n                            x_214511 = defunc_1_op_res_214521;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                    x_214507;\n                ((__local\n                  float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061)] =\n                    x_214508;\n                ((__local\n                  float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                    x_214509;\n                ((__local\n                  float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061)] =\n                    x_214510;\n                ((__local\n                  float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                    x_214511;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228116;\n                    int32_t skip_waves_228117 = 1;\n                    float x_228092;\n                    float x_228093;\n                    float x_228094;\n                    float x_228095;\n                    float x_2",
                   "28096;\n                    float x_228097;\n                    float x_228098;\n                    float x_228099;\n                    float x_228100;\n                    float x_228101;\n                    \n                    offset_228116 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228061,\n                                  sext_i64_i32(segred_group_sizze_214495))) {\n                            x_228092 = ((__local\n                                         float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                                                      offset_228116)];\n                            x_228093 = ((__local\n                                         float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                                      offset_228116)];\n                            x_228094 = ((__local\n                                         float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                                      offset_228116)];\n                            x_228095 = ((__local\n                                         float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                                      offset_228116)];\n                            x_228096 = ((__local\n                                         float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061 +\n                                                                      offset_228116)];\n                        }\n                    }\n                    offset_228116 = 1;\n                    while (slt32(offset_228116, wave_sizze_228063)) {\n                        if (slt32(local_tid_228061 + offset_228116,\n                                  sext_i64_i32(segred_group_sizze_214495)) &&\n                            ((local_ti",
                   "d_228061 - squot32(local_tid_228061,\n                                                         wave_sizze_228063) *\n                              wave_sizze_228063) & (2 * offset_228116 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228097 = ((volatile __local\n                                             float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228098 = ((volatile __local\n                                             float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228099 = ((volatile __local\n                                             float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228100 = ((volatile __local\n                                             float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228101 = ((volatile __local\n                                             float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228102 = x_228092 +\n                                      x_228097;\n                                float defunc_1_op_res_228103 = x_228093 +\n                                      x_228098;\n                                float",
                   " defunc_1_op_res_228104 = x_228094 +\n                                      x_228099;\n                                float defunc_1_op_res_228105 = x_228095 +\n                                      x_228100;\n                                float defunc_1_op_res_228106 = x_228096 +\n                                      x_228101;\n                                \n                                x_228092 = defunc_1_op_res_228102;\n                                x_228093 = defunc_1_op_res_228103;\n                                x_228094 = defunc_1_op_res_228104;\n                                x_228095 = defunc_1_op_res_228105;\n                                x_228096 = defunc_1_op_res_228106;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                                    x_228092;\n                                ((volatile __local\n                                  float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061)] =\n                                    x_228093;\n                                ((volatile __local\n                                  float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                                    x_228094;\n                                ((volatile __local\n                                  float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061)] =\n                                    x_228095;\n                                ((volatile __local\n                                  float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                                    x_228096;\n                            }\n                        }\n                        offset_228116 *= 2;\n                    }\n                    while (slt32(skip_waves_228117,\n                                 squot32(s",
                   "ext_i64_i32(segred_group_sizze_214495) +\n                                         wave_sizze_228063 - 1,\n                                         wave_sizze_228063))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228116 = skip_waves_228117 * wave_sizze_228063;\n                        if (slt32(local_tid_228061 + offset_228116,\n                                  sext_i64_i32(segred_group_sizze_214495)) &&\n                            ((local_tid_228061 - squot32(local_tid_228061,\n                                                         wave_sizze_228063) *\n                              wave_sizze_228063) == 0 &&\n                             (squot32(local_tid_228061, wave_sizze_228063) &\n                              (2 * skip_waves_228117 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228097 = ((__local\n                                             float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228098 = ((__local\n                                             float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228099 = ((__local\n                                             float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228100 = ((__local\n                                             float *) red_arr_mem_228071)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                                x_228101 = ((__local\n                                             float *) red_arr_me",
                   "m_228073)[sext_i32_i64(local_tid_228061 +\n                                                                          offset_228116)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228102 = x_228092 +\n                                      x_228097;\n                                float defunc_1_op_res_228103 = x_228093 +\n                                      x_228098;\n                                float defunc_1_op_res_228104 = x_228094 +\n                                      x_228099;\n                                float defunc_1_op_res_228105 = x_228095 +\n                                      x_228100;\n                                float defunc_1_op_res_228106 = x_228096 +\n                                      x_228101;\n                                \n                                x_228092 = defunc_1_op_res_228102;\n                                x_228093 = defunc_1_op_res_228103;\n                                x_228094 = defunc_1_op_res_228104;\n                                x_228095 = defunc_1_op_res_228105;\n                                x_228096 = defunc_1_op_res_228106;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228065)[sext_i32_i64(local_tid_228061)] =\n                                    x_228092;\n                                ((__local\n                                  float *) red_arr_mem_228067)[sext_i32_i64(local_tid_228061)] =\n                                    x_228093;\n                                ((__local\n                                  float *) red_arr_mem_228069)[sext_i32_i64(local_tid_228061)] =\n                                    x_228094;\n                                ((__local\n                                  float *) red_arr_mem_228",
                   "071)[sext_i32_i64(local_tid_228061)] =\n                                    x_228095;\n                                ((__local\n                                  float *) red_arr_mem_228073)[sext_i32_i64(local_tid_228061)] =\n                                    x_228096;\n                            }\n                        }\n                        skip_waves_228117 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228061 == 0) {\n                            ((__global float *) mem_223840)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228092;\n                            ((__global float *) mem_223844)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228093;\n                            ((__global float *) mem_223848)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228094;\n                            ((__global float *) mem_223852)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228095;\n                            ((__global float *) mem_223856)[gtid_214503 *\n                                                            l_n_m_196752 +\n                                                            gtid_214504] =\n                                x_228096;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LO",
                   "CAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_214495\n}\n__kernel void mainzisegred_large_214604(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228183_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228181_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228179_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_214597,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t groups_per_segment_228163,\n                                        int64_t elements_per_thread_228164,\n                                        int64_t virt_num_groups_228165,\n                                        int64_t threads_per_segment_228167,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223861,\n                                        __global unsigned char *mem_223865,\n                                        __g",
                   "lobal unsigned char *mem_223869,\n                                        __global unsigned char *mem_223873,\n                                        __global unsigned char *mem_223877,\n                                        __global unsigned char *mem_223882,\n                                        __global unsigned char *mem_223886,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228168,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228170,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228172)\n{\n    #define segred_group_sizze_214596 (mainzisegred_group_sizze_213966)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228183_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228183_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228181_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228181_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228179_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228179_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228174;\n    int32_t local_tid_228175;\n    int64_t group_sizze_228178;\n    int32_t wave_sizze_228177;\n    int32_t group_tid_228176;\n    \n    global_tid_228174 = get_global_id(0);\n    local_tid_228175 = get_local_id(0);\n    group_sizze_228178 = get_local_size(0);\n    wave_sizze_228177 = LOCKSTEP_WIDTH;\n    group_tid_228176 = get_group_id(0);\n    \n    int32_t phys_tid_2",
                   "14604 = global_tid_228174;\n    __local unsigned char *red_arr_mem_228179;\n    \n    red_arr_mem_228179 = (__local unsigned char *) red_arr_mem_228179_backing_0;\n    \n    __local unsigned char *red_arr_mem_228181;\n    \n    red_arr_mem_228181 = (__local unsigned char *) red_arr_mem_228181_backing_1;\n    \n    __local unsigned char *sync_arr_mem_228183;\n    \n    sync_arr_mem_228183 = (__local\n                           unsigned char *) sync_arr_mem_228183_backing_2;\n    \n    int32_t phys_group_id_228185;\n    \n    phys_group_id_228185 = get_group_id(0);\n    for (int32_t i_228186 = 0; i_228186 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228165) - phys_group_id_228185,\n                   sext_i64_i32(num_groups_214597)); i_228186++) {\n        int32_t virt_group_id_228187 = phys_group_id_228185 + i_228186 *\n                sext_i64_i32(num_groups_214597);\n        int32_t flat_segment_id_228188 = squot32(virt_group_id_228187,\n                                                 sext_i64_i32(groups_per_segment_228163));\n        int64_t global_tid_228189 = srem64(sext_i32_i64(virt_group_id_228187) *\n                                           segred_group_sizze_214596 +\n                                           sext_i32_i64(local_tid_228175),\n                                           segred_group_sizze_214596 *\n                                           groups_per_segment_228163);\n        int64_t slice_228190 = l_n_m_196752;\n        int64_t slice_228191 = m_196691 * slice_228190;\n        int64_t gtid_214601 = squot64(sext_i32_i64(flat_segment_id_228188),\n                                      slice_228190);\n        int64_t remnant_228192 = sext_i32_i64(flat_segment_id_228188) -\n                gtid_214601 * slice_228190;\n        int64_t gtid_214602 = remnant_228192;\n        int64_t remnant_228193 = remnant_228192 - gtid_214602;\n        int64_t gtid_214603;\n        float x_acc_228194;\n        float x_acc_228195;\n        int64_t chunk_sizze_228196 = smin64(elements_per_thread_2",
                   "28164,\n                                            sdiv_up64(q_l_196697 -\n                                                      global_tid_228189,\n                                                      threads_per_segment_228167));\n        float x_214605;\n        float x_214606;\n        float x_214607;\n        float x_214608;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228194 = 0.0F;\n            x_acc_228195 = 0.0F;\n        }\n        for (int64_t i_228203 = 0; i_228203 < chunk_sizze_228196; i_228203++) {\n            gtid_214603 = global_tid_228189 + threads_per_segment_228167 *\n                i_228203;\n            // apply map function\n            {\n                int64_t x_214621;\n                \n                x_214621 = ((__global int64_t *) ext_mem_222469)[gtid_214601 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_214602];\n                \n                float x_214622;\n                \n                x_214622 = ((__global float *) ext_mem_222468)[gtid_214601 *\n                                                               l_n_m_196752 +\n                                                               gtid_214602];\n                \n                int64_t binop_y_221797 = mul64(jump_t_196702, gtid_214602);\n                int64_t binop_y_221798 = smin64(i_196779, binop_y_221797);\n                int64_t index_primexp_221799 = add64((int64_t) 1,\n                                                     binop_y_221798);\n                float a12_214624;\n                \n                a12_214624 = ((__global float *) mem_223861)[gtid_214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float b12_214625;\n                \n                b12_214625 = ((__global float *) mem_223865)[gtid_",
                   "214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float c12_214626;\n                \n                c12_214626 = ((__global float *) mem_223869)[gtid_214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float b2_214627;\n                \n                b2_214627 = ((__global float *) mem_223873)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602];\n                \n                float c2_214628;\n                \n                c2_214628 = ((__global float *) mem_223877)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602];\n                \n                bool cond_214630 = sle64(n_196692, gtid_214603);\n                int64_t defunc_0_f_res_214631;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214631 = (int64_t) 0;\n                } else {\n                    int64_t i_214632 = add64(gtid_214603, x_214621);\n                    int64_t defunc_1_add_res_214633 = add64((int64_t) 1,\n                                                            i_214632);\n                    \n                    defunc_0_f_res_214631 = defunc_1_add_res_214633;\n                }\n                \n                float defunc_0_f_res_214634;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214634 = 0.0F;\n                } else {\n                    int64_t i_214635 = add64(gtid_214603, x_214621);\n                    float defunc_0_add_arg_214636;\n                    \n                    defunc_0_add_arg_214636 = ((__gl",
                   "obal\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_214601 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_214635 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_214634 = defunc_0_add_arg_214636;\n                }\n                \n                int64_t binop_p_214637 = sub64(defunc_0_f_res_214631,\n                                               index_primexp_221799);\n                float defunc_0_f_res_214638 = sitofp_i64_f32(binop_p_214637);\n                float abs_res_214639 = (float) fabs(defunc_0_f_res_214638);\n                float tmp1_214640 = abs_res_214639 / x_214622;\n                float x_214641 = tmp1_214640 * tmp1_214640;\n                float y_214642 = tmp1_214640 * x_214641;\n                float tmp2_214643 = 1.0F - y_214642;\n                float x_214644 = tmp2_214643 * tmp2_214643;\n                float tmp3_214645 = tmp2_214643 * x_214644;\n                float tmp4_214646 = defunc_0_f_res_214634 * tmp3_214645;\n                float defunc_1_f_res_214647 = defunc_0_f_res_214638 *\n                      tmp4_214646;\n                float defunc_1_f_res_214648 = defunc_0_f_res_214638 *\n                      defunc_1_f_res_214647;\n                float defunc_0_f_res_214649;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214649 = 0.0F;\n                } else {\n                    int64_t i_214650 = add64(gtid_214603, x_214621);\n                    float defunc_0_add_arg_214651;\n                    \n                    defunc_0_add_arg_214651 = ((__global\n                                                float *) mem_223608)[gtid_214601 *\n                        ",
                   "                                             n_196692 +\n                                                                     i_214650];\n                    defunc_0_f_res_214649 = defunc_0_add_arg_214651;\n                }\n                \n                float x_214652 = a12_214624 * tmp4_214646;\n                float y_214653 = b12_214625 * defunc_1_f_res_214647;\n                float x_214654 = x_214652 + y_214653;\n                float y_214655 = c12_214626 * defunc_1_f_res_214648;\n                float x_214656 = x_214654 + y_214655;\n                float defunc_9_fit_fun_res_214657 = defunc_0_f_res_214649 *\n                      x_214656;\n                float x_214658 = b12_214625 * tmp4_214646;\n                float y_214659 = b2_214627 * defunc_1_f_res_214647;\n                float x_214660 = x_214658 + y_214659;\n                float y_214661 = c2_214628 * defunc_1_f_res_214648;\n                float x_214662 = x_214660 + y_214661;\n                float defunc_9_slope_fun_res_214663 = defunc_0_f_res_214649 *\n                      x_214662;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_214605 = x_acc_228194;\n                    x_214606 = x_acc_228195;\n                }\n                // load new values\n                {\n                    x_214607 = defunc_9_fit_fun_res_214657;\n                    x_214608 = defunc_9_slope_fun_res_214663;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_214609 = x_214605 + x_214607;\n                    float defunc_1_op_res_214610 = x_214606 + x_214608;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228194 = defunc_1_op_res_214609;\n                        x_acc_228195 = defunc_1_op_res_214610;\n                    }\n                }\n            }\n        }\n        // to reduc",
                   "e current chunk, first store our result in memory\n        {\n            x_214605 = x_acc_228194;\n            x_214606 = x_acc_228195;\n            ((__local\n              float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                x_214605;\n            ((__local\n              float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n                x_214606;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228204;\n        int32_t skip_waves_228205 = 1;\n        float x_228197;\n        float x_228198;\n        float x_228199;\n        float x_228200;\n        \n        offset_228204 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228175,\n                      sext_i64_i32(segred_group_sizze_214596))) {\n                x_228197 = ((__local\n                             float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                          offset_228204)];\n                x_228198 = ((__local\n                             float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                          offset_228204)];\n            }\n        }\n        offset_228204 = 1;\n        while (slt32(offset_228204, wave_sizze_228177)) {\n            if (slt32(local_tid_228175 + offset_228204,\n                      sext_i64_i32(segred_group_sizze_214596)) &&\n                ((local_tid_228175 - squot32(local_tid_228175,\n                                             wave_sizze_228177) *\n                  wave_sizze_228177) & (2 * offset_228204 - 1)) == 0) {\n                // read array element\n                {\n                    x_228199 = ((volatile __local\n                                 float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                              offset_228204)];\n                    x_228200 = ((volatile __local\n                  ",
                   "               float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                              offset_228204)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228201 = x_228197 + x_228199;\n                    float defunc_1_op_res_228202 = x_228198 + x_228200;\n                    \n                    x_228197 = defunc_1_op_res_228201;\n                    x_228198 = defunc_1_op_res_228202;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                        x_228197;\n                    ((volatile __local\n                      float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n                        x_228198;\n                }\n            }\n            offset_228204 *= 2;\n        }\n        while (slt32(skip_waves_228205,\n                     squot32(sext_i64_i32(segred_group_sizze_214596) +\n                             wave_sizze_228177 - 1, wave_sizze_228177))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228204 = skip_waves_228205 * wave_sizze_228177;\n            if (slt32(local_tid_228175 + offset_228204,\n                      sext_i64_i32(segred_group_sizze_214596)) &&\n                ((local_tid_228175 - squot32(local_tid_228175,\n                                             wave_sizze_228177) *\n                  wave_sizze_228177) == 0 && (squot32(local_tid_228175,\n                                                      wave_sizze_228177) & (2 *\n                                                                            skip_waves_228205 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228199 = ((__local\n                     ",
                   "            float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                              offset_228204)];\n                    x_228200 = ((__local\n                                 float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                              offset_228204)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228201 = x_228197 + x_228199;\n                    float defunc_1_op_res_228202 = x_228198 + x_228200;\n                    \n                    x_228197 = defunc_1_op_res_228201;\n                    x_228198 = defunc_1_op_res_228202;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                        x_228197;\n                    ((__local\n                      float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n                        x_228198;\n                }\n            }\n            skip_waves_228205 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228175) == (int64_t) 0) {\n                x_acc_228194 = x_228197;\n                x_acc_228195 = x_228198;\n            }\n        }\n        if (groups_per_segment_228163 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228175 == 0) {\n                    ((__global float *) mem_223882)[gtid_214601 * l_n_m_196752 +\n                                                    gtid_214602] = x_acc_228194;\n                    ((__global float *) mem_223886)[gtid_214601 * l_n_m_196752 +\n                                                    gtid_214602] = x_acc_228195;\n                }\n            }\n        }",
                   " else {\n            int32_t old_counter_228206;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228175 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228168)[sext_i32_i64(virt_group_id_228187)] =\n                        x_acc_228194;\n                    ((__global\n                      float *) segred_tmp_mem_228170)[sext_i32_i64(virt_group_id_228187)] =\n                        x_acc_228195;\n                    mem_fence_global();\n                    old_counter_228206 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228172)[sext_i32_i64(srem32(flat_segment_id_228188,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228183)[(int64_t) 0] =\n                        old_counter_228206 == groups_per_segment_228163 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228207;\n            \n            is_last_group_228207 = ((__local\n                                     bool *) sync_arr_mem_228183)[(int64_t) 0];\n            if (is_last_group_228207) {\n                if (local_tid_228175 == 0) {\n                    old_counter_228206 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228172)[sext_i32_i64(srem32(flat_segment_id_228188,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_2",
                   "28163));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228208 =\n                            sdiv_up64(groups_per_segment_228163,\n                                      segred_group_sizze_214596);\n                    \n                    x_214605 = 0.0F;\n                    x_214606 = 0.0F;\n                    for (int64_t i_228209 = 0; i_228209 <\n                         read_per_thread_228208; i_228209++) {\n                        int64_t group_res_id_228210 =\n                                sext_i32_i64(local_tid_228175) *\n                                read_per_thread_228208 + i_228209;\n                        int64_t index_of_group_res_228211 =\n                                sext_i32_i64(flat_segment_id_228188) *\n                                groups_per_segment_228163 + group_res_id_228210;\n                        \n                        if (slt64(group_res_id_228210,\n                                  groups_per_segment_228163)) {\n                            x_214607 = ((__global\n                                         float *) segred_tmp_mem_228168)[index_of_group_res_228211];\n                            x_214608 = ((__global\n                                         float *) segred_tmp_mem_228170)[index_of_group_res_228211];\n                            \n                            float defunc_1_op_res_214609 = x_214605 + x_214607;\n                            float defunc_1_op_res_214610 = x_214606 + x_214608;\n                            \n                            x_214605 = defunc_1_op_res_214609;\n                            x_214606 = defunc_1_op_res_214610;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                    x_214605;\n                ((__local\n                  float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n        ",
                   "            x_214606;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228212;\n                    int32_t skip_waves_228213 = 1;\n                    float x_228197;\n                    float x_228198;\n                    float x_228199;\n                    float x_228200;\n                    \n                    offset_228212 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228175,\n                                  sext_i64_i32(segred_group_sizze_214596))) {\n                            x_228197 = ((__local\n                                         float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                                      offset_228212)];\n                            x_228198 = ((__local\n                                         float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                                      offset_228212)];\n                        }\n                    }\n                    offset_228212 = 1;\n                    while (slt32(offset_228212, wave_sizze_228177)) {\n                        if (slt32(local_tid_228175 + offset_228212,\n                                  sext_i64_i32(segred_group_sizze_214596)) &&\n                            ((local_tid_228175 - squot32(local_tid_228175,\n                                                         wave_sizze_228177) *\n                              wave_sizze_228177) & (2 * offset_228212 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228199 = ((volatile __local\n                                             float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                      ",
                   "                    offset_228212)];\n                                x_228200 = ((volatile __local\n                                             float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                                          offset_228212)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228201 = x_228197 +\n                                      x_228199;\n                                float defunc_1_op_res_228202 = x_228198 +\n                                      x_228200;\n                                \n                                x_228197 = defunc_1_op_res_228201;\n                                x_228198 = defunc_1_op_res_228202;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                                    x_228197;\n                                ((volatile __local\n                                  float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n                                    x_228198;\n                            }\n                        }\n                        offset_228212 *= 2;\n                    }\n                    while (slt32(skip_waves_228213,\n                                 squot32(sext_i64_i32(segred_group_sizze_214596) +\n                                         wave_sizze_228177 - 1,\n                                         wave_sizze_228177))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228212 = skip_waves_228213 * wave_sizze_228177;\n                        if (slt32(local_tid_228175 + offset_228212,\n                                  sext_i64_i32(segred_group_sizze_214596)) &&\n       ",
                   "                     ((local_tid_228175 - squot32(local_tid_228175,\n                                                         wave_sizze_228177) *\n                              wave_sizze_228177) == 0 &&\n                             (squot32(local_tid_228175, wave_sizze_228177) &\n                              (2 * skip_waves_228213 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228199 = ((__local\n                                             float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175 +\n                                                                          offset_228212)];\n                                x_228200 = ((__local\n                                             float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175 +\n                                                                          offset_228212)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228201 = x_228197 +\n                                      x_228199;\n                                float defunc_1_op_res_228202 = x_228198 +\n                                      x_228200;\n                                \n                                x_228197 = defunc_1_op_res_228201;\n                                x_228198 = defunc_1_op_res_228202;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228179)[sext_i32_i64(local_tid_228175)] =\n                                    x_228197;\n                                ((__local\n                                  float *) red_arr_mem_228181)[sext_i32_i64(local_tid_228175)] =\n                                    x_228198;\n                            }\n                        }\n ",
                   "                       skip_waves_228213 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228175 == 0) {\n                            ((__global float *) mem_223882)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602] =\n                                x_228197;\n                            ((__global float *) mem_223886)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602] =\n                                x_228198;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_214596\n}\n__kernel void mainzisegred_large_216280(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228423_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228421_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_216274,\n                                        int64_t groups_per_segment_228407,\n                                        int64_t elements_per_thread_228408,\n                                        int64_t virt_num_groups_228409,\n                                        int64_t threads_per_segment_228411,\n                                ",
                   "        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224073,\n                                        __global unsigned char *mem_224087,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228412,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228414)\n{\n    #define segred_group_sizze_216273 (mainzisegred_group_sizze_215877)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228423_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228423_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228421_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228421_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228416;\n    int32_t local_tid_228417;\n    int64_t group_sizze_228420;\n    int32_t wave_sizze_228419;\n    int32_t group_tid_228418;\n    \n    global_tid_228416 = get_global_id(0);\n    local_tid_228417 = get_local_id(0);\n    group_sizze_228420 = get_local_size(0);\n    wave_sizze_228419 = LOCKSTEP_WIDTH;\n    group_tid_228418 = get_group_id(0);\n    \n    int32_t phys_tid_216280 = global_tid_228416;\n    __local unsigned char *red_arr_mem_228421;\n    \n    red_arr_mem_228421 = (__local unsigned char *) red_arr_mem_228421_backing_0;\n    \n    __local unsigned char *sync_arr_mem_228423;\n    \n    sync_arr_mem_228423 = ",
                   "(__local\n                           unsigned char *) sync_arr_mem_228423_backing_1;\n    \n    int32_t phys_group_id_228425;\n    \n    phys_group_id_228425 = get_group_id(0);\n    for (int32_t i_228426 = 0; i_228426 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228409) - phys_group_id_228425,\n                   sext_i64_i32(num_groups_216274)); i_228426++) {\n        int32_t virt_group_id_228427 = phys_group_id_228425 + i_228426 *\n                sext_i64_i32(num_groups_216274);\n        int32_t flat_segment_id_228428 = squot32(virt_group_id_228427,\n                                                 sext_i64_i32(groups_per_segment_228407));\n        int64_t global_tid_228429 = srem64(sext_i32_i64(virt_group_id_228427) *\n                                           segred_group_sizze_216273 +\n                                           sext_i32_i64(local_tid_228417),\n                                           segred_group_sizze_216273 *\n                                           groups_per_segment_228407);\n        int64_t slice_228430 = t_n_m_196759;\n        int64_t slice_228431 = m_196691 * slice_228430;\n        int64_t gtid_216277 = squot64(sext_i32_i64(flat_segment_id_228428),\n                                      slice_228430);\n        int64_t remnant_228432 = sext_i32_i64(flat_segment_id_228428) -\n                gtid_216277 * slice_228430;\n        int64_t gtid_216278 = remnant_228432;\n        int64_t remnant_228433 = remnant_228432 - gtid_216278;\n        int64_t gtid_216279;\n        float x_acc_228434;\n        int64_t chunk_sizze_228435 = smin64(elements_per_thread_228408,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228429,\n                                                      threads_per_segment_228411));\n        float x_216281;\n        float x_216282;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228434 = 0.0F;\n        }\n        for (int64_t i",
                   "_228439 = 0; i_228439 < chunk_sizze_228435; i_228439++) {\n            gtid_216279 = global_tid_228429 + threads_per_segment_228411 *\n                i_228439;\n            // apply map function\n            {\n                int64_t x_216285;\n                \n                x_216285 = ((__global int64_t *) ext_mem_222256)[gtid_216277];\n                \n                int64_t x_216290;\n                \n                x_216290 = ((__global int64_t *) ext_mem_222518)[gtid_216277 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_216278];\n                \n                float x_216291;\n                \n                x_216291 = ((__global float *) ext_mem_222517)[gtid_216277 *\n                                                               t_n_m_196759 +\n                                                               gtid_216278];\n                \n                int64_t binop_y_221752 = mul64(jump_t_196702, gtid_216278);\n                int64_t binop_y_221753 = smin64(i_196779, binop_y_221752);\n                int64_t index_primexp_221754 = add64((int64_t) 1,\n                                                     binop_y_221753);\n                bool cond_216294 = sle64(x_216285, gtid_216279);\n                int64_t defunc_0_f_res_216295;\n                \n                if (cond_216294) {\n                    defunc_0_f_res_216295 = (int64_t) 0;\n                } else {\n                    int64_t i_216296 = add64(gtid_216279, x_216290);\n                    int64_t defunc_0_add_arg_216297;\n                    \n                    defunc_0_add_arg_216297 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_216277 *\n                                                                           n_196692 +\n                                                                           i_216296];\n                    \n                    int64_t",
                   " defunc_1_add_res_216298 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_216297);\n                    \n                    defunc_0_f_res_216295 = defunc_1_add_res_216298;\n                }\n                \n                float defunc_0_f_res_216299;\n                \n                if (cond_216294) {\n                    defunc_0_f_res_216299 = 0.0F;\n                } else {\n                    int64_t i_216300 = add64(gtid_216279, x_216290);\n                    float defunc_0_add_arg_216301;\n                    \n                    defunc_0_add_arg_216301 = ((__global\n                                                float *) mem_224073)[gtid_216277 *\n                                                                     n_196692 +\n                                                                     i_216300];\n                    defunc_0_f_res_216299 = defunc_0_add_arg_216301;\n                }\n                \n                int64_t binop_p_216302 = sub64(defunc_0_f_res_216295,\n                                               index_primexp_221754);\n                float defunc_0_f_res_216303 = sitofp_i64_f32(binop_p_216302);\n                float abs_res_216304 = (float) fabs(defunc_0_f_res_216303);\n                float tmp1_216305 = abs_res_216304 / x_216291;\n                float x_216306 = tmp1_216305 * tmp1_216305;\n                float y_216307 = tmp1_216305 * x_216306;\n                float tmp2_216308 = 1.0F - y_216307;\n                float x_216309 = tmp2_216308 * tmp2_216308;\n                float tmp3_216310 = tmp2_216308 * x_216309;\n                float w_j_216311 = defunc_0_f_res_216299 * tmp3_216310;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_216281 = x_acc_228434;\n                }\n                // load new values\n                {\n                    x_216282 = w_j_216311;\n                }",
                   "\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_216283 = x_216281 + x_216282;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228434 = defunc_1_op_res_216283;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_216281 = x_acc_228434;\n            ((__local\n              float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417)] =\n                x_216281;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228440;\n        int32_t skip_waves_228441 = 1;\n        float x_228436;\n        float x_228437;\n        \n        offset_228440 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228417,\n                      sext_i64_i32(segred_group_sizze_216273))) {\n                x_228436 = ((__local\n                             float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                          offset_228440)];\n            }\n        }\n        offset_228440 = 1;\n        while (slt32(offset_228440, wave_sizze_228419)) {\n            if (slt32(local_tid_228417 + offset_228440,\n                      sext_i64_i32(segred_group_sizze_216273)) &&\n                ((local_tid_228417 - squot32(local_tid_228417,\n                                             wave_sizze_228419) *\n                  wave_sizze_228419) & (2 * offset_228440 - 1)) == 0) {\n                // read array element\n                {\n                    x_228437 = ((volatile __local\n                                 float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                              offset_228440)];\n                }\n                // apply reduction operation\n                {\n                    float defun",
                   "c_1_op_res_228438 = x_228436 + x_228437;\n                    \n                    x_228436 = defunc_1_op_res_228438;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417)] =\n                        x_228436;\n                }\n            }\n            offset_228440 *= 2;\n        }\n        while (slt32(skip_waves_228441,\n                     squot32(sext_i64_i32(segred_group_sizze_216273) +\n                             wave_sizze_228419 - 1, wave_sizze_228419))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228440 = skip_waves_228441 * wave_sizze_228419;\n            if (slt32(local_tid_228417 + offset_228440,\n                      sext_i64_i32(segred_group_sizze_216273)) &&\n                ((local_tid_228417 - squot32(local_tid_228417,\n                                             wave_sizze_228419) *\n                  wave_sizze_228419) == 0 && (squot32(local_tid_228417,\n                                                      wave_sizze_228419) & (2 *\n                                                                            skip_waves_228441 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228437 = ((__local\n                                 float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                              offset_228440)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228438 = x_228436 + x_228437;\n                    \n                    x_228436 = defunc_1_op_res_228438;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228421)[sext_i32_",
                   "i64(local_tid_228417)] =\n                        x_228436;\n                }\n            }\n            skip_waves_228441 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228417) == (int64_t) 0) {\n                x_acc_228434 = x_228436;\n            }\n        }\n        if (groups_per_segment_228407 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228417 == 0) {\n                    ((__global float *) mem_224087)[gtid_216277 * t_n_m_196759 +\n                                                    gtid_216278] = x_acc_228434;\n                }\n            }\n        } else {\n            int32_t old_counter_228442;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228417 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228412)[sext_i32_i64(virt_group_id_228427)] =\n                        x_acc_228434;\n                    mem_fence_global();\n                    old_counter_228442 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228414)[sext_i32_i64(srem32(flat_segment_id_228428,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228423)[(int64_t) 0] =\n                        old_counter_228442 == groups_per_segment_228407 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228443;\n            \n            is_last_group_228443 = ((__local\n                                     bool *) sync_arr_mem",
                   "_228423)[(int64_t) 0];\n            if (is_last_group_228443) {\n                if (local_tid_228417 == 0) {\n                    old_counter_228442 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228414)[sext_i32_i64(srem32(flat_segment_id_228428,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228407));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228444 =\n                            sdiv_up64(groups_per_segment_228407,\n                                      segred_group_sizze_216273);\n                    \n                    x_216281 = 0.0F;\n                    for (int64_t i_228445 = 0; i_228445 <\n                         read_per_thread_228444; i_228445++) {\n                        int64_t group_res_id_228446 =\n                                sext_i32_i64(local_tid_228417) *\n                                read_per_thread_228444 + i_228445;\n                        int64_t index_of_group_res_228447 =\n                                sext_i32_i64(flat_segment_id_228428) *\n                                groups_per_segment_228407 + group_res_id_228446;\n                        \n                        if (slt64(group_res_id_228446,\n                                  groups_per_segment_228407)) {\n                            x_216282 = ((__global\n                                         float *) segred_tmp_mem_228412)[index_of_group_res_228447];\n                            \n                            float defunc_1_op_res_216283 = x_216281 + x_216282;\n                            \n                            x_216281 = defunc_1_op_res_216283;\n                        }\n                    }\n       ",
                   "         }\n                ((__local\n                  float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417)] =\n                    x_216281;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228448;\n                    int32_t skip_waves_228449 = 1;\n                    float x_228436;\n                    float x_228437;\n                    \n                    offset_228448 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228417,\n                                  sext_i64_i32(segred_group_sizze_216273))) {\n                            x_228436 = ((__local\n                                         float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                                      offset_228448)];\n                        }\n                    }\n                    offset_228448 = 1;\n                    while (slt32(offset_228448, wave_sizze_228419)) {\n                        if (slt32(local_tid_228417 + offset_228448,\n                                  sext_i64_i32(segred_group_sizze_216273)) &&\n                            ((local_tid_228417 - squot32(local_tid_228417,\n                                                         wave_sizze_228419) *\n                              wave_sizze_228419) & (2 * offset_228448 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228437 = ((volatile __local\n                                             float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                                          offset_228448)];\n                            }\n                            // apply reduction operation\n                            {\n                              ",
                   "  float defunc_1_op_res_228438 = x_228436 +\n                                      x_228437;\n                                \n                                x_228436 = defunc_1_op_res_228438;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417)] =\n                                    x_228436;\n                            }\n                        }\n                        offset_228448 *= 2;\n                    }\n                    while (slt32(skip_waves_228449,\n                                 squot32(sext_i64_i32(segred_group_sizze_216273) +\n                                         wave_sizze_228419 - 1,\n                                         wave_sizze_228419))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228448 = skip_waves_228449 * wave_sizze_228419;\n                        if (slt32(local_tid_228417 + offset_228448,\n                                  sext_i64_i32(segred_group_sizze_216273)) &&\n                            ((local_tid_228417 - squot32(local_tid_228417,\n                                                         wave_sizze_228419) *\n                              wave_sizze_228419) == 0 &&\n                             (squot32(local_tid_228417, wave_sizze_228419) &\n                              (2 * skip_waves_228449 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228437 = ((__local\n                                             float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417 +\n                                                                          offset_228448)];\n                            }\n                            // apply reduction operation\n                            {\n                               ",
                   " float defunc_1_op_res_228438 = x_228436 +\n                                      x_228437;\n                                \n                                x_228436 = defunc_1_op_res_228438;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228421)[sext_i32_i64(local_tid_228417)] =\n                                    x_228436;\n                            }\n                        }\n                        skip_waves_228449 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228417 == 0) {\n                            ((__global float *) mem_224087)[gtid_216277 *\n                                                            t_n_m_196759 +\n                                                            gtid_216278] =\n                                x_228436;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_216273\n}\n__kernel void mainzisegred_large_216332(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228505_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228503_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_216326,\n                                        int64_t",
                   " groups_per_segment_228489,\n                                        int64_t elements_per_thread_228490,\n                                        int64_t virt_num_groups_228491,\n                                        int64_t threads_per_segment_228493,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224073,\n                                        __global unsigned char *mem_224077,\n                                        __global unsigned char *mem_224092,\n                                        __global unsigned char *mem_224097,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228494,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228496)\n{\n    #define segred_group_sizze_216325 (mainzisegred_group_sizze_215807)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228505_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228505_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228503_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228503_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228498;\n    int32_t local_tid_228499;\n    int64_t group_sizze_228502;\n    int32_t wave_sizze_228501;\n    int32_t group_tid_228500;\n    \n    global_tid_228498 = get_global_id(0);",
                   "\n    local_tid_228499 = get_local_id(0);\n    group_sizze_228502 = get_local_size(0);\n    wave_sizze_228501 = LOCKSTEP_WIDTH;\n    group_tid_228500 = get_group_id(0);\n    \n    int32_t phys_tid_216332 = global_tid_228498;\n    __local unsigned char *red_arr_mem_228503;\n    \n    red_arr_mem_228503 = (__local unsigned char *) red_arr_mem_228503_backing_0;\n    \n    __local unsigned char *sync_arr_mem_228505;\n    \n    sync_arr_mem_228505 = (__local\n                           unsigned char *) sync_arr_mem_228505_backing_1;\n    \n    int32_t phys_group_id_228507;\n    \n    phys_group_id_228507 = get_group_id(0);\n    for (int32_t i_228508 = 0; i_228508 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228491) - phys_group_id_228507,\n                   sext_i64_i32(num_groups_216326)); i_228508++) {\n        int32_t virt_group_id_228509 = phys_group_id_228507 + i_228508 *\n                sext_i64_i32(num_groups_216326);\n        int32_t flat_segment_id_228510 = squot32(virt_group_id_228509,\n                                                 sext_i64_i32(groups_per_segment_228489));\n        int64_t global_tid_228511 = srem64(sext_i32_i64(virt_group_id_228509) *\n                                           segred_group_sizze_216325 +\n                                           sext_i32_i64(local_tid_228499),\n                                           segred_group_sizze_216325 *\n                                           groups_per_segment_228489);\n        int64_t slice_228512 = t_n_m_196759;\n        int64_t slice_228513 = m_196691 * slice_228512;\n        int64_t gtid_216329 = squot64(sext_i32_i64(flat_segment_id_228510),\n                                      slice_228512);\n        int64_t remnant_228514 = sext_i32_i64(flat_segment_id_228510) -\n                gtid_216329 * slice_228512;\n        int64_t gtid_216330 = remnant_228514;\n        int64_t remnant_228515 = remnant_228514 - gtid_216330;\n        int64_t gtid_216331;\n        float x_acc_228516;\n        int64_t chunk_sizze_228517 = sm",
                   "in64(elements_per_thread_228490,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228511,\n                                                      threads_per_segment_228493));\n        float x_216333;\n        float x_216334;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228516 = 0.0F;\n        }\n        for (int64_t i_228521 = 0; i_228521 < chunk_sizze_228517; i_228521++) {\n            gtid_216331 = global_tid_228511 + threads_per_segment_228493 *\n                i_228521;\n            // apply map function\n            {\n                int64_t x_216337;\n                \n                x_216337 = ((__global int64_t *) ext_mem_222256)[gtid_216329];\n                \n                int64_t x_216344;\n                \n                x_216344 = ((__global int64_t *) ext_mem_222518)[gtid_216329 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_216330];\n                \n                float x_216345;\n                \n                x_216345 = ((__global float *) ext_mem_222517)[gtid_216329 *\n                                                               t_n_m_196759 +\n                                                               gtid_216330];\n                \n                int64_t binop_y_221747 = mul64(jump_t_196702, gtid_216330);\n                int64_t binop_y_221748 = smin64(i_196779, binop_y_221747);\n                int64_t index_primexp_221749 = add64((int64_t) 1,\n                                                     binop_y_221748);\n                float a0_216347;\n                \n                a0_216347 = ((__global float *) mem_224092)[gtid_216329 *\n                                                            t_n_m_196759 +\n                                                            gtid_216330];\n                \n                bool cond_216",
                   "349 = sle64(x_216337, gtid_216331);\n                int64_t defunc_0_f_res_216350;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216350 = (int64_t) 0;\n                } else {\n                    int64_t i_216351 = add64(gtid_216331, x_216344);\n                    int64_t defunc_0_add_arg_216352;\n                    \n                    defunc_0_add_arg_216352 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_216329 *\n                                                                           n_196692 +\n                                                                           i_216351];\n                    \n                    int64_t defunc_1_add_res_216353 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_216352);\n                    \n                    defunc_0_f_res_216350 = defunc_1_add_res_216353;\n                }\n                \n                float defunc_0_f_res_216354;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216354 = 0.0F;\n                } else {\n                    int64_t i_216355 = add64(gtid_216331, x_216344);\n                    float defunc_0_add_arg_216356;\n                    \n                    defunc_0_add_arg_216356 = ((__global\n                                                float *) mem_224073)[gtid_216329 *\n                                                                     n_196692 +\n                                                                     i_216355];\n                    defunc_0_f_res_216354 = defunc_0_add_arg_216356;\n                }\n                \n                int64_t binop_p_216357 = sub64(defunc_0_f_res_216350,\n                                               index_primexp_221749);\n                float defunc_0_f_res_216358 = sitofp_i64_f32(binop_p_216357);\n                float abs_res_216359 = (float) fabs(defunc_0_f_res_216358);\n      ",
                   "          float tmp1_216360 = abs_res_216359 / x_216345;\n                float x_216361 = tmp1_216360 * tmp1_216360;\n                float y_216362 = tmp1_216360 * x_216361;\n                float tmp2_216363 = 1.0F - y_216362;\n                float x_216364 = tmp2_216363 * tmp2_216363;\n                float tmp3_216365 = tmp2_216363 * x_216364;\n                float tmp4_216366 = defunc_0_f_res_216354 * tmp3_216365;\n                float defunc_0_f_res_216367;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216367 = 0.0F;\n                } else {\n                    int64_t i_216368 = add64(gtid_216331, x_216344);\n                    float defunc_0_add_arg_216369;\n                    \n                    defunc_0_add_arg_216369 = ((__global\n                                                float *) mem_224077)[gtid_216329 *\n                                                                     n_196692 +\n                                                                     i_216368];\n                    defunc_0_f_res_216367 = defunc_0_add_arg_216369;\n                }\n                \n                float x_216370 = a0_216347 * tmp4_216366;\n                float defunc_9_fit_fun_res_216371 = defunc_0_f_res_216367 *\n                      x_216370;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_216333 = x_acc_228516;\n                }\n                // load new values\n                {\n                    x_216334 = defunc_9_fit_fun_res_216371;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_216335 = x_216333 + x_216334;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228516 = defunc_1_op_res_216335;\n                    }\n                }\n            }\n        }\n        // to reduce cur",
                   "rent chunk, first store our result in memory\n        {\n            x_216333 = x_acc_228516;\n            ((__local\n              float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                x_216333;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228522;\n        int32_t skip_waves_228523 = 1;\n        float x_228518;\n        float x_228519;\n        \n        offset_228522 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228499,\n                      sext_i64_i32(segred_group_sizze_216325))) {\n                x_228518 = ((__local\n                             float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                          offset_228522)];\n            }\n        }\n        offset_228522 = 1;\n        while (slt32(offset_228522, wave_sizze_228501)) {\n            if (slt32(local_tid_228499 + offset_228522,\n                      sext_i64_i32(segred_group_sizze_216325)) &&\n                ((local_tid_228499 - squot32(local_tid_228499,\n                                             wave_sizze_228501) *\n                  wave_sizze_228501) & (2 * offset_228522 - 1)) == 0) {\n                // read array element\n                {\n                    x_228519 = ((volatile __local\n                                 float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                              offset_228522)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228520 = x_228518 + x_228519;\n                    \n                    x_228518 = defunc_1_op_res_228520;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                        x_228518;\n                }",
                   "\n            }\n            offset_228522 *= 2;\n        }\n        while (slt32(skip_waves_228523,\n                     squot32(sext_i64_i32(segred_group_sizze_216325) +\n                             wave_sizze_228501 - 1, wave_sizze_228501))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228522 = skip_waves_228523 * wave_sizze_228501;\n            if (slt32(local_tid_228499 + offset_228522,\n                      sext_i64_i32(segred_group_sizze_216325)) &&\n                ((local_tid_228499 - squot32(local_tid_228499,\n                                             wave_sizze_228501) *\n                  wave_sizze_228501) == 0 && (squot32(local_tid_228499,\n                                                      wave_sizze_228501) & (2 *\n                                                                            skip_waves_228523 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228519 = ((__local\n                                 float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                              offset_228522)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228520 = x_228518 + x_228519;\n                    \n                    x_228518 = defunc_1_op_res_228520;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                        x_228518;\n                }\n            }\n            skip_waves_228523 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228499) == (int64_t) 0) {\n                x_acc_228516 = x_228518;\n            }\n        }\n  ",
                   "      if (groups_per_segment_228489 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228499 == 0) {\n                    ((__global float *) mem_224097)[gtid_216329 * t_n_m_196759 +\n                                                    gtid_216330] = x_acc_228516;\n                }\n            }\n        } else {\n            int32_t old_counter_228524;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228499 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228494)[sext_i32_i64(virt_group_id_228509)] =\n                        x_acc_228516;\n                    mem_fence_global();\n                    old_counter_228524 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228496)[sext_i32_i64(srem32(flat_segment_id_228510,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228505)[(int64_t) 0] =\n                        old_counter_228524 == groups_per_segment_228489 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228525;\n            \n            is_last_group_228525 = ((__local\n                                     bool *) sync_arr_mem_228505)[(int64_t) 0];\n            if (is_last_group_228525) {\n                if (local_tid_228499 == 0) {\n                    old_counter_228524 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228496)[sext_i32_i64(srem32(flat_segment_id_228510,\n                               ",
                   "                                                                       10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228489));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228526 =\n                            sdiv_up64(groups_per_segment_228489,\n                                      segred_group_sizze_216325);\n                    \n                    x_216333 = 0.0F;\n                    for (int64_t i_228527 = 0; i_228527 <\n                         read_per_thread_228526; i_228527++) {\n                        int64_t group_res_id_228528 =\n                                sext_i32_i64(local_tid_228499) *\n                                read_per_thread_228526 + i_228527;\n                        int64_t index_of_group_res_228529 =\n                                sext_i32_i64(flat_segment_id_228510) *\n                                groups_per_segment_228489 + group_res_id_228528;\n                        \n                        if (slt64(group_res_id_228528,\n                                  groups_per_segment_228489)) {\n                            x_216334 = ((__global\n                                         float *) segred_tmp_mem_228494)[index_of_group_res_228529];\n                            \n                            float defunc_1_op_res_216335 = x_216333 + x_216334;\n                            \n                            x_216333 = defunc_1_op_res_216335;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                    x_216333;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228530;\n                    int32_t skip_waves_228531 = 1;\n                   ",
                   " float x_228518;\n                    float x_228519;\n                    \n                    offset_228530 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228499,\n                                  sext_i64_i32(segred_group_sizze_216325))) {\n                            x_228518 = ((__local\n                                         float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                                      offset_228530)];\n                        }\n                    }\n                    offset_228530 = 1;\n                    while (slt32(offset_228530, wave_sizze_228501)) {\n                        if (slt32(local_tid_228499 + offset_228530,\n                                  sext_i64_i32(segred_group_sizze_216325)) &&\n                            ((local_tid_228499 - squot32(local_tid_228499,\n                                                         wave_sizze_228501) *\n                              wave_sizze_228501) & (2 * offset_228530 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228519 = ((volatile __local\n                                             float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                                          offset_228530)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228520 = x_228518 +\n                                      x_228519;\n                                \n                                x_228518 = defunc_1_op_res_228520;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n             ",
                   "                     float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                                    x_228518;\n                            }\n                        }\n                        offset_228530 *= 2;\n                    }\n                    while (slt32(skip_waves_228531,\n                                 squot32(sext_i64_i32(segred_group_sizze_216325) +\n                                         wave_sizze_228501 - 1,\n                                         wave_sizze_228501))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228530 = skip_waves_228531 * wave_sizze_228501;\n                        if (slt32(local_tid_228499 + offset_228530,\n                                  sext_i64_i32(segred_group_sizze_216325)) &&\n                            ((local_tid_228499 - squot32(local_tid_228499,\n                                                         wave_sizze_228501) *\n                              wave_sizze_228501) == 0 &&\n                             (squot32(local_tid_228499, wave_sizze_228501) &\n                              (2 * skip_waves_228531 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228519 = ((__local\n                                             float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499 +\n                                                                          offset_228530)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228520 = x_228518 +\n                                      x_228519;\n                                \n                                x_228518 = defunc_1_op_res_228520;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                       ",
                   "           float *) red_arr_mem_228503)[sext_i32_i64(local_tid_228499)] =\n                                    x_228518;\n                            }\n                        }\n                        skip_waves_228531 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228499 == 0) {\n                            ((__global float *) mem_224097)[gtid_216329 *\n                                                            t_n_m_196759 +\n                                                            gtid_216330] =\n                                x_228518;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_216325\n}\n__kernel void mainzisegred_large_217318(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228674_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228672_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228670_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228668_backing_aligned_3,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_217310,\n                                        int64_t groups_per_segment_228650,\n                                        int64_t elements_",
                   "per_thread_228651,\n                                        int64_t virt_num_groups_228652,\n                                        int64_t threads_per_segment_228654,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224214,\n                                        __global unsigned char *mem_224232,\n                                        __global unsigned char *mem_224236,\n                                        __global unsigned char *mem_224240,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228655,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228657,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228659,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228661)\n{\n    #define segred_group_sizze_217309 (mainzisegred_group_sizze_216838)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228674_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228674_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228672_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228672_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228670_backing_1 =\n           ",
                   "                        (__local volatile\n                                    unsigned char *) red_arr_mem_228670_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_228668_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228668_backing_aligned_3;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228663;\n    int32_t local_tid_228664;\n    int64_t group_sizze_228667;\n    int32_t wave_sizze_228666;\n    int32_t group_tid_228665;\n    \n    global_tid_228663 = get_global_id(0);\n    local_tid_228664 = get_local_id(0);\n    group_sizze_228667 = get_local_size(0);\n    wave_sizze_228666 = LOCKSTEP_WIDTH;\n    group_tid_228665 = get_group_id(0);\n    \n    int32_t phys_tid_217318 = global_tid_228663;\n    __local unsigned char *red_arr_mem_228668;\n    \n    red_arr_mem_228668 = (__local unsigned char *) red_arr_mem_228668_backing_0;\n    \n    __local unsigned char *red_arr_mem_228670;\n    \n    red_arr_mem_228670 = (__local unsigned char *) red_arr_mem_228670_backing_1;\n    \n    __local unsigned char *red_arr_mem_228672;\n    \n    red_arr_mem_228672 = (__local unsigned char *) red_arr_mem_228672_backing_2;\n    \n    __local unsigned char *sync_arr_mem_228674;\n    \n    sync_arr_mem_228674 = (__local\n                           unsigned char *) sync_arr_mem_228674_backing_3;\n    \n    int32_t phys_group_id_228676;\n    \n    phys_group_id_228676 = get_group_id(0);\n    for (int32_t i_228677 = 0; i_228677 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228652) - phys_group_id_228676,\n                   sext_i64_i32(num_groups_217310)); i_228677++) {\n        int32_t virt_group_id_228678 = phys_group_id_228676 + i_228677 *\n                sext_i64_i32(num_groups_217310);\n        int32_t flat_segment_id_228679 = squot32(virt_group_id_228678,\n                                                 sext_i64_i32(groups_per_segment_228650));\n        int64_t global_tid_228680 ",
                   "= srem64(sext_i32_i64(virt_group_id_228678) *\n                                           segred_group_sizze_217309 +\n                                           sext_i32_i64(local_tid_228664),\n                                           segred_group_sizze_217309 *\n                                           groups_per_segment_228650);\n        int64_t slice_228681 = t_n_m_196759;\n        int64_t slice_228682 = m_196691 * slice_228681;\n        int64_t gtid_217315 = squot64(sext_i32_i64(flat_segment_id_228679),\n                                      slice_228681);\n        int64_t remnant_228683 = sext_i32_i64(flat_segment_id_228679) -\n                gtid_217315 * slice_228681;\n        int64_t gtid_217316 = remnant_228683;\n        int64_t remnant_228684 = remnant_228683 - gtid_217316;\n        int64_t gtid_217317;\n        float x_acc_228685;\n        float x_acc_228686;\n        float x_acc_228687;\n        int64_t chunk_sizze_228688 = smin64(elements_per_thread_228651,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228680,\n                                                      threads_per_segment_228654));\n        float x_217319;\n        float x_217320;\n        float x_217321;\n        float x_217322;\n        float x_217323;\n        float x_217324;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228685 = 0.0F;\n            x_acc_228686 = 0.0F;\n            x_acc_228687 = 0.0F;\n        }\n        for (int64_t i_228698 = 0; i_228698 < chunk_sizze_228688; i_228698++) {\n            gtid_217317 = global_tid_228680 + threads_per_segment_228654 *\n                i_228698;\n            // apply map function\n            {\n                int64_t x_217329;\n                \n                x_217329 = ((__global int64_t *) ext_mem_222256)[gtid_217315];\n                \n                int64_t x_217334;\n                \n                x_217334 = ((__global int64_t *) ext_mem",
                   "_222518)[gtid_217315 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_217316];\n                \n                float x_217335;\n                \n                x_217335 = ((__global float *) ext_mem_222517)[gtid_217315 *\n                                                               t_n_m_196759 +\n                                                               gtid_217316];\n                \n                int64_t binop_y_221762 = mul64(jump_t_196702, gtid_217316);\n                int64_t binop_y_221763 = smin64(i_196779, binop_y_221762);\n                int64_t index_primexp_221764 = add64((int64_t) 1,\n                                                     binop_y_221763);\n                bool cond_217338 = sle64(x_217329, gtid_217317);\n                int64_t defunc_0_f_res_217339;\n                \n                if (cond_217338) {\n                    defunc_0_f_res_217339 = (int64_t) 0;\n                } else {\n                    int64_t i_217340 = add64(gtid_217317, x_217334);\n                    int64_t defunc_0_add_arg_217341;\n                    \n                    defunc_0_add_arg_217341 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_217315 *\n                                                                           n_196692 +\n                                                                           i_217340];\n                    \n                    int64_t defunc_1_add_res_217342 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_217341);\n                    \n                    defunc_0_f_res_217339 = defunc_1_add_res_217342;\n                }\n                \n                float defunc_0_f_res_217343;\n                \n                if (cond_217338) {\n                    defunc_0_f_res_217343 = 0.0F;\n                } else {\n                    int64_t i_21",
                   "7344 = add64(gtid_217317, x_217334);\n                    float defunc_0_add_arg_217345;\n                    \n                    defunc_0_add_arg_217345 = ((__global\n                                                float *) mem_224214)[gtid_217315 *\n                                                                     n_196692 +\n                                                                     i_217344];\n                    defunc_0_f_res_217343 = defunc_0_add_arg_217345;\n                }\n                \n                int64_t binop_p_217346 = sub64(defunc_0_f_res_217339,\n                                               index_primexp_221764);\n                float defunc_0_f_res_217347 = sitofp_i64_f32(binop_p_217346);\n                float abs_res_217348 = (float) fabs(defunc_0_f_res_217347);\n                float tmp1_217349 = abs_res_217348 / x_217335;\n                float x_217350 = tmp1_217349 * tmp1_217349;\n                float y_217351 = tmp1_217349 * x_217350;\n                float tmp2_217352 = 1.0F - y_217351;\n                float x_217353 = tmp2_217352 * tmp2_217352;\n                float tmp3_217354 = tmp2_217352 * x_217353;\n                float w_j_217355 = defunc_0_f_res_217343 * tmp3_217354;\n                float xw_j_217356 = defunc_0_f_res_217347 * w_j_217355;\n                float x2w_j_217357 = defunc_0_f_res_217347 * xw_j_217356;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_217319 = x_acc_228685;\n                    x_217320 = x_acc_228686;\n                    x_217321 = x_acc_228687;\n                }\n                // load new values\n                {\n                    x_217322 = w_j_217355;\n                    x_217323 = xw_j_217356;\n                    x_217324 = x2w_j_217357;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_217325 = x_217319 + x_217322;\n ",
                   "                   float defunc_1_op_res_217326 = x_217320 + x_217323;\n                    float defunc_1_op_res_217327 = x_217321 + x_217324;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228685 = defunc_1_op_res_217325;\n                        x_acc_228686 = defunc_1_op_res_217326;\n                        x_acc_228687 = defunc_1_op_res_217327;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_217319 = x_acc_228685;\n            x_217320 = x_acc_228686;\n            x_217321 = x_acc_228687;\n            ((__local\n              float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                x_217319;\n            ((__local\n              float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664)] =\n                x_217320;\n            ((__local\n              float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                x_217321;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228699;\n        int32_t skip_waves_228700 = 1;\n        float x_228689;\n        float x_228690;\n        float x_228691;\n        float x_228692;\n        float x_228693;\n        float x_228694;\n        \n        offset_228699 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228664,\n                      sext_i64_i32(segred_group_sizze_217309))) {\n                x_228689 = ((__local\n                             float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                          offset_228699)];\n                x_228690 = ((__local\n                             float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                          offset_228699)];\n                x_228691 = ((__local\n                             f",
                   "loat *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                          offset_228699)];\n            }\n        }\n        offset_228699 = 1;\n        while (slt32(offset_228699, wave_sizze_228666)) {\n            if (slt32(local_tid_228664 + offset_228699,\n                      sext_i64_i32(segred_group_sizze_217309)) &&\n                ((local_tid_228664 - squot32(local_tid_228664,\n                                             wave_sizze_228666) *\n                  wave_sizze_228666) & (2 * offset_228699 - 1)) == 0) {\n                // read array element\n                {\n                    x_228692 = ((volatile __local\n                                 float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)];\n                    x_228693 = ((volatile __local\n                                 float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)];\n                    x_228694 = ((volatile __local\n                                 float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228695 = x_228689 + x_228692;\n                    float defunc_1_op_res_228696 = x_228690 + x_228693;\n                    float defunc_1_op_res_228697 = x_228691 + x_228694;\n                    \n                    x_228689 = defunc_1_op_res_228695;\n                    x_228690 = defunc_1_op_res_228696;\n                    x_228691 = defunc_1_op_res_228697;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                    ",
                   "    x_228689;\n                    ((volatile __local\n                      float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664)] =\n                        x_228690;\n                    ((volatile __local\n                      float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                        x_228691;\n                }\n            }\n            offset_228699 *= 2;\n        }\n        while (slt32(skip_waves_228700,\n                     squot32(sext_i64_i32(segred_group_sizze_217309) +\n                             wave_sizze_228666 - 1, wave_sizze_228666))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228699 = skip_waves_228700 * wave_sizze_228666;\n            if (slt32(local_tid_228664 + offset_228699,\n                      sext_i64_i32(segred_group_sizze_217309)) &&\n                ((local_tid_228664 - squot32(local_tid_228664,\n                                             wave_sizze_228666) *\n                  wave_sizze_228666) == 0 && (squot32(local_tid_228664,\n                                                      wave_sizze_228666) & (2 *\n                                                                            skip_waves_228700 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228692 = ((__local\n                                 float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)];\n                    x_228693 = ((__local\n                                 float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)];\n                    x_228694 = ((__local\n                                 float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                              offset_228699)]",
                   ";\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228695 = x_228689 + x_228692;\n                    float defunc_1_op_res_228696 = x_228690 + x_228693;\n                    float defunc_1_op_res_228697 = x_228691 + x_228694;\n                    \n                    x_228689 = defunc_1_op_res_228695;\n                    x_228690 = defunc_1_op_res_228696;\n                    x_228691 = defunc_1_op_res_228697;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                        x_228689;\n                    ((__local\n                      float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664)] =\n                        x_228690;\n                    ((__local\n                      float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                        x_228691;\n                }\n            }\n            skip_waves_228700 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228664) == (int64_t) 0) {\n                x_acc_228685 = x_228689;\n                x_acc_228686 = x_228690;\n                x_acc_228687 = x_228691;\n            }\n        }\n        if (groups_per_segment_228650 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228664 == 0) {\n                    ((__global float *) mem_224232)[gtid_217315 * t_n_m_196759 +\n                                                    gtid_217316] = x_acc_228685;\n                    ((__global float *) mem_224236)[gtid_217315 * t_n_m_196759 +\n                                                    gtid_217316] = x_acc_228686;\n                    ((__global float *) mem_224240)[gtid_217315 * t_n_m_196759 +\n       ",
                   "                                             gtid_217316] = x_acc_228687;\n                }\n            }\n        } else {\n            int32_t old_counter_228701;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228664 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228655)[sext_i32_i64(virt_group_id_228678)] =\n                        x_acc_228685;\n                    ((__global\n                      float *) segred_tmp_mem_228657)[sext_i32_i64(virt_group_id_228678)] =\n                        x_acc_228686;\n                    ((__global\n                      float *) segred_tmp_mem_228659)[sext_i32_i64(virt_group_id_228678)] =\n                        x_acc_228687;\n                    mem_fence_global();\n                    old_counter_228701 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228661)[sext_i32_i64(srem32(flat_segment_id_228679,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228674)[(int64_t) 0] =\n                        old_counter_228701 == groups_per_segment_228650 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228702;\n            \n            is_last_group_228702 = ((__local\n                                     bool *) sync_arr_mem_228674)[(int64_t) 0];\n            if (is_last_group_228702) {\n                if (local_tid_228664 == 0) {\n                    old_counter_228701 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228661)[sext_i32_i64(srem32(",
                   "flat_segment_id_228679,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228650));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228703 =\n                            sdiv_up64(groups_per_segment_228650,\n                                      segred_group_sizze_217309);\n                    \n                    x_217319 = 0.0F;\n                    x_217320 = 0.0F;\n                    x_217321 = 0.0F;\n                    for (int64_t i_228704 = 0; i_228704 <\n                         read_per_thread_228703; i_228704++) {\n                        int64_t group_res_id_228705 =\n                                sext_i32_i64(local_tid_228664) *\n                                read_per_thread_228703 + i_228704;\n                        int64_t index_of_group_res_228706 =\n                                sext_i32_i64(flat_segment_id_228679) *\n                                groups_per_segment_228650 + group_res_id_228705;\n                        \n                        if (slt64(group_res_id_228705,\n                                  groups_per_segment_228650)) {\n                            x_217322 = ((__global\n                                         float *) segred_tmp_mem_228655)[index_of_group_res_228706];\n                            x_217323 = ((__global\n                                         float *) segred_tmp_mem_228657)[index_of_group_res_228706];\n                            x_217324 = ((__global\n                                         float *) segred_tmp_mem_228659)[index_of_group_res_228706];\n                            \n                            float defunc_1_op_res_217325 = x_217319 + x_217322;\n                            float defunc_1_op_res_217326 = x_217320 + x_217323;\n         ",
                   "                   float defunc_1_op_res_217327 = x_217321 + x_217324;\n                            \n                            x_217319 = defunc_1_op_res_217325;\n                            x_217320 = defunc_1_op_res_217326;\n                            x_217321 = defunc_1_op_res_217327;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                    x_217319;\n                ((__local\n                  float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664)] =\n                    x_217320;\n                ((__local\n                  float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                    x_217321;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228707;\n                    int32_t skip_waves_228708 = 1;\n                    float x_228689;\n                    float x_228690;\n                    float x_228691;\n                    float x_228692;\n                    float x_228693;\n                    float x_228694;\n                    \n                    offset_228707 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228664,\n                                  sext_i64_i32(segred_group_sizze_217309))) {\n                            x_228689 = ((__local\n                                         float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                                      offset_228707)];\n                            x_228690 = ((__local\n                                         float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                                      offset_228707)];\n                            x_228691 = ((__local\n     ",
                   "                                    float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                                      offset_228707)];\n                        }\n                    }\n                    offset_228707 = 1;\n                    while (slt32(offset_228707, wave_sizze_228666)) {\n                        if (slt32(local_tid_228664 + offset_228707,\n                                  sext_i64_i32(segred_group_sizze_217309)) &&\n                            ((local_tid_228664 - squot32(local_tid_228664,\n                                                         wave_sizze_228666) *\n                              wave_sizze_228666) & (2 * offset_228707 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228692 = ((volatile __local\n                                             float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                                x_228693 = ((volatile __local\n                                             float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                                x_228694 = ((volatile __local\n                                             float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228695 = x_228689 +\n                                      x_228692;\n                                float defunc_1_op_res_228696 = x_228690 +\n                                      x_228693;\n                              ",
                   "  float defunc_1_op_res_228697 = x_228691 +\n                                      x_228694;\n                                \n                                x_228689 = defunc_1_op_res_228695;\n                                x_228690 = defunc_1_op_res_228696;\n                                x_228691 = defunc_1_op_res_228697;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                                    x_228689;\n                                ((volatile __local\n                                  float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664)] =\n                                    x_228690;\n                                ((volatile __local\n                                  float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                                    x_228691;\n                            }\n                        }\n                        offset_228707 *= 2;\n                    }\n                    while (slt32(skip_waves_228708,\n                                 squot32(sext_i64_i32(segred_group_sizze_217309) +\n                                         wave_sizze_228666 - 1,\n                                         wave_sizze_228666))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228707 = skip_waves_228708 * wave_sizze_228666;\n                        if (slt32(local_tid_228664 + offset_228707,\n                                  sext_i64_i32(segred_group_sizze_217309)) &&\n                            ((local_tid_228664 - squot32(local_tid_228664,\n                                                         wave_sizze_228666) *\n                              wave_sizze_228666) == 0 &&\n                             (squot32(local_tid_228664, wave_sizze_228666) &\n                        ",
                   "      (2 * skip_waves_228708 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228692 = ((__local\n                                             float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                                x_228693 = ((__local\n                                             float *) red_arr_mem_228670)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                                x_228694 = ((__local\n                                             float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664 +\n                                                                          offset_228707)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228695 = x_228689 +\n                                      x_228692;\n                                float defunc_1_op_res_228696 = x_228690 +\n                                      x_228693;\n                                float defunc_1_op_res_228697 = x_228691 +\n                                      x_228694;\n                                \n                                x_228689 = defunc_1_op_res_228695;\n                                x_228690 = defunc_1_op_res_228696;\n                                x_228691 = defunc_1_op_res_228697;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228668)[sext_i32_i64(local_tid_228664)] =\n                                    x_228689;\n                                ((__local\n                                  float *) red_arr_mem_228670)[se",
                   "xt_i32_i64(local_tid_228664)] =\n                                    x_228690;\n                                ((__local\n                                  float *) red_arr_mem_228672)[sext_i32_i64(local_tid_228664)] =\n                                    x_228691;\n                            }\n                        }\n                        skip_waves_228708 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228664 == 0) {\n                            ((__global float *) mem_224232)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228689;\n                            ((__global float *) mem_224236)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228690;\n                            ((__global float *) mem_224240)[gtid_217315 *\n                                                            t_n_m_196759 +\n                                                            gtid_217316] =\n                                x_228691;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_217309\n}\n__kernel void mainzisegred_large_217390(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228774_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228772_backing_aligned_1,\n                                        __local volatile\n                                  ",
                   "      int64_t *red_arr_mem_228770_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_217383,\n                                        int64_t groups_per_segment_228754,\n                                        int64_t elements_per_thread_228755,\n                                        int64_t virt_num_groups_228756,\n                                        int64_t threads_per_segment_228758,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224214,\n                                        __global unsigned char *mem_224218,\n                                        __global unsigned char *mem_224245,\n                                        __global unsigned char *mem_224249,\n                                        __global unsigned char *mem_224253,\n                                        __global unsigned char *mem_224258,\n                                        __global unsigned char *mem_224262,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228759,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228761,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228763)\n{\n    #define segred_group_sizze_217382 (mainzisegred_group_sizze_",
                   "216741)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228774_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228774_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228772_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228772_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228770_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228770_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228765;\n    int32_t local_tid_228766;\n    int64_t group_sizze_228769;\n    int32_t wave_sizze_228768;\n    int32_t group_tid_228767;\n    \n    global_tid_228765 = get_global_id(0);\n    local_tid_228766 = get_local_id(0);\n    group_sizze_228769 = get_local_size(0);\n    wave_sizze_228768 = LOCKSTEP_WIDTH;\n    group_tid_228767 = get_group_id(0);\n    \n    int32_t phys_tid_217390 = global_tid_228765;\n    __local unsigned char *red_arr_mem_228770;\n    \n    red_arr_mem_228770 = (__local unsigned char *) red_arr_mem_228770_backing_0;\n    \n    __local unsigned char *red_arr_mem_228772;\n    \n    red_arr_mem_228772 = (__local unsigned char *) red_arr_mem_228772_backing_1;\n    \n    __local unsigned char *sync_arr_mem_228774;\n    \n    sync_arr_mem_228774 = (__local\n                           unsigned char *) sync_arr_mem_228774_backing_2;\n    \n    int32_t phys_group_id_228776;\n    \n    phys_group_id_228776 = get_group_id(0);\n    for (int32_t i_228777 = 0; i_228777 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228756) - phys_group_id_228776,\n                   sext_i64_i32(num_groups_217383)); i_228777++) {\n        int32_t virt_group_id_228778 = phys_",
                   "group_id_228776 + i_228777 *\n                sext_i64_i32(num_groups_217383);\n        int32_t flat_segment_id_228779 = squot32(virt_group_id_228778,\n                                                 sext_i64_i32(groups_per_segment_228754));\n        int64_t global_tid_228780 = srem64(sext_i32_i64(virt_group_id_228778) *\n                                           segred_group_sizze_217382 +\n                                           sext_i32_i64(local_tid_228766),\n                                           segred_group_sizze_217382 *\n                                           groups_per_segment_228754);\n        int64_t slice_228781 = t_n_m_196759;\n        int64_t slice_228782 = m_196691 * slice_228781;\n        int64_t gtid_217387 = squot64(sext_i32_i64(flat_segment_id_228779),\n                                      slice_228781);\n        int64_t remnant_228783 = sext_i32_i64(flat_segment_id_228779) -\n                gtid_217387 * slice_228781;\n        int64_t gtid_217388 = remnant_228783;\n        int64_t remnant_228784 = remnant_228783 - gtid_217388;\n        int64_t gtid_217389;\n        float x_acc_228785;\n        float x_acc_228786;\n        int64_t chunk_sizze_228787 = smin64(elements_per_thread_228755,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228780,\n                                                      threads_per_segment_228758));\n        float x_217391;\n        float x_217392;\n        float x_217393;\n        float x_217394;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228785 = 0.0F;\n            x_acc_228786 = 0.0F;\n        }\n        for (int64_t i_228794 = 0; i_228794 < chunk_sizze_228787; i_228794++) {\n            gtid_217389 = global_tid_228780 + threads_per_segment_228758 *\n                i_228794;\n            // apply map function\n            {\n                int64_t x_217398;\n                \n                x_217398 = ((__global ",
                   "int64_t *) ext_mem_222256)[gtid_217387];\n                \n                int64_t x_217407;\n                \n                x_217407 = ((__global int64_t *) ext_mem_222518)[gtid_217387 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_217388];\n                \n                float x_217408;\n                \n                x_217408 = ((__global float *) ext_mem_222517)[gtid_217387 *\n                                                               t_n_m_196759 +\n                                                               gtid_217388];\n                \n                int64_t binop_y_221757 = mul64(jump_t_196702, gtid_217388);\n                int64_t binop_y_221758 = smin64(i_196779, binop_y_221757);\n                int64_t index_primexp_221759 = add64((int64_t) 1,\n                                                     binop_y_221758);\n                float a11_217410;\n                \n                a11_217410 = ((__global float *) mem_224245)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                float b11_217411;\n                \n                b11_217411 = ((__global float *) mem_224249)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                float c11_217412;\n                \n                c11_217412 = ((__global float *) mem_224253)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                bool cond_217414 = sle64(x_217398, gtid_217389);\n                int64_t defunc_0_f_res_217415;\n                \n                if (cond_217414) {\n     ",
                   "               defunc_0_f_res_217415 = (int64_t) 0;\n                } else {\n                    int64_t i_217416 = add64(gtid_217389, x_217407);\n                    int64_t defunc_0_add_arg_217417;\n                    \n                    defunc_0_add_arg_217417 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_217387 *\n                                                                           n_196692 +\n                                                                           i_217416];\n                    \n                    int64_t defunc_1_add_res_217418 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_217417);\n                    \n                    defunc_0_f_res_217415 = defunc_1_add_res_217418;\n                }\n                \n                float defunc_0_f_res_217419;\n                \n                if (cond_217414) {\n                    defunc_0_f_res_217419 = 0.0F;\n                } else {\n                    int64_t i_217420 = add64(gtid_217389, x_217407);\n                    float defunc_0_add_arg_217421;\n                    \n                    defunc_0_add_arg_217421 = ((__global\n                                                float *) mem_224214)[gtid_217387 *\n                                                                     n_196692 +\n                                                                     i_217420];\n                    defunc_0_f_res_217419 = defunc_0_add_arg_217421;\n                }\n                \n                int64_t binop_p_217422 = sub64(defunc_0_f_res_217415,\n                                               index_primexp_221759);\n                float defunc_0_f_res_217423 = sitofp_i64_f32(binop_p_217422);\n                float abs_res_217424 = (float) fabs(defunc_0_f_res_217423);\n                float tmp1_217425 = abs_res_217424 / x_217408;\n                float x_217426 = tmp1_217425 * tmp1_217425;\n                float y",
                   "_217427 = tmp1_217425 * x_217426;\n                float tmp2_217428 = 1.0F - y_217427;\n                float x_217429 = tmp2_217428 * tmp2_217428;\n                float tmp3_217430 = tmp2_217428 * x_217429;\n                float tmp4_217431 = defunc_0_f_res_217419 * tmp3_217430;\n                float defunc_1_f_res_217432 = defunc_0_f_res_217423 *\n                      tmp4_217431;\n                float defunc_0_f_res_217433;\n                \n                if (cond_217414) {\n                    defunc_0_f_res_217433 = 0.0F;\n                } else {\n                    int64_t i_217434 = add64(gtid_217389, x_217407);\n                    float defunc_0_add_arg_217435;\n                    \n                    defunc_0_add_arg_217435 = ((__global\n                                                float *) mem_224218)[gtid_217387 *\n                                                                     n_196692 +\n                                                                     i_217434];\n                    defunc_0_f_res_217433 = defunc_0_add_arg_217435;\n                }\n                \n                float x_217436 = a11_217410 * tmp4_217431;\n                float y_217437 = b11_217411 * defunc_1_f_res_217432;\n                float x_217438 = x_217436 + y_217437;\n                float defunc_9_fit_fun_res_217439 = defunc_0_f_res_217433 *\n                      x_217438;\n                float x_217440 = b11_217411 * tmp4_217431;\n                float y_217441 = c11_217412 * defunc_1_f_res_217432;\n                float x_217442 = x_217440 + y_217441;\n                float defunc_9_slope_fun_res_217443 = defunc_0_f_res_217433 *\n                      x_217442;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_217391 = x_acc_228785;\n                    x_217392 = x_acc_228786;\n                }\n                // load new values\n                {\n                    x_21",
                   "7393 = defunc_9_fit_fun_res_217439;\n                    x_217394 = defunc_9_slope_fun_res_217443;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_217395 = x_217391 + x_217393;\n                    float defunc_1_op_res_217396 = x_217392 + x_217394;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228785 = defunc_1_op_res_217395;\n                        x_acc_228786 = defunc_1_op_res_217396;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_217391 = x_acc_228785;\n            x_217392 = x_acc_228786;\n            ((__local\n              float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                x_217391;\n            ((__local\n              float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                x_217392;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_228795;\n        int32_t skip_waves_228796 = 1;\n        float x_228788;\n        float x_228789;\n        float x_228790;\n        float x_228791;\n        \n        offset_228795 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228766,\n                      sext_i64_i32(segred_group_sizze_217382))) {\n                x_228788 = ((__local\n                             float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                          offset_228795)];\n                x_228789 = ((__local\n                             float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                          offset_228795)];\n            }\n        }\n        offset_228795 = 1;\n        while (slt32(offset_228795, wave_sizze_228768)) {\n            if (slt32(local_tid_228766 + offset_2287",
                   "95,\n                      sext_i64_i32(segred_group_sizze_217382)) &&\n                ((local_tid_228766 - squot32(local_tid_228766,\n                                             wave_sizze_228768) *\n                  wave_sizze_228768) & (2 * offset_228795 - 1)) == 0) {\n                // read array element\n                {\n                    x_228790 = ((volatile __local\n                                 float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                              offset_228795)];\n                    x_228791 = ((volatile __local\n                                 float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                              offset_228795)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228792 = x_228788 + x_228790;\n                    float defunc_1_op_res_228793 = x_228789 + x_228791;\n                    \n                    x_228788 = defunc_1_op_res_228792;\n                    x_228789 = defunc_1_op_res_228793;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                        x_228788;\n                    ((volatile __local\n                      float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                        x_228789;\n                }\n            }\n            offset_228795 *= 2;\n        }\n        while (slt32(skip_waves_228796,\n                     squot32(sext_i64_i32(segred_group_sizze_217382) +\n                             wave_sizze_228768 - 1, wave_sizze_228768))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_228795 = skip_waves_228796 * wave_sizze_228768;\n            if (slt32(local_tid_228766 + offset_228795,\n                      sext_i64_i32(segred_group_s",
                   "izze_217382)) &&\n                ((local_tid_228766 - squot32(local_tid_228766,\n                                             wave_sizze_228768) *\n                  wave_sizze_228768) == 0 && (squot32(local_tid_228766,\n                                                      wave_sizze_228768) & (2 *\n                                                                            skip_waves_228796 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228790 = ((__local\n                                 float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                              offset_228795)];\n                    x_228791 = ((__local\n                                 float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                              offset_228795)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228792 = x_228788 + x_228790;\n                    float defunc_1_op_res_228793 = x_228789 + x_228791;\n                    \n                    x_228788 = defunc_1_op_res_228792;\n                    x_228789 = defunc_1_op_res_228793;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                        x_228788;\n                    ((__local\n                      float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                        x_228789;\n                }\n            }\n            skip_waves_228796 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228766) == (int64_t) 0) {\n                x_acc_228785 = x_2",
                   "28788;\n                x_acc_228786 = x_228789;\n            }\n        }\n        if (groups_per_segment_228754 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228766 == 0) {\n                    ((__global float *) mem_224258)[gtid_217387 * t_n_m_196759 +\n                                                    gtid_217388] = x_acc_228785;\n                    ((__global float *) mem_224262)[gtid_217387 * t_n_m_196759 +\n                                                    gtid_217388] = x_acc_228786;\n                }\n            }\n        } else {\n            int32_t old_counter_228797;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228766 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228759)[sext_i32_i64(virt_group_id_228778)] =\n                        x_acc_228785;\n                    ((__global\n                      float *) segred_tmp_mem_228761)[sext_i32_i64(virt_group_id_228778)] =\n                        x_acc_228786;\n                    mem_fence_global();\n                    old_counter_228797 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228763)[sext_i32_i64(srem32(flat_segment_id_228779,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228774)[(int64_t) 0] =\n                        old_counter_228797 == groups_per_segment_228754 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_228798;\n            \n            is_last_group_228798 = ((__local\n                                 ",
                   "    bool *) sync_arr_mem_228774)[(int64_t) 0];\n            if (is_last_group_228798) {\n                if (local_tid_228766 == 0) {\n                    old_counter_228797 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228763)[sext_i32_i64(srem32(flat_segment_id_228779,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228754));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_228799 =\n                            sdiv_up64(groups_per_segment_228754,\n                                      segred_group_sizze_217382);\n                    \n                    x_217391 = 0.0F;\n                    x_217392 = 0.0F;\n                    for (int64_t i_228800 = 0; i_228800 <\n                         read_per_thread_228799; i_228800++) {\n                        int64_t group_res_id_228801 =\n                                sext_i32_i64(local_tid_228766) *\n                                read_per_thread_228799 + i_228800;\n                        int64_t index_of_group_res_228802 =\n                                sext_i32_i64(flat_segment_id_228779) *\n                                groups_per_segment_228754 + group_res_id_228801;\n                        \n                        if (slt64(group_res_id_228801,\n                                  groups_per_segment_228754)) {\n                            x_217393 = ((__global\n                                         float *) segred_tmp_mem_228759)[index_of_group_res_228802];\n                            x_217394 = ((__global\n                                         float *) segred_tmp_mem_228761)[index_of_group_res_228802];\n                            \n               ",
                   "             float defunc_1_op_res_217395 = x_217391 + x_217393;\n                            float defunc_1_op_res_217396 = x_217392 + x_217394;\n                            \n                            x_217391 = defunc_1_op_res_217395;\n                            x_217392 = defunc_1_op_res_217396;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                    x_217391;\n                ((__local\n                  float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                    x_217392;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_228803;\n                    int32_t skip_waves_228804 = 1;\n                    float x_228788;\n                    float x_228789;\n                    float x_228790;\n                    float x_228791;\n                    \n                    offset_228803 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228766,\n                                  sext_i64_i32(segred_group_sizze_217382))) {\n                            x_228788 = ((__local\n                                         float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                                      offset_228803)];\n                            x_228789 = ((__local\n                                         float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                                      offset_228803)];\n                        }\n                    }\n                    offset_228803 = 1;\n                    while (slt32(offset_228803, wave_sizze_228768)) {\n                        if (slt32(local_tid_228766 + offset_228803,\n                           ",
                   "       sext_i64_i32(segred_group_sizze_217382)) &&\n                            ((local_tid_228766 - squot32(local_tid_228766,\n                                                         wave_sizze_228768) *\n                              wave_sizze_228768) & (2 * offset_228803 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228790 = ((volatile __local\n                                             float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                                          offset_228803)];\n                                x_228791 = ((volatile __local\n                                             float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                                          offset_228803)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228792 = x_228788 +\n                                      x_228790;\n                                float defunc_1_op_res_228793 = x_228789 +\n                                      x_228791;\n                                \n                                x_228788 = defunc_1_op_res_228792;\n                                x_228789 = defunc_1_op_res_228793;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                                    x_228788;\n                                ((volatile __local\n                                  float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                                    x_228789;\n                            }\n                       ",
                   " }\n                        offset_228803 *= 2;\n                    }\n                    while (slt32(skip_waves_228804,\n                                 squot32(sext_i64_i32(segred_group_sizze_217382) +\n                                         wave_sizze_228768 - 1,\n                                         wave_sizze_228768))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_228803 = skip_waves_228804 * wave_sizze_228768;\n                        if (slt32(local_tid_228766 + offset_228803,\n                                  sext_i64_i32(segred_group_sizze_217382)) &&\n                            ((local_tid_228766 - squot32(local_tid_228766,\n                                                         wave_sizze_228768) *\n                              wave_sizze_228768) == 0 &&\n                             (squot32(local_tid_228766, wave_sizze_228768) &\n                              (2 * skip_waves_228804 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228790 = ((__local\n                                             float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766 +\n                                                                          offset_228803)];\n                                x_228791 = ((__local\n                                             float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766 +\n                                                                          offset_228803)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228792 = x_228788 +\n                                      x_228790;\n                                float defunc_1_op_res_228793 = x_228789 +\n                                      x_228791;\n                                \n                                x_228788 = defunc_1_op_res_2",
                   "28792;\n                                x_228789 = defunc_1_op_res_228793;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_228770)[sext_i32_i64(local_tid_228766)] =\n                                    x_228788;\n                                ((__local\n                                  float *) red_arr_mem_228772)[sext_i32_i64(local_tid_228766)] =\n                                    x_228789;\n                            }\n                        }\n                        skip_waves_228804 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228766 == 0) {\n                            ((__global float *) mem_224258)[gtid_217387 *\n                                                            t_n_m_196759 +\n                                                            gtid_217388] =\n                                x_228788;\n                            ((__global float *) mem_224262)[gtid_217387 *\n                                                            t_n_m_196759 +\n                                                            gtid_217388] =\n                                x_228789;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_217382\n}\n__kernel void mainzisegred_large_218606(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_228971_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228969_backing_aligned_1,\n                                        __local volatile\n  ",
                   "                                      int64_t *red_arr_mem_228967_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228965_backing_aligned_3,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228963_backing_aligned_4,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228961_backing_aligned_5,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_218596,\n                                        int64_t groups_per_segment_228939,\n                                        int64_t elements_per_thread_228940,\n                                        int64_t virt_num_groups_228941,\n                                        int64_t threads_per_segment_228943,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224386,\n                                        __global unsigned char *mem_224404,\n                                        __global unsigned char *mem_224408,\n                                        __global unsigned char *mem_224412,\n                                        __global unsigned char *mem_224416,\n                                        __global unsigned char *mem_224420,\n                                        __global\n             ",
                   "                           unsigned char *segred_tmp_mem_228944,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228946,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228948,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228950,\n                                        __global\n                                        unsigned char *segred_tmp_mem_228952,\n                                        __global\n                                        unsigned char *mainzicounter_mem_228954)\n{\n    #define segred_group_sizze_218595 (mainzisegred_group_sizze_218044)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_228971_backing_5 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_228971_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228969_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228969_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228967_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228967_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_228965_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228965_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_228963_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228963_backing_aligned_4;\n    __local volatile unsig",
                   "ned char *restrict red_arr_mem_228961_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228961_backing_aligned_5;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228956;\n    int32_t local_tid_228957;\n    int64_t group_sizze_228960;\n    int32_t wave_sizze_228959;\n    int32_t group_tid_228958;\n    \n    global_tid_228956 = get_global_id(0);\n    local_tid_228957 = get_local_id(0);\n    group_sizze_228960 = get_local_size(0);\n    wave_sizze_228959 = LOCKSTEP_WIDTH;\n    group_tid_228958 = get_group_id(0);\n    \n    int32_t phys_tid_218606 = global_tid_228956;\n    __local unsigned char *red_arr_mem_228961;\n    \n    red_arr_mem_228961 = (__local unsigned char *) red_arr_mem_228961_backing_0;\n    \n    __local unsigned char *red_arr_mem_228963;\n    \n    red_arr_mem_228963 = (__local unsigned char *) red_arr_mem_228963_backing_1;\n    \n    __local unsigned char *red_arr_mem_228965;\n    \n    red_arr_mem_228965 = (__local unsigned char *) red_arr_mem_228965_backing_2;\n    \n    __local unsigned char *red_arr_mem_228967;\n    \n    red_arr_mem_228967 = (__local unsigned char *) red_arr_mem_228967_backing_3;\n    \n    __local unsigned char *red_arr_mem_228969;\n    \n    red_arr_mem_228969 = (__local unsigned char *) red_arr_mem_228969_backing_4;\n    \n    __local unsigned char *sync_arr_mem_228971;\n    \n    sync_arr_mem_228971 = (__local\n                           unsigned char *) sync_arr_mem_228971_backing_5;\n    \n    int32_t phys_group_id_228973;\n    \n    phys_group_id_228973 = get_group_id(0);\n    for (int32_t i_228974 = 0; i_228974 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_228941) - phys_group_id_228973,\n                   sext_i64_i32(num_groups_218596)); i_228974++) {\n        int32_t virt_group_id_228975 = phys_group_id_228973 + i_228974 *\n                sext_i64_i32(num_groups_218596);\n        int32_t flat_segment_id_228976 = squot32(virt_group_id_228975,\n        ",
                   "                                         sext_i64_i32(groups_per_segment_228939));\n        int64_t global_tid_228977 = srem64(sext_i32_i64(virt_group_id_228975) *\n                                           segred_group_sizze_218595 +\n                                           sext_i32_i64(local_tid_228957),\n                                           segred_group_sizze_218595 *\n                                           groups_per_segment_228939);\n        int64_t slice_228978 = t_n_m_196759;\n        int64_t slice_228979 = m_196691 * slice_228978;\n        int64_t gtid_218603 = squot64(sext_i32_i64(flat_segment_id_228976),\n                                      slice_228978);\n        int64_t remnant_228980 = sext_i32_i64(flat_segment_id_228976) -\n                gtid_218603 * slice_228978;\n        int64_t gtid_218604 = remnant_228980;\n        int64_t remnant_228981 = remnant_228980 - gtid_218604;\n        int64_t gtid_218605;\n        float x_acc_228982;\n        float x_acc_228983;\n        float x_acc_228984;\n        float x_acc_228985;\n        float x_acc_228986;\n        int64_t chunk_sizze_228987 = smin64(elements_per_thread_228940,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_228977,\n                                                      threads_per_segment_228943));\n        float x_218607;\n        float x_218608;\n        float x_218609;\n        float x_218610;\n        float x_218611;\n        float x_218612;\n        float x_218613;\n        float x_218614;\n        float x_218615;\n        float x_218616;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_228982 = 0.0F;\n            x_acc_228983 = 0.0F;\n            x_acc_228984 = 0.0F;\n            x_acc_228985 = 0.0F;\n            x_acc_228986 = 0.0F;\n        }\n        for (int64_t i_229003 = 0; i_229003 < chunk_sizze_228987; i_229003++) {\n            gtid_218605 = global_tid_228977 + threads_per_segment_22",
                   "8943 *\n                i_229003;\n            // apply map function\n            {\n                int64_t x_218623;\n                \n                x_218623 = ((__global int64_t *) ext_mem_222256)[gtid_218603];\n                \n                int64_t x_218628;\n                \n                x_218628 = ((__global int64_t *) ext_mem_222518)[gtid_218603 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_218604];\n                \n                float x_218629;\n                \n                x_218629 = ((__global float *) ext_mem_222517)[gtid_218603 *\n                                                               t_n_m_196759 +\n                                                               gtid_218604];\n                \n                int64_t binop_y_221772 = mul64(jump_t_196702, gtid_218604);\n                int64_t binop_y_221773 = smin64(i_196779, binop_y_221772);\n                int64_t index_primexp_221774 = add64((int64_t) 1,\n                                                     binop_y_221773);\n                bool cond_218632 = sle64(x_218623, gtid_218605);\n                int64_t defunc_0_f_res_218633;\n                \n                if (cond_218632) {\n                    defunc_0_f_res_218633 = (int64_t) 0;\n                } else {\n                    int64_t i_218634 = add64(gtid_218605, x_218628);\n                    int64_t defunc_0_add_arg_218635;\n                    \n                    defunc_0_add_arg_218635 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_218603 *\n                                                                           n_196692 +\n                                                                           i_218634];\n                    \n                    int64_t defunc_1_add_res_218636 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_218",
                   "635);\n                    \n                    defunc_0_f_res_218633 = defunc_1_add_res_218636;\n                }\n                \n                float defunc_0_f_res_218637;\n                \n                if (cond_218632) {\n                    defunc_0_f_res_218637 = 0.0F;\n                } else {\n                    int64_t i_218638 = add64(gtid_218605, x_218628);\n                    float defunc_0_add_arg_218639;\n                    \n                    defunc_0_add_arg_218639 = ((__global\n                                                float *) mem_224386)[gtid_218603 *\n                                                                     n_196692 +\n                                                                     i_218638];\n                    defunc_0_f_res_218637 = defunc_0_add_arg_218639;\n                }\n                \n                int64_t binop_p_218640 = sub64(defunc_0_f_res_218633,\n                                               index_primexp_221774);\n                float defunc_0_f_res_218641 = sitofp_i64_f32(binop_p_218640);\n                float abs_res_218642 = (float) fabs(defunc_0_f_res_218641);\n                float tmp1_218643 = abs_res_218642 / x_218629;\n                float x_218644 = tmp1_218643 * tmp1_218643;\n                float y_218645 = tmp1_218643 * x_218644;\n                float tmp2_218646 = 1.0F - y_218645;\n                float x_218647 = tmp2_218646 * tmp2_218646;\n                float tmp3_218648 = tmp2_218646 * x_218647;\n                float w_j_218649 = defunc_0_f_res_218637 * tmp3_218648;\n                float xw_j_218650 = defunc_0_f_res_218641 * w_j_218649;\n                float x2w_j_218651 = defunc_0_f_res_218641 * xw_j_218650;\n                float x3w_j_218652 = defunc_0_f_res_218641 * x2w_j_218651;\n                float x4w_j_218653 = defunc_0_f_res_218641 * x3w_j_218652;\n                \n                // save map-out results\n                { }\n                // load accumulator\n                {\n      ",
                   "              x_218607 = x_acc_228982;\n                    x_218608 = x_acc_228983;\n                    x_218609 = x_acc_228984;\n                    x_218610 = x_acc_228985;\n                    x_218611 = x_acc_228986;\n                }\n                // load new values\n                {\n                    x_218612 = w_j_218649;\n                    x_218613 = xw_j_218650;\n                    x_218614 = x2w_j_218651;\n                    x_218615 = x3w_j_218652;\n                    x_218616 = x4w_j_218653;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_218617 = x_218607 + x_218612;\n                    float defunc_1_op_res_218618 = x_218608 + x_218613;\n                    float defunc_1_op_res_218619 = x_218609 + x_218614;\n                    float defunc_1_op_res_218620 = x_218610 + x_218615;\n                    float defunc_1_op_res_218621 = x_218611 + x_218616;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_228982 = defunc_1_op_res_218617;\n                        x_acc_228983 = defunc_1_op_res_218618;\n                        x_acc_228984 = defunc_1_op_res_218619;\n                        x_acc_228985 = defunc_1_op_res_218620;\n                        x_acc_228986 = defunc_1_op_res_218621;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_218607 = x_acc_228982;\n            x_218608 = x_acc_228983;\n            x_218609 = x_acc_228984;\n            x_218610 = x_acc_228985;\n            x_218611 = x_acc_228986;\n            ((__local\n              float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                x_218607;\n            ((__local\n              float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                x_218608;\n            ((__local\n              float *) red_arr_mem_228965)[sex",
                   "t_i32_i64(local_tid_228957)] =\n                x_218609;\n            ((__local\n              float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957)] =\n                x_218610;\n            ((__local\n              float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                x_218611;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229004;\n        int32_t skip_waves_229005 = 1;\n        float x_228988;\n        float x_228989;\n        float x_228990;\n        float x_228991;\n        float x_228992;\n        float x_228993;\n        float x_228994;\n        float x_228995;\n        float x_228996;\n        float x_228997;\n        \n        offset_229004 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_228957,\n                      sext_i64_i32(segred_group_sizze_218595))) {\n                x_228988 = ((__local\n                             float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                          offset_229004)];\n                x_228989 = ((__local\n                             float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                          offset_229004)];\n                x_228990 = ((__local\n                             float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                          offset_229004)];\n                x_228991 = ((__local\n                             float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                          offset_229004)];\n                x_228992 = ((__local\n                             float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                          offset_229004)];\n            }\n        }\n        offset_229004 = 1;\n        while (slt32(offset_229004, wave_sizze_228959))",
                   " {\n            if (slt32(local_tid_228957 + offset_229004,\n                      sext_i64_i32(segred_group_sizze_218595)) &&\n                ((local_tid_228957 - squot32(local_tid_228957,\n                                             wave_sizze_228959) *\n                  wave_sizze_228959) & (2 * offset_229004 - 1)) == 0) {\n                // read array element\n                {\n                    x_228993 = ((volatile __local\n                                 float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228994 = ((volatile __local\n                                 float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228995 = ((volatile __local\n                                 float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228996 = ((volatile __local\n                                 float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228997 = ((volatile __local\n                                 float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228998 = x_228988 + x_228993;\n                    float defunc_1_op_res_228999 = x_228989 + x_228994;\n                    float defunc_1_op_res_229000 = x_228990 + x_228995;\n                    float defunc_1_op_res_229001 = x_228991 + x_228996;\n                    float defunc_1_op_res_229002 = x_228992 + x_228997;\n                    \n                    x_228988 = defunc_1_o",
                   "p_res_228998;\n                    x_228989 = defunc_1_op_res_228999;\n                    x_228990 = defunc_1_op_res_229000;\n                    x_228991 = defunc_1_op_res_229001;\n                    x_228992 = defunc_1_op_res_229002;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                        x_228988;\n                    ((volatile __local\n                      float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                        x_228989;\n                    ((volatile __local\n                      float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957)] =\n                        x_228990;\n                    ((volatile __local\n                      float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957)] =\n                        x_228991;\n                    ((volatile __local\n                      float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                        x_228992;\n                }\n            }\n            offset_229004 *= 2;\n        }\n        while (slt32(skip_waves_229005,\n                     squot32(sext_i64_i32(segred_group_sizze_218595) +\n                             wave_sizze_228959 - 1, wave_sizze_228959))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229004 = skip_waves_229005 * wave_sizze_228959;\n            if (slt32(local_tid_228957 + offset_229004,\n                      sext_i64_i32(segred_group_sizze_218595)) &&\n                ((local_tid_228957 - squot32(local_tid_228957,\n                                             wave_sizze_228959) *\n                  wave_sizze_228959) == 0 && (squot32(local_tid_228957,\n                                                      wave_sizze_228959) & (2 *\n                                                                            skip_waves_229005 -\n                           ",
                   "                                                 1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_228993 = ((__local\n                                 float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228994 = ((__local\n                                 float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228995 = ((__local\n                                 float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228996 = ((__local\n                                 float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                    x_228997 = ((__local\n                                 float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                              offset_229004)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_228998 = x_228988 + x_228993;\n                    float defunc_1_op_res_228999 = x_228989 + x_228994;\n                    float defunc_1_op_res_229000 = x_228990 + x_228995;\n                    float defunc_1_op_res_229001 = x_228991 + x_228996;\n                    float defunc_1_op_res_229002 = x_228992 + x_228997;\n                    \n                    x_228988 = defunc_1_op_res_228998;\n                    x_228989 = defunc_1_op_res_228999;\n                    x_228990 = defunc_1_op_res_229000;\n                    x_228991 = defunc_1_op_res_229001;\n                    x_228992 = defunc_1_op_res_229002;\n                }\n                // write result of opera",
                   "tion\n                {\n                    ((__local\n                      float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                        x_228988;\n                    ((__local\n                      float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                        x_228989;\n                    ((__local\n                      float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957)] =\n                        x_228990;\n                    ((__local\n                      float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957)] =\n                        x_228991;\n                    ((__local\n                      float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                        x_228992;\n                }\n            }\n            skip_waves_229005 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_228957) == (int64_t) 0) {\n                x_acc_228982 = x_228988;\n                x_acc_228983 = x_228989;\n                x_acc_228984 = x_228990;\n                x_acc_228985 = x_228991;\n                x_acc_228986 = x_228992;\n            }\n        }\n        if (groups_per_segment_228939 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_228957 == 0) {\n                    ((__global float *) mem_224404)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_228982;\n                    ((__global float *) mem_224408)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_228983;\n                    ((__global float *) mem_224412)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_228984;\n                    ((__global float *) mem_224416)[gtid_218603 * t_n_m_196759 +\n        ",
                   "                                            gtid_218604] = x_acc_228985;\n                    ((__global float *) mem_224420)[gtid_218603 * t_n_m_196759 +\n                                                    gtid_218604] = x_acc_228986;\n                }\n            }\n        } else {\n            int32_t old_counter_229006;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_228957 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_228944)[sext_i32_i64(virt_group_id_228975)] =\n                        x_acc_228982;\n                    ((__global\n                      float *) segred_tmp_mem_228946)[sext_i32_i64(virt_group_id_228975)] =\n                        x_acc_228983;\n                    ((__global\n                      float *) segred_tmp_mem_228948)[sext_i32_i64(virt_group_id_228975)] =\n                        x_acc_228984;\n                    ((__global\n                      float *) segred_tmp_mem_228950)[sext_i32_i64(virt_group_id_228975)] =\n                        x_acc_228985;\n                    ((__global\n                      float *) segred_tmp_mem_228952)[sext_i32_i64(virt_group_id_228975)] =\n                        x_acc_228986;\n                    mem_fence_global();\n                    old_counter_229006 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228954)[sext_i32_i64(srem32(flat_segment_id_228976,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_228971)[(int64_t) 0] =\n                        old_counter_229006 == groups_per_segment_228939 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n  ",
                   "          \n            bool is_last_group_229007;\n            \n            is_last_group_229007 = ((__local\n                                     bool *) sync_arr_mem_228971)[(int64_t) 0];\n            if (is_last_group_229007) {\n                if (local_tid_228957 == 0) {\n                    old_counter_229006 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_228954)[sext_i32_i64(srem32(flat_segment_id_228976,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_228939));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229008 =\n                            sdiv_up64(groups_per_segment_228939,\n                                      segred_group_sizze_218595);\n                    \n                    x_218607 = 0.0F;\n                    x_218608 = 0.0F;\n                    x_218609 = 0.0F;\n                    x_218610 = 0.0F;\n                    x_218611 = 0.0F;\n                    for (int64_t i_229009 = 0; i_229009 <\n                         read_per_thread_229008; i_229009++) {\n                        int64_t group_res_id_229010 =\n                                sext_i32_i64(local_tid_228957) *\n                                read_per_thread_229008 + i_229009;\n                        int64_t index_of_group_res_229011 =\n                                sext_i32_i64(flat_segment_id_228976) *\n                                groups_per_segment_228939 + group_res_id_229010;\n                        \n                        if (slt64(group_res_id_229010,\n                                  groups_per_segment_228939)) {\n                            x_218612 = ((__global\n                                         flo",
                   "at *) segred_tmp_mem_228944)[index_of_group_res_229011];\n                            x_218613 = ((__global\n                                         float *) segred_tmp_mem_228946)[index_of_group_res_229011];\n                            x_218614 = ((__global\n                                         float *) segred_tmp_mem_228948)[index_of_group_res_229011];\n                            x_218615 = ((__global\n                                         float *) segred_tmp_mem_228950)[index_of_group_res_229011];\n                            x_218616 = ((__global\n                                         float *) segred_tmp_mem_228952)[index_of_group_res_229011];\n                            \n                            float defunc_1_op_res_218617 = x_218607 + x_218612;\n                            float defunc_1_op_res_218618 = x_218608 + x_218613;\n                            float defunc_1_op_res_218619 = x_218609 + x_218614;\n                            float defunc_1_op_res_218620 = x_218610 + x_218615;\n                            float defunc_1_op_res_218621 = x_218611 + x_218616;\n                            \n                            x_218607 = defunc_1_op_res_218617;\n                            x_218608 = defunc_1_op_res_218618;\n                            x_218609 = defunc_1_op_res_218619;\n                            x_218610 = defunc_1_op_res_218620;\n                            x_218611 = defunc_1_op_res_218621;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                    x_218607;\n                ((__local\n                  float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                    x_218608;\n                ((__local\n                  float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957)] =\n                    x_218609;\n                ((__local\n                  float *) red_arr_mem_228967)[sext_i32_i64(loc",
                   "al_tid_228957)] =\n                    x_218610;\n                ((__local\n                  float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                    x_218611;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229012;\n                    int32_t skip_waves_229013 = 1;\n                    float x_228988;\n                    float x_228989;\n                    float x_228990;\n                    float x_228991;\n                    float x_228992;\n                    float x_228993;\n                    float x_228994;\n                    float x_228995;\n                    float x_228996;\n                    float x_228997;\n                    \n                    offset_229012 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_228957,\n                                  sext_i64_i32(segred_group_sizze_218595))) {\n                            x_228988 = ((__local\n                                         float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                                      offset_229012)];\n                            x_228989 = ((__local\n                                         float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                                      offset_229012)];\n                            x_228990 = ((__local\n                                         float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                                      offset_229012)];\n                            x_228991 = ((__local\n                                         float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                                      offset_229012)];\n               ",
                   "             x_228992 = ((__local\n                                         float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                                      offset_229012)];\n                        }\n                    }\n                    offset_229012 = 1;\n                    while (slt32(offset_229012, wave_sizze_228959)) {\n                        if (slt32(local_tid_228957 + offset_229012,\n                                  sext_i64_i32(segred_group_sizze_218595)) &&\n                            ((local_tid_228957 - squot32(local_tid_228957,\n                                                         wave_sizze_228959) *\n                              wave_sizze_228959) & (2 * offset_229012 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_228993 = ((volatile __local\n                                             float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228994 = ((volatile __local\n                                             float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228995 = ((volatile __local\n                                             float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228996 = ((volatile __local\n                                             float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228997 = ((volatile __local\n                               ",
                   "              float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228998 = x_228988 +\n                                      x_228993;\n                                float defunc_1_op_res_228999 = x_228989 +\n                                      x_228994;\n                                float defunc_1_op_res_229000 = x_228990 +\n                                      x_228995;\n                                float defunc_1_op_res_229001 = x_228991 +\n                                      x_228996;\n                                float defunc_1_op_res_229002 = x_228992 +\n                                      x_228997;\n                                \n                                x_228988 = defunc_1_op_res_228998;\n                                x_228989 = defunc_1_op_res_228999;\n                                x_228990 = defunc_1_op_res_229000;\n                                x_228991 = defunc_1_op_res_229001;\n                                x_228992 = defunc_1_op_res_229002;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                                    x_228988;\n                                ((volatile __local\n                                  float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                                    x_228989;\n                                ((volatile __local\n                                  float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957)] =\n                                    x_228990;\n                                ((volati",
                   "le __local\n                                  float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957)] =\n                                    x_228991;\n                                ((volatile __local\n                                  float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                                    x_228992;\n                            }\n                        }\n                        offset_229012 *= 2;\n                    }\n                    while (slt32(skip_waves_229013,\n                                 squot32(sext_i64_i32(segred_group_sizze_218595) +\n                                         wave_sizze_228959 - 1,\n                                         wave_sizze_228959))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229012 = skip_waves_229013 * wave_sizze_228959;\n                        if (slt32(local_tid_228957 + offset_229012,\n                                  sext_i64_i32(segred_group_sizze_218595)) &&\n                            ((local_tid_228957 - squot32(local_tid_228957,\n                                                         wave_sizze_228959) *\n                              wave_sizze_228959) == 0 &&\n                             (squot32(local_tid_228957, wave_sizze_228959) &\n                              (2 * skip_waves_229013 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_228993 = ((__local\n                                             float *) red_arr_mem_228961)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228994 = ((__local\n                                             float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228995 = ((__local\n",
                   "                                             float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228996 = ((__local\n                                             float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                                x_228997 = ((__local\n                                             float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957 +\n                                                                          offset_229012)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_228998 = x_228988 +\n                                      x_228993;\n                                float defunc_1_op_res_228999 = x_228989 +\n                                      x_228994;\n                                float defunc_1_op_res_229000 = x_228990 +\n                                      x_228995;\n                                float defunc_1_op_res_229001 = x_228991 +\n                                      x_228996;\n                                float defunc_1_op_res_229002 = x_228992 +\n                                      x_228997;\n                                \n                                x_228988 = defunc_1_op_res_228998;\n                                x_228989 = defunc_1_op_res_228999;\n                                x_228990 = defunc_1_op_res_229000;\n                                x_228991 = defunc_1_op_res_229001;\n                                x_228992 = defunc_1_op_res_229002;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_ar",
                   "r_mem_228961)[sext_i32_i64(local_tid_228957)] =\n                                    x_228988;\n                                ((__local\n                                  float *) red_arr_mem_228963)[sext_i32_i64(local_tid_228957)] =\n                                    x_228989;\n                                ((__local\n                                  float *) red_arr_mem_228965)[sext_i32_i64(local_tid_228957)] =\n                                    x_228990;\n                                ((__local\n                                  float *) red_arr_mem_228967)[sext_i32_i64(local_tid_228957)] =\n                                    x_228991;\n                                ((__local\n                                  float *) red_arr_mem_228969)[sext_i32_i64(local_tid_228957)] =\n                                    x_228992;\n                            }\n                        }\n                        skip_waves_229013 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_228957 == 0) {\n                            ((__global float *) mem_224404)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_228988;\n                            ((__global float *) mem_224408)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_228989;\n                            ((__global float *) mem_224412)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_228990;\n                            ((__global float *) mem_224416)[gtid_218603 *\n                             ",
                   "                               t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_228991;\n                            ((__global float *) mem_224420)[gtid_218603 *\n                                                            t_n_m_196759 +\n                                                            gtid_218604] =\n                                x_228992;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_218595\n}\n__kernel void mainzisegred_large_218707(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_229079_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_229077_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_229075_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_218700,\n                                        int64_t groups_per_segment_229059,\n                                        int64_t elements_per_thread_229060,\n                                        int64_t virt_num_groups_229061,\n                                        int64_t threads_per_segment_229063,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                       ",
                   " __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224386,\n                                        __global unsigned char *mem_224390,\n                                        __global unsigned char *mem_224425,\n                                        __global unsigned char *mem_224429,\n                                        __global unsigned char *mem_224433,\n                                        __global unsigned char *mem_224437,\n                                        __global unsigned char *mem_224441,\n                                        __global unsigned char *mem_224446,\n                                        __global unsigned char *mem_224450,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229064,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229066,\n                                        __global\n                                        unsigned char *mainzicounter_mem_229068)\n{\n    #define segred_group_sizze_218699 (mainzisegred_group_sizze_217915)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_229079_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_229079_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229077_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229077_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_229075_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229075",
                   "_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229070;\n    int32_t local_tid_229071;\n    int64_t group_sizze_229074;\n    int32_t wave_sizze_229073;\n    int32_t group_tid_229072;\n    \n    global_tid_229070 = get_global_id(0);\n    local_tid_229071 = get_local_id(0);\n    group_sizze_229074 = get_local_size(0);\n    wave_sizze_229073 = LOCKSTEP_WIDTH;\n    group_tid_229072 = get_group_id(0);\n    \n    int32_t phys_tid_218707 = global_tid_229070;\n    __local unsigned char *red_arr_mem_229075;\n    \n    red_arr_mem_229075 = (__local unsigned char *) red_arr_mem_229075_backing_0;\n    \n    __local unsigned char *red_arr_mem_229077;\n    \n    red_arr_mem_229077 = (__local unsigned char *) red_arr_mem_229077_backing_1;\n    \n    __local unsigned char *sync_arr_mem_229079;\n    \n    sync_arr_mem_229079 = (__local\n                           unsigned char *) sync_arr_mem_229079_backing_2;\n    \n    int32_t phys_group_id_229081;\n    \n    phys_group_id_229081 = get_group_id(0);\n    for (int32_t i_229082 = 0; i_229082 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_229061) - phys_group_id_229081,\n                   sext_i64_i32(num_groups_218700)); i_229082++) {\n        int32_t virt_group_id_229083 = phys_group_id_229081 + i_229082 *\n                sext_i64_i32(num_groups_218700);\n        int32_t flat_segment_id_229084 = squot32(virt_group_id_229083,\n                                                 sext_i64_i32(groups_per_segment_229059));\n        int64_t global_tid_229085 = srem64(sext_i32_i64(virt_group_id_229083) *\n                                           segred_group_sizze_218699 +\n                                           sext_i32_i64(local_tid_229071),\n                                           segred_group_sizze_218699 *\n                                           groups_per_segment_229059);\n        int64_t slice_229086 = t_n_m_196759;\n        int64_t slice_229087 = m_196691 * slice_229086;\n        int64_t gtid_218704 = squot6",
                   "4(sext_i32_i64(flat_segment_id_229084),\n                                      slice_229086);\n        int64_t remnant_229088 = sext_i32_i64(flat_segment_id_229084) -\n                gtid_218704 * slice_229086;\n        int64_t gtid_218705 = remnant_229088;\n        int64_t remnant_229089 = remnant_229088 - gtid_218705;\n        int64_t gtid_218706;\n        float x_acc_229090;\n        float x_acc_229091;\n        int64_t chunk_sizze_229092 = smin64(elements_per_thread_229060,\n                                            sdiv_up64(q_t_196696 -\n                                                      global_tid_229085,\n                                                      threads_per_segment_229063));\n        float x_218708;\n        float x_218709;\n        float x_218710;\n        float x_218711;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_229090 = 0.0F;\n            x_acc_229091 = 0.0F;\n        }\n        for (int64_t i_229099 = 0; i_229099 < chunk_sizze_229092; i_229099++) {\n            gtid_218706 = global_tid_229085 + threads_per_segment_229063 *\n                i_229099;\n            // apply map function\n            {\n                int64_t x_218715;\n                \n                x_218715 = ((__global int64_t *) ext_mem_222256)[gtid_218704];\n                \n                int64_t x_218726;\n                \n                x_218726 = ((__global int64_t *) ext_mem_222518)[gtid_218704 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_218705];\n                \n                float x_218727;\n                \n                x_218727 = ((__global float *) ext_mem_222517)[gtid_218704 *\n                                                               t_n_m_196759 +\n                                                               gtid_218705];\n                \n                int64_t binop_y_221767 = mul64(jump_t_196702, gtid_218705);\n       ",
                   "         int64_t binop_y_221768 = smin64(i_196779, binop_y_221767);\n                int64_t index_primexp_221769 = add64((int64_t) 1,\n                                                     binop_y_221768);\n                float a12_218729;\n                \n                a12_218729 = ((__global float *) mem_224425)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float b12_218730;\n                \n                b12_218730 = ((__global float *) mem_224429)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float c12_218731;\n                \n                c12_218731 = ((__global float *) mem_224433)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float b2_218732;\n                \n                b2_218732 = ((__global float *) mem_224437)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705];\n                \n                float c2_218733;\n                \n                c2_218733 = ((__global float *) mem_224441)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705];\n                \n                bool cond_218735 = sle64(x_218715, gtid_218706);\n                int64_t defunc_0_f_res_218736;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218736 = (int64_t) 0;\n                } else {\n                    int64_t i_218737 = add64(gtid_218706, x_218726);\n                   ",
                   " int64_t defunc_0_add_arg_218738;\n                    \n                    defunc_0_add_arg_218738 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_218704 *\n                                                                           n_196692 +\n                                                                           i_218737];\n                    \n                    int64_t defunc_1_add_res_218739 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_218738);\n                    \n                    defunc_0_f_res_218736 = defunc_1_add_res_218739;\n                }\n                \n                float defunc_0_f_res_218740;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218740 = 0.0F;\n                } else {\n                    int64_t i_218741 = add64(gtid_218706, x_218726);\n                    float defunc_0_add_arg_218742;\n                    \n                    defunc_0_add_arg_218742 = ((__global\n                                                float *) mem_224386)[gtid_218704 *\n                                                                     n_196692 +\n                                                                     i_218741];\n                    defunc_0_f_res_218740 = defunc_0_add_arg_218742;\n                }\n                \n                int64_t binop_p_218743 = sub64(defunc_0_f_res_218736,\n                                               index_primexp_221769);\n                float defunc_0_f_res_218744 = sitofp_i64_f32(binop_p_218743);\n                float abs_res_218745 = (float) fabs(defunc_0_f_res_218744);\n                float tmp1_218746 = abs_res_218745 / x_218727;\n                float x_218747 = tmp1_218746 * tmp1_218746;\n                float y_218748 = tmp1_218746 * x_218747;\n                float tmp2_218749 = 1.0F - y_218748;\n                float x_218750 = tmp2_218749 * tmp2_218749;\n                fl",
                   "oat tmp3_218751 = tmp2_218749 * x_218750;\n                float tmp4_218752 = defunc_0_f_res_218740 * tmp3_218751;\n                float defunc_1_f_res_218753 = defunc_0_f_res_218744 *\n                      tmp4_218752;\n                float defunc_1_f_res_218754 = defunc_0_f_res_218744 *\n                      defunc_1_f_res_218753;\n                float defunc_0_f_res_218755;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218755 = 0.0F;\n                } else {\n                    int64_t i_218756 = add64(gtid_218706, x_218726);\n                    float defunc_0_add_arg_218757;\n                    \n                    defunc_0_add_arg_218757 = ((__global\n                                                float *) mem_224390)[gtid_218704 *\n                                                                     n_196692 +\n                                                                     i_218756];\n                    defunc_0_f_res_218755 = defunc_0_add_arg_218757;\n                }\n                \n                float x_218758 = a12_218729 * tmp4_218752;\n                float y_218759 = b12_218730 * defunc_1_f_res_218753;\n                float x_218760 = x_218758 + y_218759;\n                float y_218761 = c12_218731 * defunc_1_f_res_218754;\n                float x_218762 = x_218760 + y_218761;\n                float defunc_9_fit_fun_res_218763 = defunc_0_f_res_218755 *\n                      x_218762;\n                float x_218764 = b12_218730 * tmp4_218752;\n                float y_218765 = b2_218732 * defunc_1_f_res_218753;\n                float x_218766 = x_218764 + y_218765;\n                float y_218767 = c2_218733 * defunc_1_f_res_218754;\n                float x_218768 = x_218766 + y_218767;\n                float defunc_9_slope_fun_res_218769 = defunc_0_f_res_218755 *\n                      x_218768;\n                \n                // save map-out results\n                { }\n                // load accumulator\n         ",
                   "       {\n                    x_218708 = x_acc_229090;\n                    x_218709 = x_acc_229091;\n                }\n                // load new values\n                {\n                    x_218710 = defunc_9_fit_fun_res_218763;\n                    x_218711 = defunc_9_slope_fun_res_218769;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_218712 = x_218708 + x_218710;\n                    float defunc_1_op_res_218713 = x_218709 + x_218711;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_229090 = defunc_1_op_res_218712;\n                        x_acc_229091 = defunc_1_op_res_218713;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_218708 = x_acc_229090;\n            x_218709 = x_acc_229091;\n            ((__local\n              float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                x_218708;\n            ((__local\n              float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                x_218709;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229100;\n        int32_t skip_waves_229101 = 1;\n        float x_229093;\n        float x_229094;\n        float x_229095;\n        float x_229096;\n        \n        offset_229100 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_229071,\n                      sext_i64_i32(segred_group_sizze_218699))) {\n                x_229093 = ((__local\n                             float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                          offset_229100)];\n                x_229094 = ((__local\n                             float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                          ",
                   "                offset_229100)];\n            }\n        }\n        offset_229100 = 1;\n        while (slt32(offset_229100, wave_sizze_229073)) {\n            if (slt32(local_tid_229071 + offset_229100,\n                      sext_i64_i32(segred_group_sizze_218699)) &&\n                ((local_tid_229071 - squot32(local_tid_229071,\n                                             wave_sizze_229073) *\n                  wave_sizze_229073) & (2 * offset_229100 - 1)) == 0) {\n                // read array element\n                {\n                    x_229095 = ((volatile __local\n                                 float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                              offset_229100)];\n                    x_229096 = ((volatile __local\n                                 float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                                              offset_229100)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229097 = x_229093 + x_229095;\n                    float defunc_1_op_res_229098 = x_229094 + x_229096;\n                    \n                    x_229093 = defunc_1_op_res_229097;\n                    x_229094 = defunc_1_op_res_229098;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                        x_229093;\n                    ((volatile __local\n                      float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                        x_229094;\n                }\n            }\n            offset_229100 *= 2;\n        }\n        while (slt32(skip_waves_229101,\n                     squot32(sext_i64_i32(segred_group_sizze_218699) +\n                             wave_sizze_229073 - 1, wave_sizze_229073))) {\n            barrier(",
                   "CLK_LOCAL_MEM_FENCE);\n            offset_229100 = skip_waves_229101 * wave_sizze_229073;\n            if (slt32(local_tid_229071 + offset_229100,\n                      sext_i64_i32(segred_group_sizze_218699)) &&\n                ((local_tid_229071 - squot32(local_tid_229071,\n                                             wave_sizze_229073) *\n                  wave_sizze_229073) == 0 && (squot32(local_tid_229071,\n                                                      wave_sizze_229073) & (2 *\n                                                                            skip_waves_229101 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_229095 = ((__local\n                                 float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                              offset_229100)];\n                    x_229096 = ((__local\n                                 float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                                              offset_229100)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229097 = x_229093 + x_229095;\n                    float defunc_1_op_res_229098 = x_229094 + x_229096;\n                    \n                    x_229093 = defunc_1_op_res_229097;\n                    x_229094 = defunc_1_op_res_229098;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                        x_229093;\n                    ((__local\n                      float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                        x_229094;\n                }\n            }\n            skip_waves_229101 *= 2;\n        }\n        b",
                   "arrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_229071) == (int64_t) 0) {\n                x_acc_229090 = x_229093;\n                x_acc_229091 = x_229094;\n            }\n        }\n        if (groups_per_segment_229059 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_229071 == 0) {\n                    ((__global float *) mem_224446)[gtid_218704 * t_n_m_196759 +\n                                                    gtid_218705] = x_acc_229090;\n                    ((__global float *) mem_224450)[gtid_218704 * t_n_m_196759 +\n                                                    gtid_218705] = x_acc_229091;\n                }\n            }\n        } else {\n            int32_t old_counter_229102;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_229071 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_229064)[sext_i32_i64(virt_group_id_229083)] =\n                        x_acc_229090;\n                    ((__global\n                      float *) segred_tmp_mem_229066)[sext_i32_i64(virt_group_id_229083)] =\n                        x_acc_229091;\n                    mem_fence_global();\n                    old_counter_229102 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229068)[sext_i32_i64(srem32(flat_segment_id_229084,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_229079)[(int64_t) 0] =\n                        old_counter_229102 == groups_per_segment_229059 -\n                        (int64_t) 1;\n                }\n            }\n            ba",
                   "rrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229103;\n            \n            is_last_group_229103 = ((__local\n                                     bool *) sync_arr_mem_229079)[(int64_t) 0];\n            if (is_last_group_229103) {\n                if (local_tid_229071 == 0) {\n                    old_counter_229102 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229068)[sext_i32_i64(srem32(flat_segment_id_229084,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_229059));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229104 =\n                            sdiv_up64(groups_per_segment_229059,\n                                      segred_group_sizze_218699);\n                    \n                    x_218708 = 0.0F;\n                    x_218709 = 0.0F;\n                    for (int64_t i_229105 = 0; i_229105 <\n                         read_per_thread_229104; i_229105++) {\n                        int64_t group_res_id_229106 =\n                                sext_i32_i64(local_tid_229071) *\n                                read_per_thread_229104 + i_229105;\n                        int64_t index_of_group_res_229107 =\n                                sext_i32_i64(flat_segment_id_229084) *\n                                groups_per_segment_229059 + group_res_id_229106;\n                        \n                        if (slt64(group_res_id_229106,\n                                  groups_per_segment_229059)) {\n                            x_218710 = ((__global\n                                         float *) segred_tmp_mem_229064)[index_of_group_res_229107];\n ",
                   "                           x_218711 = ((__global\n                                         float *) segred_tmp_mem_229066)[index_of_group_res_229107];\n                            \n                            float defunc_1_op_res_218712 = x_218708 + x_218710;\n                            float defunc_1_op_res_218713 = x_218709 + x_218711;\n                            \n                            x_218708 = defunc_1_op_res_218712;\n                            x_218709 = defunc_1_op_res_218713;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                    x_218708;\n                ((__local\n                  float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                    x_218709;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229108;\n                    int32_t skip_waves_229109 = 1;\n                    float x_229093;\n                    float x_229094;\n                    float x_229095;\n                    float x_229096;\n                    \n                    offset_229108 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_229071,\n                                  sext_i64_i32(segred_group_sizze_218699))) {\n                            x_229093 = ((__local\n                                         float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                                      offset_229108)];\n                            x_229094 = ((__local\n                                         float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                                                      offset_229108)];\n                        }\n                    }\n          ",
                   "          offset_229108 = 1;\n                    while (slt32(offset_229108, wave_sizze_229073)) {\n                        if (slt32(local_tid_229071 + offset_229108,\n                                  sext_i64_i32(segred_group_sizze_218699)) &&\n                            ((local_tid_229071 - squot32(local_tid_229071,\n                                                         wave_sizze_229073) *\n                              wave_sizze_229073) & (2 * offset_229108 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_229095 = ((volatile __local\n                                             float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                                          offset_229108)];\n                                x_229096 = ((volatile __local\n                                             float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                                                          offset_229108)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229097 = x_229093 +\n                                      x_229095;\n                                float defunc_1_op_res_229098 = x_229094 +\n                                      x_229096;\n                                \n                                x_229093 = defunc_1_op_res_229097;\n                                x_229094 = defunc_1_op_res_229098;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                                    x_229093;\n                                ((volatile __local\n  ",
                   "                                float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                                    x_229094;\n                            }\n                        }\n                        offset_229108 *= 2;\n                    }\n                    while (slt32(skip_waves_229109,\n                                 squot32(sext_i64_i32(segred_group_sizze_218699) +\n                                         wave_sizze_229073 - 1,\n                                         wave_sizze_229073))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229108 = skip_waves_229109 * wave_sizze_229073;\n                        if (slt32(local_tid_229071 + offset_229108,\n                                  sext_i64_i32(segred_group_sizze_218699)) &&\n                            ((local_tid_229071 - squot32(local_tid_229071,\n                                                         wave_sizze_229073) *\n                              wave_sizze_229073) == 0 &&\n                             (squot32(local_tid_229071, wave_sizze_229073) &\n                              (2 * skip_waves_229109 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_229095 = ((__local\n                                             float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071 +\n                                                                          offset_229108)];\n                                x_229096 = ((__local\n                                             float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071 +\n                                                                          offset_229108)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229097 = x_229093 +\n                                      x_229095;\n                     ",
                   "           float defunc_1_op_res_229098 = x_229094 +\n                                      x_229096;\n                                \n                                x_229093 = defunc_1_op_res_229097;\n                                x_229094 = defunc_1_op_res_229098;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_229075)[sext_i32_i64(local_tid_229071)] =\n                                    x_229093;\n                                ((__local\n                                  float *) red_arr_mem_229077)[sext_i32_i64(local_tid_229071)] =\n                                    x_229094;\n                            }\n                        }\n                        skip_waves_229109 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_229071 == 0) {\n                            ((__global float *) mem_224446)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705] =\n                                x_229093;\n                            ((__global float *) mem_224450)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705] =\n                                x_229094;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_218699\n}\n__kernel void mainzisegred_large_221141(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *sync_arr_mem_229588_backing_aligned_0,\n         ",
                   "                               __local volatile\n                                        int64_t *red_arr_mem_229586_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t stl_res_196773,\n                                        int64_t j_m_i_197246,\n                                        int64_t num_groups_221136,\n                                        int64_t groups_per_segment_229572,\n                                        int64_t elements_per_thread_229573,\n                                        int64_t virt_num_groups_229574,\n                                        int64_t threads_per_segment_229576,\n                                        __global unsigned char *ext_mem_224882,\n                                        __global unsigned char *mem_224899,\n                                        __global\n                                        unsigned char *segred_tmp_mem_229577,\n                                        __global\n                                        unsigned char *mainzicounter_mem_229579)\n{\n    #define segred_group_sizze_221135 (mainzisegred_group_sizze_221118)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict sync_arr_mem_229588_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) sync_arr_mem_229588_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229586_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229586_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229581;\n    int32_t local_tid_229582;\n    int64_t group_sizze_229585;\n    int32_t wave_sizze_229584;\n    int32_t group_tid_229583;\n    \n    global_tid_229581 = get_global_id(0);\n    local_tid_22",
                   "9582 = get_local_id(0);\n    group_sizze_229585 = get_local_size(0);\n    wave_sizze_229584 = LOCKSTEP_WIDTH;\n    group_tid_229583 = get_group_id(0);\n    \n    int32_t phys_tid_221141 = global_tid_229581;\n    __local unsigned char *red_arr_mem_229586;\n    \n    red_arr_mem_229586 = (__local unsigned char *) red_arr_mem_229586_backing_0;\n    \n    __local unsigned char *sync_arr_mem_229588;\n    \n    sync_arr_mem_229588 = (__local\n                           unsigned char *) sync_arr_mem_229588_backing_1;\n    \n    int32_t phys_group_id_229590;\n    \n    phys_group_id_229590 = get_group_id(0);\n    for (int32_t i_229591 = 0; i_229591 <\n         sdiv_up32(sext_i64_i32(virt_num_groups_229574) - phys_group_id_229590,\n                   sext_i64_i32(num_groups_221136)); i_229591++) {\n        int32_t virt_group_id_229592 = phys_group_id_229590 + i_229591 *\n                sext_i64_i32(num_groups_221136);\n        int32_t flat_segment_id_229593 = squot32(virt_group_id_229592,\n                                                 sext_i64_i32(groups_per_segment_229572));\n        int64_t global_tid_229594 = srem64(sext_i32_i64(virt_group_id_229592) *\n                                           segred_group_sizze_221135 +\n                                           sext_i32_i64(local_tid_229582),\n                                           segred_group_sizze_221135 *\n                                           groups_per_segment_229572);\n        int64_t slice_229595 = m_196691;\n        int64_t gtid_221139 = sext_i32_i64(flat_segment_id_229593);\n        int64_t remnant_229596 = sext_i32_i64(flat_segment_id_229593) -\n                gtid_221139;\n        int64_t gtid_221140;\n        float x_acc_229597;\n        int64_t chunk_sizze_229598 = smin64(elements_per_thread_229573,\n                                            sdiv_up64(j_m_i_197246 -\n                                                      global_tid_229594,\n                                                      threads_per_segment_229576));\n   ",
                   "     float x_221142;\n        float x_221143;\n        \n        // neutral-initialise the accumulators\n        {\n            x_acc_229597 = 0.0F;\n        }\n        for (int64_t i_229602 = 0; i_229602 < chunk_sizze_229598; i_229602++) {\n            gtid_221140 = global_tid_229594 + threads_per_segment_229576 *\n                i_229602;\n            // apply map function\n            {\n                int64_t slice_221317 = stl_res_196773 + gtid_221140;\n                float x_221146;\n                \n                x_221146 = ((__global float *) ext_mem_224882)[gtid_221139 *\n                                                               n_196692 +\n                                                               slice_221317];\n                // save map-out results\n                { }\n                // load accumulator\n                {\n                    x_221142 = x_acc_229597;\n                }\n                // load new values\n                {\n                    x_221143 = x_221146;\n                }\n                // apply reduction operator\n                {\n                    float defunc_1_op_res_221144 = x_221142 + x_221143;\n                    \n                    // store in accumulator\n                    {\n                        x_acc_229597 = defunc_1_op_res_221144;\n                    }\n                }\n            }\n        }\n        // to reduce current chunk, first store our result in memory\n        {\n            x_221142 = x_acc_229597;\n            ((__local\n              float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                x_221142;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        \n        int32_t offset_229603;\n        int32_t skip_waves_229604 = 1;\n        float x_229599;\n        float x_229600;\n        \n        offset_229603 = 0;\n        // participating threads read initial accumulator\n        {\n            if (slt32(local_tid_229582,\n                      sext_i64_i32(segred_group_sizze_221135))) {\n       ",
                   "         x_229599 = ((__local\n                             float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                          offset_229603)];\n            }\n        }\n        offset_229603 = 1;\n        while (slt32(offset_229603, wave_sizze_229584)) {\n            if (slt32(local_tid_229582 + offset_229603,\n                      sext_i64_i32(segred_group_sizze_221135)) &&\n                ((local_tid_229582 - squot32(local_tid_229582,\n                                             wave_sizze_229584) *\n                  wave_sizze_229584) & (2 * offset_229603 - 1)) == 0) {\n                // read array element\n                {\n                    x_229600 = ((volatile __local\n                                 float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                              offset_229603)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229601 = x_229599 + x_229600;\n                    \n                    x_229599 = defunc_1_op_res_229601;\n                }\n                // write result of operation\n                {\n                    ((volatile __local\n                      float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                        x_229599;\n                }\n            }\n            offset_229603 *= 2;\n        }\n        while (slt32(skip_waves_229604,\n                     squot32(sext_i64_i32(segred_group_sizze_221135) +\n                             wave_sizze_229584 - 1, wave_sizze_229584))) {\n            barrier(CLK_LOCAL_MEM_FENCE);\n            offset_229603 = skip_waves_229604 * wave_sizze_229584;\n            if (slt32(local_tid_229582 + offset_229603,\n                      sext_i64_i32(segred_group_sizze_221135)) &&\n                ((local_tid_229582 - squot32(local_tid_229582,\n                                             wave_sizze_229584) *\n      ",
                   "            wave_sizze_229584) == 0 && (squot32(local_tid_229582,\n                                                      wave_sizze_229584) & (2 *\n                                                                            skip_waves_229604 -\n                                                                            1)) ==\n                 0)) {\n                // read array element\n                {\n                    x_229600 = ((__local\n                                 float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                              offset_229603)];\n                }\n                // apply reduction operation\n                {\n                    float defunc_1_op_res_229601 = x_229599 + x_229600;\n                    \n                    x_229599 = defunc_1_op_res_229601;\n                }\n                // write result of operation\n                {\n                    ((__local\n                      float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                        x_229599;\n                }\n            }\n            skip_waves_229604 *= 2;\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // first thread saves the result in accumulator\n        {\n            if (sext_i32_i64(local_tid_229582) == (int64_t) 0) {\n                x_acc_229597 = x_229599;\n            }\n        }\n        if (groups_per_segment_229572 == (int64_t) 1) {\n            // first thread in group saves final result to memory\n            {\n                if (local_tid_229582 == 0) {\n                    ((__global float *) mem_224899)[gtid_221139] = x_acc_229597;\n                }\n            }\n        } else {\n            int32_t old_counter_229605;\n            \n            // first thread in group saves group result to global memory\n            {\n                if (local_tid_229582 == 0) {\n                    ((__global\n                      float *) segred_tmp_mem_229577)[sext_i32_i64(virt_group_id_229",
                   "592)] =\n                        x_acc_229597;\n                    mem_fence_global();\n                    old_counter_229605 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229579)[sext_i32_i64(srem32(flat_segment_id_229593,\n                                                                                                      10240))],\n                                              (int) 1);\n                    ((__local bool *) sync_arr_mem_229588)[(int64_t) 0] =\n                        old_counter_229605 == groups_per_segment_229572 -\n                        (int64_t) 1;\n                }\n            }\n            barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n            \n            bool is_last_group_229606;\n            \n            is_last_group_229606 = ((__local\n                                     bool *) sync_arr_mem_229588)[(int64_t) 0];\n            if (is_last_group_229606) {\n                if (local_tid_229582 == 0) {\n                    old_counter_229605 =\n                        atomic_add_i32_global(&((volatile __global\n                                                 int *) mainzicounter_mem_229579)[sext_i32_i64(srem32(flat_segment_id_229593,\n                                                                                                      10240))],\n                                              (int) ((int64_t) 0 -\n                                                     groups_per_segment_229572));\n                }\n                // read in the per-group-results\n                {\n                    int64_t read_per_thread_229607 =\n                            sdiv_up64(groups_per_segment_229572,\n                                      segred_group_sizze_221135);\n                    \n                    x_221142 = 0.0F;\n                    for (int64_t i_229608 = 0; i_229608 <\n                         read_per_thread_229607; i_229608++) {\n            ",
                   "            int64_t group_res_id_229609 =\n                                sext_i32_i64(local_tid_229582) *\n                                read_per_thread_229607 + i_229608;\n                        int64_t index_of_group_res_229610 =\n                                sext_i32_i64(flat_segment_id_229593) *\n                                groups_per_segment_229572 + group_res_id_229609;\n                        \n                        if (slt64(group_res_id_229609,\n                                  groups_per_segment_229572)) {\n                            x_221143 = ((__global\n                                         float *) segred_tmp_mem_229577)[index_of_group_res_229610];\n                            \n                            float defunc_1_op_res_221144 = x_221142 + x_221143;\n                            \n                            x_221142 = defunc_1_op_res_221144;\n                        }\n                    }\n                }\n                ((__local\n                  float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                    x_221142;\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // reduce the per-group results\n                {\n                    int32_t offset_229611;\n                    int32_t skip_waves_229612 = 1;\n                    float x_229599;\n                    float x_229600;\n                    \n                    offset_229611 = 0;\n                    // participating threads read initial accumulator\n                    {\n                        if (slt32(local_tid_229582,\n                                  sext_i64_i32(segred_group_sizze_221135))) {\n                            x_229599 = ((__local\n                                         float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                                      offset_229611)];\n                        }\n                    }\n                    offset_229611 = 1;\n                    while (slt",
                   "32(offset_229611, wave_sizze_229584)) {\n                        if (slt32(local_tid_229582 + offset_229611,\n                                  sext_i64_i32(segred_group_sizze_221135)) &&\n                            ((local_tid_229582 - squot32(local_tid_229582,\n                                                         wave_sizze_229584) *\n                              wave_sizze_229584) & (2 * offset_229611 - 1)) ==\n                            0) {\n                            // read array element\n                            {\n                                x_229600 = ((volatile __local\n                                             float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                                          offset_229611)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229601 = x_229599 +\n                                      x_229600;\n                                \n                                x_229599 = defunc_1_op_res_229601;\n                            }\n                            // write result of operation\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                                    x_229599;\n                            }\n                        }\n                        offset_229611 *= 2;\n                    }\n                    while (slt32(skip_waves_229612,\n                                 squot32(sext_i64_i32(segred_group_sizze_221135) +\n                                         wave_sizze_229584 - 1,\n                                         wave_sizze_229584))) {\n                        barrier(CLK_LOCAL_MEM_FENCE);\n                        offset_229611 = skip_waves_229612 * wave_sizze_229584;\n                        if (slt32(local_ti",
                   "d_229582 + offset_229611,\n                                  sext_i64_i32(segred_group_sizze_221135)) &&\n                            ((local_tid_229582 - squot32(local_tid_229582,\n                                                         wave_sizze_229584) *\n                              wave_sizze_229584) == 0 &&\n                             (squot32(local_tid_229582, wave_sizze_229584) &\n                              (2 * skip_waves_229612 - 1)) == 0)) {\n                            // read array element\n                            {\n                                x_229600 = ((__local\n                                             float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582 +\n                                                                          offset_229611)];\n                            }\n                            // apply reduction operation\n                            {\n                                float defunc_1_op_res_229601 = x_229599 +\n                                      x_229600;\n                                \n                                x_229599 = defunc_1_op_res_229601;\n                            }\n                            // write result of operation\n                            {\n                                ((__local\n                                  float *) red_arr_mem_229586)[sext_i32_i64(local_tid_229582)] =\n                                    x_229599;\n                            }\n                        }\n                        skip_waves_229612 *= 2;\n                    }\n                    // and back to memory with the final result\n                    {\n                        if (local_tid_229582 == 0) {\n                            ((__global float *) mem_224899)[gtid_221139] =\n                                x_229599;\n                        }\n                    }\n                }\n            }\n        }\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n   ",
                   " #undef segred_group_sizze_221135\n}\n__kernel void mainzisegred_small_205086(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_225991_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_205079,\n                                        int64_t segment_sizze_nonzzero_225984,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_222744,\n                                        __global unsigned char *mem_222754)\n{\n    #define segred_group_sizze_205078 (mainzisegred_group_sizze_204259)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_225991_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_225991_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_225986;\n    int32_t local_tid_225987;\n    int64_t group_sizze_225990;\n    int32_t wave_sizze_225989;\n    int32_t group_tid_225988;\n    \n    global_tid_225986 = get_global_id(0);\n    local_tid_225987 = get_local_id(0);\n    group_sizze_225990 = get_local_size(0);\n    wave_sizze_225989 = LOCKSTEP_WIDTH;\n    group_tid_2",
                   "25988 = get_group_id(0);\n    \n    int32_t phys_tid_205086 = global_tid_225986;\n    __local unsigned char *red_arr_mem_225991;\n    \n    red_arr_mem_225991 = (__local unsigned char *) red_arr_mem_225991_backing_0;\n    \n    int32_t phys_group_id_225993;\n    \n    phys_group_id_225993 = get_group_id(0);\n    for (int32_t i_225994 = 0; i_225994 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_205078,\n                                                  segment_sizze_nonzzero_225984))) -\n                   phys_group_id_225993, sext_i64_i32(num_groups_205079));\n         i_225994++) {\n        int32_t virt_group_id_225995 = phys_group_id_225993 + i_225994 *\n                sext_i64_i32(num_groups_205079);\n        int64_t slice_225996 = s_n_m_196745;\n        int64_t slice_225997 = n_p_196694 * slice_225996;\n        int64_t slice_225998 = m_196691 * slice_225997;\n        int64_t gtid_205082 = squot64(squot64(sext_i32_i64(local_tid_225987),\n                                              segment_sizze_nonzzero_225984) +\n                                      sext_i32_i64(virt_group_id_225995) *\n                                      squot64(segred_group_sizze_205078,\n                                              segment_sizze_nonzzero_225984),\n                                      slice_225997);\n        int64_t remnant_225999 = squot64(sext_i32_i64(local_tid_225987),\n                                         segment_sizze_nonzzero_225984) +\n                sext_i32_i64(virt_group_id_225995) *\n                squot64(segred_group_sizze_205078,\n                        segment_sizze_nonzzero_225984) - gtid_205082 *\n                slice_225997;\n        int64_t gtid_205083 = squot64(remnant_225999, slice_225996);\n        int64_t remnant_226000 = remnant_225999 - gtid_205083 * slice_225996;\n        int64_t gtid_205084 = remnant_226000;\n        int64_t remnant_226001 = remnant_226000 - gtid_2",
                   "05084;\n        int64_t gtid_205085 = srem64(sext_i32_i64(local_tid_225987),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_205082,\n                                                           m_196691) &&\n                                                     slt64(gtid_205083,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_205084,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_225987),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_205078,\n                                                                 segment_sizze_nonzzero_225984)))) {\n                int64_t x_205098;\n                \n                x_205098 = ((__global int64_t *) ext_mem_222321)[gtid_205082 *\n                                                                 n_p_196694 +\n                                                                 gtid_205083];\n                \n                int64_t x_205102;\n                \n                x_205102 = ((__global int64_t *) ext_mem_222420)[gtid_205082 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_205083 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_205084];\n                \n                float x_205103;\n                \n                x_205103 = ((__global float *) ext_mem_222419)[gtid_205082 *\n                                              ",
                   "                 (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_205083 *\n                                                               s_n_m_196745 +\n                                                               gtid_205084];\n                \n                int64_t defunc_0_m_fun_res_205104;\n                \n                defunc_0_m_fun_res_205104 = ((__global\n                                              int64_t *) mem_222744)[gtid_205082 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_205083 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_205084];\n                \n                bool cond_205106 = sle64(x_205098, gtid_205085);\n                int64_t defunc_0_f_res_205107;\n                \n                if (cond_205106) {\n                    defunc_0_f_res_205107 = (int64_t) 0;\n                } else {\n                    int64_t i_205108 = add64(gtid_205085, x_205102);\n                    int64_t defunc_0_add_arg_205109;\n                    \n                    defunc_0_add_arg_205109 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_205082 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_205083 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_205108];",
                   "\n                    \n                    int64_t defunc_1_add_res_205110 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_205109);\n                    \n                    defunc_0_f_res_205107 = defunc_1_add_res_205110;\n                }\n                \n                float defunc_0_f_res_205111;\n                \n                if (cond_205106) {\n                    defunc_0_f_res_205111 = 0.0F;\n                } else {\n                    int64_t i_205112 = add64(gtid_205085, x_205102);\n                    float defunc_0_add_arg_205113;\n                    \n                    defunc_0_add_arg_205113 = ((__global\n                                                float *) mem_222588)[gtid_205082 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_205083 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205112];\n                    defunc_0_f_res_205111 = defunc_0_add_arg_205113;\n                }\n                \n                int64_t binop_p_205114 = sub64(defunc_0_f_res_205107,\n                                               defunc_0_m_fun_res_205104);\n                float defunc_0_f_res_205115 = sitofp_i64_f32(binop_p_205114);\n                float abs_res_205116 = (float) fabs(defunc_0_f_res_205115);\n                float tmp1_205117 = abs_res_205116 / x_205103;\n                float x_205118 = tmp1_205117 * tmp1_205117;\n                float y_205119 = tmp1_205117 * x_205118;\n                float tmp2_205120 = 1.0F - y_205119;\n                float x_205121 = tmp2_205120 * tmp2_205120;\n                float tmp3_205122 = tmp2_205120 * x_205121;\n                float w_j_205123 = defunc_0_f_res_2",
                   "05111 * tmp3_205122;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                        w_j_205123;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_205087;\n                float x_205088;\n                float x_226002;\n                float x_226003;\n                bool ltid_in_bounds_226005 =\n                     slt64(sext_i32_i64(local_tid_225987), q_s_196695 *\n                           squot64(segred_group_sizze_205078,\n                                   segment_sizze_nonzzero_225984));\n                int32_t skip_threads_226006;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226005) {\n                        x_205088 = ((volatile __local\n                                     float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)];\n                        if ((local_tid_225987 - squot32(local_tid_225987, 32) *\n                             32) == 0) {\n                            x_205087 = x_205088;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226006 = 1;\n                    while (slt32(skip_threads_226006, 32)) {\n                        bool thread_active_226007 = sle32(skip_threads_226006,\n                                                          local_tid_225987 -\n                                                 ",
                   "         squot32(local_tid_225987,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226005;\n                        \n                        if (thread_active_226007) {\n                            // read operands\n                            {\n                                x_205087 = ((volatile __local\n                                             float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987) -\n                                                                          sext_i32_i64(skip_threads_226006)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226008 =\n                                 slt64(srem64(sext_i32_i64(local_tid_225987),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_225987) -\n                                       sext_i32_i64(local_tid_225987 -\n                                       skip_threads_226006));\n                            \n                            if (thread_active_226007 && inactive_226008) {\n                                x_205087 = x_205088;\n                            }\n                            if (thread_active_226007) {\n                                if (!inactive_226008) {\n                                    float defunc_1_op_res_205089 = x_205087 +\n                                          x_205088;\n                                    \n                                    x_205087 = defunc_1_op_res_205089;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_225989, skip_threads_226006)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226007) {\n                            // write result",
                   "\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                                    x_205087;\n                                x_205088 = x_205087;\n                            }\n                        }\n                        if (sle32(wave_sizze_225989, skip_threads_226006)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226006 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_225987 - squot32(local_tid_225987, 32) *\n                         32) == 31 && ltid_in_bounds_226005) {\n                        ((volatile __local\n                          float *) red_arr_mem_225991)[sext_i32_i64(squot32(local_tid_225987,\n                                                                            32))] =\n                            x_205087;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226009;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_225987, 32) == 0 &&\n                            ltid_in_bounds_226005) {\n                            x_226003 = ((volatile __local\n                                         float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)];\n                            if ((local_tid_225987 - squot32(local_tid_225987,\n                                                            32) * 32) == 0) {\n                                x_226002 = x_226003;\n                            }\n            ",
                   "            }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226009 = 1;\n                        while (slt32(skip_threads_226009, 32)) {\n                            bool thread_active_226010 =\n                                 sle32(skip_threads_226009, local_tid_225987 -\n                                       squot32(local_tid_225987, 32) * 32) &&\n                                 (squot32(local_tid_225987, 32) == 0 &&\n                                  ltid_in_bounds_226005);\n                            \n                            if (thread_active_226010) {\n                                // read operands\n                                {\n                                    x_226002 = ((volatile __local\n                                                 float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987) -\n                                                                              sext_i32_i64(skip_threads_226009)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226011 =\n                                     slt64(srem64(sext_i32_i64(local_tid_225987 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_225987 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_225987 -\n                                                         skip_threads_226009) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226010 && inactive_226011) {\n                                    x_226002 = x_226003;\n                                }\n                                if (thread_active_2",
                   "26010) {\n                                    if (!inactive_226011) {\n                                        float defunc_1_op_res_226004 =\n                                              x_226002 + x_226003;\n                                        \n                                        x_226002 = defunc_1_op_res_226004;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_225989, skip_threads_226009)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226010) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                                        x_226002;\n                                    x_226003 = x_226002;\n                                }\n                            }\n                            if (sle32(wave_sizze_225989, skip_threads_226009)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226009 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226012 = squot32(local_tid_225987, 32) == 0 ||\n                     !ltid_in_bounds_226005;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226012) {\n                            x_205088 = x_205087;\n                            x_205087 = ((__local\n                                         float *) red_arr_mem_225991)[sext_i32_i64(squot32(local_tid_225987,\n                                           ",
                   "                                                32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226013 =\n                             slt64(srem64(sext_i32_i64(local_tid_225987),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_225987) -\n                                   sext_i32_i64(squot32(local_tid_225987, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226012) {\n                            if (inactive_226013) {\n                                x_205087 = x_205088;\n                            }\n                        }\n                        if (!no_carry_in_226012) {\n                            if (!inactive_226013) {\n                                float defunc_1_op_res_205089 = x_205087 +\n                                      x_205088;\n                                \n                                x_205087 = defunc_1_op_res_205089;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226012) {\n                            ((__local\n                              float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                                x_205087;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_225987, 32) == 0 &&\n                        ltid_in_bounds_226005) {\n                        ((__local\n                          float *) red_arr_mem_225991)[sext_i32_i64(local_tid_225987)] =\n                            x_20",
                   "5088;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_225995) *\n                      squot64(segred_group_sizze_205078,\n                              segment_sizze_nonzzero_225984) +\n                      sext_i32_i64(local_tid_225987), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_225987),\n                                             squot64(segred_group_sizze_205078,\n                                                     segment_sizze_nonzzero_225984))) {\n                float tmp_226014;\n                \n                tmp_226014 = ((__local\n                               float *) red_arr_mem_225991)[(sext_i32_i64(local_tid_225987) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_225984 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_222754)[squot64(sext_i32_i64(virt_group_id_225995) *\n                                               squot64(segred_group_sizze_205078,\n                                                       segment_sizze_nonzzero_225984) +\n                                               sext_i32_i64(local_tid_225987),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_225995) *\n                                               squot64(segred_group_sizze_205078,\n                                                       segment_sizze_nonzzero_225984) +\n                                               sext_i32_i64(local_tid_225987) -\n                            ",
                   "                   squot64(sext_i32_i64(virt_group_id_225995) *\n                                                       squot64(segred_group_sizze_205078,\n                                                               segment_sizze_nonzzero_225984) +\n                                                       sext_i32_i64(local_tid_225987),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_225995) *\n                                        squot64(segred_group_sizze_205078,\n                                                segment_sizze_nonzzero_225984) +\n                                        sext_i32_i64(local_tid_225987) -\n                                        squot64(sext_i32_i64(virt_group_id_225995) *\n                                                squot64(segred_group_sizze_205078,\n                                                        segment_sizze_nonzzero_225984) +\n                                                sext_i32_i64(local_tid_225987),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_225995) *\n                                                squot64(segred_group_sizze_205078,\n                                                        segment_sizze_nonzzero_225984) +\n                                                sext_i32_i64(local_tid_225987) -\n                                                squot64(sext_i32_i64(virt_group_id_225995) *\n                                                        squot64(segred_group_sizze_205078,\n                                                          ",
                   "      segment_sizze_nonzzero_225984) +\n                                                        sext_i32_i64(local_tid_225987),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226014;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_205078\n}\n__kernel void mainzisegred_small_205160(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226079_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_205153,\n                                        int64_t segment_sizze_nonzzero_226072,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_222760,\n                                        __global unsigned char *mem_222765,\n                                        __global unsigned char *mem_222771)\n{\n    #define s",
                   "egred_group_sizze_205152 (mainzisegred_group_sizze_204157)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226079_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226079_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226074;\n    int32_t local_tid_226075;\n    int64_t group_sizze_226078;\n    int32_t wave_sizze_226077;\n    int32_t group_tid_226076;\n    \n    global_tid_226074 = get_global_id(0);\n    local_tid_226075 = get_local_id(0);\n    group_sizze_226078 = get_local_size(0);\n    wave_sizze_226077 = LOCKSTEP_WIDTH;\n    group_tid_226076 = get_group_id(0);\n    \n    int32_t phys_tid_205160 = global_tid_226074;\n    __local unsigned char *red_arr_mem_226079;\n    \n    red_arr_mem_226079 = (__local unsigned char *) red_arr_mem_226079_backing_0;\n    \n    int32_t phys_group_id_226081;\n    \n    phys_group_id_226081 = get_group_id(0);\n    for (int32_t i_226082 = 0; i_226082 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_205152,\n                                                  segment_sizze_nonzzero_226072))) -\n                   phys_group_id_226081, sext_i64_i32(num_groups_205153));\n         i_226082++) {\n        int32_t virt_group_id_226083 = phys_group_id_226081 + i_226082 *\n                sext_i64_i32(num_groups_205153);\n        int64_t slice_226084 = s_n_m_196745;\n        int64_t slice_226085 = n_p_196694 * slice_226084;\n        int64_t slice_226086 = m_196691 * slice_226085;\n        int64_t gtid_205156 = squot64(squot64(sext_i32_i64(local_tid_226075),\n                                              segment_sizze_nonzzero_226072) +\n                                      sext_i32_i64(virt_group_id_226083) *\n                                   ",
                   "   squot64(segred_group_sizze_205152,\n                                              segment_sizze_nonzzero_226072),\n                                      slice_226085);\n        int64_t remnant_226087 = squot64(sext_i32_i64(local_tid_226075),\n                                         segment_sizze_nonzzero_226072) +\n                sext_i32_i64(virt_group_id_226083) *\n                squot64(segred_group_sizze_205152,\n                        segment_sizze_nonzzero_226072) - gtid_205156 *\n                slice_226085;\n        int64_t gtid_205157 = squot64(remnant_226087, slice_226084);\n        int64_t remnant_226088 = remnant_226087 - gtid_205157 * slice_226084;\n        int64_t gtid_205158 = remnant_226088;\n        int64_t remnant_226089 = remnant_226088 - gtid_205158;\n        int64_t gtid_205159 = srem64(sext_i32_i64(local_tid_226075),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_205156,\n                                                           m_196691) &&\n                                                     slt64(gtid_205157,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_205158,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_226075),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_205152,\n                                                                 segment_sizze_nonzzero_226072)))) {\n                int64_t x_205175;\n                \n                x_205175 = ((__global int64_t *) ext_mem_222321)[gtid_205156 *\n                                                                 n_p_196694 +\n                                            ",
                   "                     gtid_205157];\n                \n                int64_t x_205180;\n                \n                x_205180 = ((__global int64_t *) ext_mem_222420)[gtid_205156 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_205157 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_205158];\n                \n                float x_205181;\n                \n                x_205181 = ((__global float *) ext_mem_222419)[gtid_205156 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_205157 *\n                                                               s_n_m_196745 +\n                                                               gtid_205158];\n                \n                float a0_205182;\n                \n                a0_205182 = ((__global float *) mem_222760)[gtid_205156 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_205157 *\n                                                            s_n_m_196745 +\n                                                            gtid_205158];\n                \n                int64_t defunc_0_m_fun_res_205183;\n                \n                defunc_0_m_fun_res_205183 = ((__global\n                                              int64_t *) mem_222765)[gtid_205156 *\n                                                                     (s_n_m_196745 *\n                                                                ",
                   "      n_p_196694) +\n                                                                     gtid_205157 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_205158];\n                \n                bool cond_205185 = sle64(x_205175, gtid_205159);\n                int64_t defunc_0_f_res_205186;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205186 = (int64_t) 0;\n                } else {\n                    int64_t i_205187 = add64(gtid_205159, x_205180);\n                    int64_t defunc_0_add_arg_205188;\n                    \n                    defunc_0_add_arg_205188 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_205156 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_205157 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_205187];\n                    \n                    int64_t defunc_1_add_res_205189 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_205188);\n                    \n                    defunc_0_f_res_205186 = defunc_1_add_res_205189;\n                }\n                \n                float defunc_0_f_res_205190;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205190 = 0.0F;\n                } else {\n                    int64_t i_205191 = add64(gtid_205159, x_205180);\n                    float defunc_0_add_arg_205192;\n                    \n                    defunc_0_add_arg_205192 = ((__global\n                                       ",
                   "         float *) mem_222588)[gtid_205156 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_205157 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205191];\n                    defunc_0_f_res_205190 = defunc_0_add_arg_205192;\n                }\n                \n                int64_t binop_p_205193 = sub64(defunc_0_f_res_205186,\n                                               defunc_0_m_fun_res_205183);\n                float defunc_0_f_res_205194 = sitofp_i64_f32(binop_p_205193);\n                float abs_res_205195 = (float) fabs(defunc_0_f_res_205194);\n                float tmp1_205196 = abs_res_205195 / x_205181;\n                float x_205197 = tmp1_205196 * tmp1_205196;\n                float y_205198 = tmp1_205196 * x_205197;\n                float tmp2_205199 = 1.0F - y_205198;\n                float x_205200 = tmp2_205199 * tmp2_205199;\n                float tmp3_205201 = tmp2_205199 * x_205200;\n                float tmp4_205202 = defunc_0_f_res_205190 * tmp3_205201;\n                float defunc_0_f_res_205203;\n                \n                if (cond_205185) {\n                    defunc_0_f_res_205203 = 0.0F;\n                } else {\n                    int64_t i_205204 = add64(gtid_205159, x_205180);\n                    float defunc_0_add_arg_205205;\n                    \n                    defunc_0_add_arg_205205 = ((__global\n                                                float *) mem_222583)[gtid_205156 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                              ",
                   "       gtid_205157 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_205204];\n                    defunc_0_f_res_205203 = defunc_0_add_arg_205205;\n                }\n                \n                float x_205206 = a0_205182 * tmp4_205202;\n                float defunc_9_fit_fun_res_205207 = defunc_0_f_res_205203 *\n                      x_205206;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                        defunc_9_fit_fun_res_205207;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_205161;\n                float x_205162;\n                float x_226090;\n                float x_226091;\n                bool ltid_in_bounds_226093 =\n                     slt64(sext_i32_i64(local_tid_226075), q_s_196695 *\n                           squot64(segred_group_sizze_205152,\n                                   segment_sizze_nonzzero_226072));\n                int32_t skip_threads_226094;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226093) {\n                        x_205162 = ((volatile __local\n                                     float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)];\n                        if ((local_tid_226075 - squot32(local_tid_226075, 32) *\n                             32) == 0) {\n                            x_205161 = x_205162;",
                   "\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226094 = 1;\n                    while (slt32(skip_threads_226094, 32)) {\n                        bool thread_active_226095 = sle32(skip_threads_226094,\n                                                          local_tid_226075 -\n                                                          squot32(local_tid_226075,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226093;\n                        \n                        if (thread_active_226095) {\n                            // read operands\n                            {\n                                x_205161 = ((volatile __local\n                                             float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075) -\n                                                                          sext_i32_i64(skip_threads_226094)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226096 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226075),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226075) -\n                                       sext_i32_i64(local_tid_226075 -\n                                       skip_threads_226094));\n                            \n                            if (thread_active_226095 && inactive_226096) {\n                                x_205161 = x_205162;\n                            }\n                            if (thread_active_226095) {\n                                if (!inactive_226096) {\n                                    float defunc_1_op_res_205163 = x_205161 +\n                                          x_20",
                   "5162;\n                                    \n                                    x_205161 = defunc_1_op_res_205163;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_226077, skip_threads_226094)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226095) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                                    x_205161;\n                                x_205162 = x_205161;\n                            }\n                        }\n                        if (sle32(wave_sizze_226077, skip_threads_226094)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226094 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_226075 - squot32(local_tid_226075, 32) *\n                         32) == 31 && ltid_in_bounds_226093) {\n                        ((volatile __local\n                          float *) red_arr_mem_226079)[sext_i32_i64(squot32(local_tid_226075,\n                                                                            32))] =\n                            x_205161;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226097;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226075, 32) == 0 &&\n     ",
                   "                       ltid_in_bounds_226093) {\n                            x_226091 = ((volatile __local\n                                         float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)];\n                            if ((local_tid_226075 - squot32(local_tid_226075,\n                                                            32) * 32) == 0) {\n                                x_226090 = x_226091;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226097 = 1;\n                        while (slt32(skip_threads_226097, 32)) {\n                            bool thread_active_226098 =\n                                 sle32(skip_threads_226097, local_tid_226075 -\n                                       squot32(local_tid_226075, 32) * 32) &&\n                                 (squot32(local_tid_226075, 32) == 0 &&\n                                  ltid_in_bounds_226093);\n                            \n                            if (thread_active_226098) {\n                                // read operands\n                                {\n                                    x_226090 = ((volatile __local\n                                                 float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075) -\n                                                                              sext_i32_i64(skip_threads_226097)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226099 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226075 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226075 * 32 +\n                                           32 - 1) -\n        ",
                   "                                   sext_i32_i64((local_tid_226075 -\n                                                         skip_threads_226097) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226098 && inactive_226099) {\n                                    x_226090 = x_226091;\n                                }\n                                if (thread_active_226098) {\n                                    if (!inactive_226099) {\n                                        float defunc_1_op_res_226092 =\n                                              x_226090 + x_226091;\n                                        \n                                        x_226090 = defunc_1_op_res_226092;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226077, skip_threads_226097)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226098) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                                        x_226090;\n                                    x_226091 = x_226090;\n                                }\n                            }\n                            if (sle32(wave_sizze_226077, skip_threads_226097)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226097 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226100 = squot32(local_tid_226075, 32) == 0 ||\n                     !ltid_in_bounds_2260",
                   "93;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226100) {\n                            x_205162 = x_205161;\n                            x_205161 = ((__local\n                                         float *) red_arr_mem_226079)[sext_i32_i64(squot32(local_tid_226075,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226101 =\n                             slt64(srem64(sext_i32_i64(local_tid_226075),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226075) -\n                                   sext_i32_i64(squot32(local_tid_226075, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226100) {\n                            if (inactive_226101) {\n                                x_205161 = x_205162;\n                            }\n                        }\n                        if (!no_carry_in_226100) {\n                            if (!inactive_226101) {\n                                float defunc_1_op_res_205163 = x_205161 +\n                                      x_205162;\n                                \n                                x_205161 = defunc_1_op_res_205163;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226100) {\n                            ((__local\n                              float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                                x_20",
                   "5161;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226075, 32) == 0 &&\n                        ltid_in_bounds_226093) {\n                        ((__local\n                          float *) red_arr_mem_226079)[sext_i32_i64(local_tid_226075)] =\n                            x_205162;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226083) *\n                      squot64(segred_group_sizze_205152,\n                              segment_sizze_nonzzero_226072) +\n                      sext_i32_i64(local_tid_226075), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226075),\n                                             squot64(segred_group_sizze_205152,\n                                                     segment_sizze_nonzzero_226072))) {\n                float tmp_226102;\n                \n                tmp_226102 = ((__local\n                               float *) red_arr_mem_226079)[(sext_i32_i64(local_tid_226075) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226072 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_222771)[squot64(sext_i32_i64(virt_group_id_226083) *\n                                               squot64(segred_group_sizze_205152,\n                                                       segment_sizze_nonzzero_226072) +\n                                               sext_i32_i64(local_tid_226075),\n                                               ",
                   "n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226083) *\n                                               squot64(segred_group_sizze_205152,\n                                                       segment_sizze_nonzzero_226072) +\n                                               sext_i32_i64(local_tid_226075) -\n                                               squot64(sext_i32_i64(virt_group_id_226083) *\n                                                       squot64(segred_group_sizze_205152,\n                                                               segment_sizze_nonzzero_226072) +\n                                                       sext_i32_i64(local_tid_226075),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226083) *\n                                        squot64(segred_group_sizze_205152,\n                                                segment_sizze_nonzzero_226072) +\n                                        sext_i32_i64(local_tid_226075) -\n                                        squot64(sext_i32_i64(virt_group_id_226083) *\n                                                squot64(segred_group_sizze_205152,\n                                                        segment_sizze_nonzzero_226072) +\n                                                sext_i32_i64(local_tid_226075),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226083) *\n                                   ",
                   "             squot64(segred_group_sizze_205152,\n                                                        segment_sizze_nonzzero_226072) +\n                                                sext_i32_i64(local_tid_226075) -\n                                                squot64(sext_i32_i64(virt_group_id_226083) *\n                                                        squot64(segred_group_sizze_205152,\n                                                                segment_sizze_nonzzero_226072) +\n                                                        sext_i32_i64(local_tid_226075),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226102;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_205152\n}\n__kernel void mainzisegred_small_207220(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226328_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226326_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226324_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_207211,\n                                        int64_",
                   "t segment_sizze_nonzzero_226317,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223030,\n                                        __global unsigned char *mem_223040,\n                                        __global unsigned char *mem_223045,\n                                        __global unsigned char *mem_223050)\n{\n    #define segred_group_sizze_207210 (mainzisegred_group_sizze_206176)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226328_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226328_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226326_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226326_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226324_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226324_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226319;\n    int32_t local_tid_226320;\n    int64_t group_sizze_226323;\n    int32_t wave_sizze_226322;\n    int32_t group_tid_226321;\n    \n    global_tid_226319 = get_global_id(0);\n    local_tid_226320 = get_local_id(0);\n    group_sizze_226323 = get_local_size(0);\n    wave_sizze_226322 = LOCKSTEP_WIDTH;\n    group_tid_226321 = get_group_id(0);\n    \n    int32_t ",
                   "phys_tid_207220 = global_tid_226319;\n    __local unsigned char *red_arr_mem_226324;\n    \n    red_arr_mem_226324 = (__local unsigned char *) red_arr_mem_226324_backing_0;\n    \n    __local unsigned char *red_arr_mem_226326;\n    \n    red_arr_mem_226326 = (__local unsigned char *) red_arr_mem_226326_backing_1;\n    \n    __local unsigned char *red_arr_mem_226328;\n    \n    red_arr_mem_226328 = (__local unsigned char *) red_arr_mem_226328_backing_2;\n    \n    int32_t phys_group_id_226330;\n    \n    phys_group_id_226330 = get_group_id(0);\n    for (int32_t i_226331 = 0; i_226331 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_207210,\n                                                  segment_sizze_nonzzero_226317))) -\n                   phys_group_id_226330, sext_i64_i32(num_groups_207211));\n         i_226331++) {\n        int32_t virt_group_id_226332 = phys_group_id_226330 + i_226331 *\n                sext_i64_i32(num_groups_207211);\n        int64_t slice_226333 = s_n_m_196745;\n        int64_t slice_226334 = n_p_196694 * slice_226333;\n        int64_t slice_226335 = m_196691 * slice_226334;\n        int64_t gtid_207216 = squot64(squot64(sext_i32_i64(local_tid_226320),\n                                              segment_sizze_nonzzero_226317) +\n                                      sext_i32_i64(virt_group_id_226332) *\n                                      squot64(segred_group_sizze_207210,\n                                              segment_sizze_nonzzero_226317),\n                                      slice_226334);\n        int64_t remnant_226336 = squot64(sext_i32_i64(local_tid_226320),\n                                         segment_sizze_nonzzero_226317) +\n                sext_i32_i64(virt_group_id_226332) *\n                squot64(segred_group_sizze_207210,\n                        segment_sizze_nonzzero_226317) - gtid_207216 *\n                slice_226334;\n        int64_t",
                   " gtid_207217 = squot64(remnant_226336, slice_226333);\n        int64_t remnant_226337 = remnant_226336 - gtid_207217 * slice_226333;\n        int64_t gtid_207218 = remnant_226337;\n        int64_t remnant_226338 = remnant_226337 - gtid_207218;\n        int64_t gtid_207219 = srem64(sext_i32_i64(local_tid_226320),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_207216,\n                                                           m_196691) &&\n                                                     slt64(gtid_207217,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_207218,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_226320),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_207210,\n                                                                 segment_sizze_nonzzero_226317)))) {\n                int64_t x_207238;\n                \n                x_207238 = ((__global int64_t *) ext_mem_222321)[gtid_207216 *\n                                                                 n_p_196694 +\n                                                                 gtid_207217];\n                \n                int64_t x_207242;\n                \n                x_207242 = ((__global int64_t *) ext_mem_222420)[gtid_207216 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_207217 *\n                                                                 s_n_m_196745 +\n                                  ",
                   "                               gtid_207218];\n                \n                float x_207243;\n                \n                x_207243 = ((__global float *) ext_mem_222419)[gtid_207216 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_207217 *\n                                                               s_n_m_196745 +\n                                                               gtid_207218];\n                \n                int64_t defunc_0_m_fun_res_207244;\n                \n                defunc_0_m_fun_res_207244 = ((__global\n                                              int64_t *) mem_223030)[gtid_207216 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_207217 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_207218];\n                \n                bool cond_207246 = sle64(x_207238, gtid_207219);\n                int64_t defunc_0_f_res_207247;\n                \n                if (cond_207246) {\n                    defunc_0_f_res_207247 = (int64_t) 0;\n                } else {\n                    int64_t i_207248 = add64(gtid_207219, x_207242);\n                    int64_t defunc_0_add_arg_207249;\n                    \n                    defunc_0_add_arg_207249 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_207216 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                       ",
                   "                                    gtid_207217 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_207248];\n                    \n                    int64_t defunc_1_add_res_207250 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_207249);\n                    \n                    defunc_0_f_res_207247 = defunc_1_add_res_207250;\n                }\n                \n                float defunc_0_f_res_207251;\n                \n                if (cond_207246) {\n                    defunc_0_f_res_207251 = 0.0F;\n                } else {\n                    int64_t i_207252 = add64(gtid_207219, x_207242);\n                    float defunc_0_add_arg_207253;\n                    \n                    defunc_0_add_arg_207253 = ((__global\n                                                float *) mem_222588)[gtid_207216 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207217 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207252];\n                    defunc_0_f_res_207251 = defunc_0_add_arg_207253;\n                }\n                \n                int64_t binop_p_207254 = sub64(defunc_0_f_res_207247,\n                                               defunc_0_m_fun_res_207244);\n                float defunc_0_f_res_207255 = sitofp_i64_f32(binop_p_207254);\n                float abs_res_207256 = (float) fabs(defunc_0_f_res_207255);\n                float tmp1_207257 = abs_res_207256 / x_207243;\n                float x_207258 = tmp1_207257 * tmp1_207257;\n                float y_207259 = tmp1_207257 * ",
                   "x_207258;\n                float tmp2_207260 = 1.0F - y_207259;\n                float x_207261 = tmp2_207260 * tmp2_207260;\n                float tmp3_207262 = tmp2_207260 * x_207261;\n                float w_j_207263 = defunc_0_f_res_207251 * tmp3_207262;\n                float xw_j_207264 = defunc_0_f_res_207255 * w_j_207263;\n                float x2w_j_207265 = defunc_0_f_res_207255 * xw_j_207264;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                        w_j_207263;\n                    ((__local\n                      float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                        xw_j_207264;\n                    ((__local\n                      float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                        x2w_j_207265;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_207221;\n                float x_207222;\n                float x_207223;\n                float x_207224;\n                float x_207225;\n                float x_207226;\n                float x_226339;\n                float x_226340;\n                float x_226341;\n                float x_226342;\n                float x_226343;\n                float x_226344;",
                   "\n                bool ltid_in_bounds_226348 =\n                     slt64(sext_i32_i64(local_tid_226320), q_s_196695 *\n                           squot64(segred_group_sizze_207210,\n                                   segment_sizze_nonzzero_226317));\n                int32_t skip_threads_226349;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226348) {\n                        x_207224 = ((volatile __local\n                                     float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)];\n                        x_207225 = ((volatile __local\n                                     float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)];\n                        x_207226 = ((volatile __local\n                                     float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)];\n                        if ((local_tid_226320 - squot32(local_tid_226320, 32) *\n                             32) == 0) {\n                            x_207221 = x_207224;\n                            x_207222 = x_207225;\n                            x_207223 = x_207226;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226349 = 1;\n                    while (slt32(skip_threads_226349, 32)) {\n                        bool thread_active_226350 = sle32(skip_threads_226349,\n                                                          local_tid_226320 -\n                                                          squot32(local_tid_226320,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226348;\n                        \n                        if (thread_active_226350) {\n                            // read operands\n                            {\n                                x_207221 = ((volatile __local\n         ",
                   "                                    float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320) -\n                                                                          sext_i32_i64(skip_threads_226349)];\n                                x_207222 = ((volatile __local\n                                             float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320) -\n                                                                          sext_i32_i64(skip_threads_226349)];\n                                x_207223 = ((volatile __local\n                                             float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320) -\n                                                                          sext_i32_i64(skip_threads_226349)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226351 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226320),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226320) -\n                                       sext_i32_i64(local_tid_226320 -\n                                       skip_threads_226349));\n                            \n                            if (thread_active_226350 && inactive_226351) {\n                                x_207221 = x_207224;\n                                x_207222 = x_207225;\n                                x_207223 = x_207226;\n                            }\n                            if (thread_active_226350) {\n                                if (!inactive_226351) {\n                                    float defunc_1_op_res_207227 = x_207221 +\n                                          x_207224;\n                                    float defunc_1_op_res_207228 = x_207222 +\n                                          x_207225;\n                                    float defunc_",
                   "1_op_res_207229 = x_207223 +\n                                          x_207226;\n                                    \n                                    x_207221 = defunc_1_op_res_207227;\n                                    x_207222 = defunc_1_op_res_207228;\n                                    x_207223 = defunc_1_op_res_207229;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_226322, skip_threads_226349)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226350) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                                    x_207221;\n                                x_207224 = x_207221;\n                                ((volatile __local\n                                  float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                                    x_207222;\n                                x_207225 = x_207222;\n                                ((volatile __local\n                                  float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                                    x_207223;\n                                x_207226 = x_207223;\n                            }\n                        }\n                        if (sle32(wave_sizze_226322, skip_threads_226349)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226349 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_226320 - squot32(local_tid_226320, 32) *\n                         32)",
                   " == 31 && ltid_in_bounds_226348) {\n                        ((volatile __local\n                          float *) red_arr_mem_226324)[sext_i32_i64(squot32(local_tid_226320,\n                                                                            32))] =\n                            x_207221;\n                        ((volatile __local\n                          float *) red_arr_mem_226326)[sext_i32_i64(squot32(local_tid_226320,\n                                                                            32))] =\n                            x_207222;\n                        ((volatile __local\n                          float *) red_arr_mem_226328)[sext_i32_i64(squot32(local_tid_226320,\n                                                                            32))] =\n                            x_207223;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226352;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226320, 32) == 0 &&\n                            ltid_in_bounds_226348) {\n                            x_226342 = ((volatile __local\n                                         float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)];\n                            x_226343 = ((volatile __local\n                                         float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)];\n                            x_226344 = ((volatile __local\n                                         float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)];\n                            if ((local_tid_226320 - squot32(local_tid_226320,\n                                                            32) * 32) == 0) {\n                                x_226339 = x_226342;\n                               ",
                   " x_226340 = x_226343;\n                                x_226341 = x_226344;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226352 = 1;\n                        while (slt32(skip_threads_226352, 32)) {\n                            bool thread_active_226353 =\n                                 sle32(skip_threads_226352, local_tid_226320 -\n                                       squot32(local_tid_226320, 32) * 32) &&\n                                 (squot32(local_tid_226320, 32) == 0 &&\n                                  ltid_in_bounds_226348);\n                            \n                            if (thread_active_226353) {\n                                // read operands\n                                {\n                                    x_226339 = ((volatile __local\n                                                 float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320) -\n                                                                              sext_i32_i64(skip_threads_226352)];\n                                    x_226340 = ((volatile __local\n                                                 float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320) -\n                                                                              sext_i32_i64(skip_threads_226352)];\n                                    x_226341 = ((volatile __local\n                                                 float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320) -\n                                                                              sext_i32_i64(skip_threads_226352)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226354 =\n                                     slt64(srem64(sext_i32_i6",
                   "4(local_tid_226320 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226320 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226320 -\n                                                         skip_threads_226352) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226353 && inactive_226354) {\n                                    x_226339 = x_226342;\n                                    x_226340 = x_226343;\n                                    x_226341 = x_226344;\n                                }\n                                if (thread_active_226353) {\n                                    if (!inactive_226354) {\n                                        float defunc_1_op_res_226345 =\n                                              x_226339 + x_226342;\n                                        float defunc_1_op_res_226346 =\n                                              x_226340 + x_226343;\n                                        float defunc_1_op_res_226347 =\n                                              x_226341 + x_226344;\n                                        \n                                        x_226339 = defunc_1_op_res_226345;\n                                        x_226340 = defunc_1_op_res_226346;\n                                        x_226341 = defunc_1_op_res_226347;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226322, skip_threads_226352)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226353) {\n                                // write result\n                                {\n                         ",
                   "           ((volatile __local\n                                      float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                                        x_226339;\n                                    x_226342 = x_226339;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                                        x_226340;\n                                    x_226343 = x_226340;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                                        x_226341;\n                                    x_226344 = x_226341;\n                                }\n                            }\n                            if (sle32(wave_sizze_226322, skip_threads_226352)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226352 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226355 = squot32(local_tid_226320, 32) == 0 ||\n                     !ltid_in_bounds_226348;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226355) {\n                            x_207224 = x_207221;\n                            x_207225 = x_207222;\n                            x_207226 = x_207223;\n                            x_207221 = ((__local\n                                         float *) red_arr_mem_226324)[sext_i32_i64(squot32(local_tid_226320,\n                                                                                           32)) -\n                                                                      (int64_t) 1]",
                   ";\n                            x_207222 = ((__local\n                                         float *) red_arr_mem_226326)[sext_i32_i64(squot32(local_tid_226320,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_207223 = ((__local\n                                         float *) red_arr_mem_226328)[sext_i32_i64(squot32(local_tid_226320,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226356 =\n                             slt64(srem64(sext_i32_i64(local_tid_226320),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226320) -\n                                   sext_i32_i64(squot32(local_tid_226320, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226355) {\n                            if (inactive_226356) {\n                                x_207221 = x_207224;\n                                x_207222 = x_207225;\n                                x_207223 = x_207226;\n                            }\n                        }\n                        if (!no_carry_in_226355) {\n                            if (!inactive_226356) {\n                                float defunc_1_op_res_207227 = x_207221 +\n                                      x_207224;\n                                float defunc_1_op_res_207228 = x_207222 +\n                                      x_207225;\n                                float defunc_1_op_res_207229 = x_207223 +\n                                      x_207226;\n                           ",
                   "     \n                                x_207221 = defunc_1_op_res_207227;\n                                x_207222 = defunc_1_op_res_207228;\n                                x_207223 = defunc_1_op_res_207229;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226355) {\n                            ((__local\n                              float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                                x_207221;\n                            ((__local\n                              float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                                x_207222;\n                            ((__local\n                              float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                                x_207223;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226320, 32) == 0 &&\n                        ltid_in_bounds_226348) {\n                        ((__local\n                          float *) red_arr_mem_226324)[sext_i32_i64(local_tid_226320)] =\n                            x_207224;\n                        ((__local\n                          float *) red_arr_mem_226326)[sext_i32_i64(local_tid_226320)] =\n                            x_207225;\n                        ((__local\n                          float *) red_arr_mem_226328)[sext_i32_i64(local_tid_226320)] =\n                            x_207226;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226332) *\n                      squot64(segred_grou",
                   "p_sizze_207210,\n                              segment_sizze_nonzzero_226317) +\n                      sext_i32_i64(local_tid_226320), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226320),\n                                             squot64(segred_group_sizze_207210,\n                                                     segment_sizze_nonzzero_226317))) {\n                float tmp_226357;\n                \n                tmp_226357 = ((__local\n                               float *) red_arr_mem_226324)[(sext_i32_i64(local_tid_226320) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226317 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223040)[squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320) -\n                                               squot64(sext_i32_i64(virt_group_id_226332) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226317) +\n                                                       ",
                   "sext_i32_i64(local_tid_226320),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226332) *\n                                        squot64(segred_group_sizze_207210,\n                                                segment_sizze_nonzzero_226317) +\n                                        sext_i32_i64(local_tid_226320) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320) -\n                                                squot64(sext_i32_i64(virt_group_id_226332) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226317) +\n                                                        sext_i32_i64(local_tid_226320),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                     ",
                   "           (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226357;\n                \n                float tmp_226358;\n                \n                tmp_226358 = ((__local\n                               float *) red_arr_mem_226326)[(sext_i32_i64(local_tid_226320) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226317 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223045)[squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320) -\n                                               squot64(sext_i32_i64(virt_group_id_226332) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226317) +\n                                                       sext_i32_i64(local_tid_226320),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * ",
                   "s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226332) *\n                                        squot64(segred_group_sizze_207210,\n                                                segment_sizze_nonzzero_226317) +\n                                        sext_i32_i64(local_tid_226320) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320) -\n                                                squot64(sext_i32_i64(virt_group_id_226332) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226317) +\n                                                        sext_i32_i64(local_tid_226320),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226358;\n                \n                float tmp_226359;\n                \n           ",
                   "     tmp_226359 = ((__local\n                               float *) red_arr_mem_226328)[(sext_i32_i64(local_tid_226320) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226317 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223050)[squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226332) *\n                                               squot64(segred_group_sizze_207210,\n                                                       segment_sizze_nonzzero_226317) +\n                                               sext_i32_i64(local_tid_226320) -\n                                               squot64(sext_i32_i64(virt_group_id_226332) *\n                                                       squot64(segred_group_sizze_207210,\n                                                               segment_sizze_nonzzero_226317) +\n                                                       sext_i32_i64(local_tid_226320),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226332) *\n                                        squot64(segred_group_s",
                   "izze_207210,\n                                                segment_sizze_nonzzero_226317) +\n                                        sext_i32_i64(local_tid_226320) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226332) *\n                                                squot64(segred_group_sizze_207210,\n                                                        segment_sizze_nonzzero_226317) +\n                                                sext_i32_i64(local_tid_226320) -\n                                                squot64(sext_i32_i64(virt_group_id_226332) *\n                                                        squot64(segred_group_sizze_207210,\n                                                                segment_sizze_nonzzero_226317) +\n                                                        sext_i32_i64(local_tid_226320),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226359;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_207210\n}\n__kernel void mainzisegred_small_207314(__global int *global_failure,\n                                        __loc",
                   "al volatile\n                                        int64_t *red_arr_mem_226442_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226440_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_207306,\n                                        int64_t segment_sizze_nonzzero_226433,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223056,\n                                        __global unsigned char *mem_223061,\n                                        __global unsigned char *mem_223066,\n                                        __global unsigned char *mem_223071,\n                                        __global unsigned char *mem_223077,\n                                        __global unsigned char *mem_223082)\n{\n    #define segred_group_sizze_207305 (mainzisegred_group_sizze_206043)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226442_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226442_backing_aligned_0;\n    __local volatile un",
                   "signed char *restrict red_arr_mem_226440_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226440_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226435;\n    int32_t local_tid_226436;\n    int64_t group_sizze_226439;\n    int32_t wave_sizze_226438;\n    int32_t group_tid_226437;\n    \n    global_tid_226435 = get_global_id(0);\n    local_tid_226436 = get_local_id(0);\n    group_sizze_226439 = get_local_size(0);\n    wave_sizze_226438 = LOCKSTEP_WIDTH;\n    group_tid_226437 = get_group_id(0);\n    \n    int32_t phys_tid_207314 = global_tid_226435;\n    __local unsigned char *red_arr_mem_226440;\n    \n    red_arr_mem_226440 = (__local unsigned char *) red_arr_mem_226440_backing_0;\n    \n    __local unsigned char *red_arr_mem_226442;\n    \n    red_arr_mem_226442 = (__local unsigned char *) red_arr_mem_226442_backing_1;\n    \n    int32_t phys_group_id_226444;\n    \n    phys_group_id_226444 = get_group_id(0);\n    for (int32_t i_226445 = 0; i_226445 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_207305,\n                                                  segment_sizze_nonzzero_226433))) -\n                   phys_group_id_226444, sext_i64_i32(num_groups_207306));\n         i_226445++) {\n        int32_t virt_group_id_226446 = phys_group_id_226444 + i_226445 *\n                sext_i64_i32(num_groups_207306);\n        int64_t slice_226447 = s_n_m_196745;\n        int64_t slice_226448 = n_p_196694 * slice_226447;\n        int64_t slice_226449 = m_196691 * slice_226448;\n        int64_t gtid_207310 = squot64(squot64(sext_i32_i64(local_tid_226436),\n                                              segment_sizze_nonzzero_226433) +\n                                      sext_i32_i64(virt_group_id_226446) *\n                                      squot64(segred_group_sizze_207305,\n ",
                   "                                             segment_sizze_nonzzero_226433),\n                                      slice_226448);\n        int64_t remnant_226450 = squot64(sext_i32_i64(local_tid_226436),\n                                         segment_sizze_nonzzero_226433) +\n                sext_i32_i64(virt_group_id_226446) *\n                squot64(segred_group_sizze_207305,\n                        segment_sizze_nonzzero_226433) - gtid_207310 *\n                slice_226448;\n        int64_t gtid_207311 = squot64(remnant_226450, slice_226447);\n        int64_t remnant_226451 = remnant_226450 - gtid_207311 * slice_226447;\n        int64_t gtid_207312 = remnant_226451;\n        int64_t remnant_226452 = remnant_226451 - gtid_207312;\n        int64_t gtid_207313 = srem64(sext_i32_i64(local_tid_226436),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_207310,\n                                                           m_196691) &&\n                                                     slt64(gtid_207311,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_207312,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_226436),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_207305,\n                                                                 segment_sizze_nonzzero_226433)))) {\n                int64_t x_207334;\n                \n                x_207334 = ((__global int64_t *) ext_mem_222321)[gtid_207310 *\n                                                                 n_p_196694 +\n                                                                 gtid_207311];\n    ",
                   "            \n                int64_t x_207341;\n                \n                x_207341 = ((__global int64_t *) ext_mem_222420)[gtid_207310 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_207311 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_207312];\n                \n                float x_207342;\n                \n                x_207342 = ((__global float *) ext_mem_222419)[gtid_207310 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_207311 *\n                                                               s_n_m_196745 +\n                                                               gtid_207312];\n                \n                float a11_207343;\n                \n                a11_207343 = ((__global float *) mem_223056)[gtid_207310 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                                             s_n_m_196745 +\n                                                             gtid_207312];\n                \n                float b11_207344;\n                \n                b11_207344 = ((__global float *) mem_223061)[gtid_207310 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                 ",
                   "                            s_n_m_196745 +\n                                                             gtid_207312];\n                \n                float c11_207345;\n                \n                c11_207345 = ((__global float *) mem_223066)[gtid_207310 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_207311 *\n                                                             s_n_m_196745 +\n                                                             gtid_207312];\n                \n                int64_t defunc_0_m_fun_res_207346;\n                \n                defunc_0_m_fun_res_207346 = ((__global\n                                              int64_t *) mem_223071)[gtid_207310 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_207312];\n                \n                bool cond_207348 = sle64(x_207334, gtid_207313);\n                int64_t defunc_0_f_res_207349;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207349 = (int64_t) 0;\n                } else {\n                    int64_t i_207350 = add64(gtid_207313, x_207341);\n                    int64_t defunc_0_add_arg_207351;\n                    \n                    defunc_0_add_arg_207351 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_207310 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                  ",
                   "          n_p_196694) +\n                                                                           gtid_207311 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_207350];\n                    \n                    int64_t defunc_1_add_res_207352 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_207351);\n                    \n                    defunc_0_f_res_207349 = defunc_1_add_res_207352;\n                }\n                \n                float defunc_0_f_res_207353;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207353 = 0.0F;\n                } else {\n                    int64_t i_207354 = add64(gtid_207313, x_207341);\n                    float defunc_0_add_arg_207355;\n                    \n                    defunc_0_add_arg_207355 = ((__global\n                                                float *) mem_222588)[gtid_207310 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207354];\n                    defunc_0_f_res_207353 = defunc_0_add_arg_207355;\n                }\n                \n                int64_t binop_p_207356 = sub64(defunc_0_f_res_207349,\n                                               defunc_0_m_fun_res_207346);\n                float defunc_0_f_res_207357 = sitofp_i64_f32(binop_p_207356);\n                float abs_res_207358 = (float) fabs(defunc_0_f_res_207357);\n                float tmp1_207359 = abs_res_207358 / x_207342;\n                float x_207360 = tmp1_207359",
                   " * tmp1_207359;\n                float y_207361 = tmp1_207359 * x_207360;\n                float tmp2_207362 = 1.0F - y_207361;\n                float x_207363 = tmp2_207362 * tmp2_207362;\n                float tmp3_207364 = tmp2_207362 * x_207363;\n                float tmp4_207365 = defunc_0_f_res_207353 * tmp3_207364;\n                float defunc_1_f_res_207366 = defunc_0_f_res_207357 *\n                      tmp4_207365;\n                float defunc_0_f_res_207367;\n                \n                if (cond_207348) {\n                    defunc_0_f_res_207367 = 0.0F;\n                } else {\n                    int64_t i_207368 = add64(gtid_207313, x_207341);\n                    float defunc_0_add_arg_207369;\n                    \n                    defunc_0_add_arg_207369 = ((__global\n                                                float *) mem_222583)[gtid_207310 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_207311 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_207368];\n                    defunc_0_f_res_207367 = defunc_0_add_arg_207369;\n                }\n                \n                float x_207370 = a11_207343 * tmp4_207365;\n                float y_207371 = b11_207344 * defunc_1_f_res_207366;\n                float x_207372 = x_207370 + y_207371;\n                float defunc_9_fit_fun_res_207373 = defunc_0_f_res_207367 *\n                      x_207372;\n                float x_207374 = b11_207344 * tmp4_207365;\n                float y_207375 = c11_207345 * defunc_1_f_res_207366;\n                float x_207376 = x_207374 + y_207375;\n                float defunc_9_slope_fun_res_207377 = defunc_0_f_res_207367 *\n                      x_207376;\n   ",
                   "             \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                        defunc_9_fit_fun_res_207373;\n                    ((__local\n                      float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                        defunc_9_slope_fun_res_207377;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_207315;\n                float x_207316;\n                float x_207317;\n                float x_207318;\n                float x_226453;\n                float x_226454;\n                float x_226455;\n                float x_226456;\n                bool ltid_in_bounds_226459 =\n                     slt64(sext_i32_i64(local_tid_226436), q_s_196695 *\n                           squot64(segred_group_sizze_207305,\n                                   segment_sizze_nonzzero_226433));\n                int32_t skip_threads_226460;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226459) {\n                        x_207317 = ((volatile __local\n                                     float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)];\n                        x_207318 = ((volatile __local\n                                     float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)];\n                        if ((local_tid_226436 - squo",
                   "t32(local_tid_226436, 32) *\n                             32) == 0) {\n                            x_207315 = x_207317;\n                            x_207316 = x_207318;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226460 = 1;\n                    while (slt32(skip_threads_226460, 32)) {\n                        bool thread_active_226461 = sle32(skip_threads_226460,\n                                                          local_tid_226436 -\n                                                          squot32(local_tid_226436,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226459;\n                        \n                        if (thread_active_226461) {\n                            // read operands\n                            {\n                                x_207315 = ((volatile __local\n                                             float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436) -\n                                                                          sext_i32_i64(skip_threads_226460)];\n                                x_207316 = ((volatile __local\n                                             float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436) -\n                                                                          sext_i32_i64(skip_threads_226460)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226462 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226436),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226436) -\n                                       sext_i32_i64(local_tid_226436 -\n                                       s",
                   "kip_threads_226460));\n                            \n                            if (thread_active_226461 && inactive_226462) {\n                                x_207315 = x_207317;\n                                x_207316 = x_207318;\n                            }\n                            if (thread_active_226461) {\n                                if (!inactive_226462) {\n                                    float defunc_1_op_res_207319 = x_207315 +\n                                          x_207317;\n                                    float defunc_1_op_res_207320 = x_207316 +\n                                          x_207318;\n                                    \n                                    x_207315 = defunc_1_op_res_207319;\n                                    x_207316 = defunc_1_op_res_207320;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_226438, skip_threads_226460)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226461) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                                    x_207315;\n                                x_207317 = x_207315;\n                                ((volatile __local\n                                  float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                                    x_207316;\n                                x_207318 = x_207316;\n                            }\n                        }\n                        if (sle32(wave_sizze_226438, skip_threads_226460)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226460 *= 2;\n                    }\n                }\n         ",
                   "       barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_226436 - squot32(local_tid_226436, 32) *\n                         32) == 31 && ltid_in_bounds_226459) {\n                        ((volatile __local\n                          float *) red_arr_mem_226440)[sext_i32_i64(squot32(local_tid_226436,\n                                                                            32))] =\n                            x_207315;\n                        ((volatile __local\n                          float *) red_arr_mem_226442)[sext_i32_i64(squot32(local_tid_226436,\n                                                                            32))] =\n                            x_207316;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226463;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226436, 32) == 0 &&\n                            ltid_in_bounds_226459) {\n                            x_226455 = ((volatile __local\n                                         float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)];\n                            x_226456 = ((volatile __local\n                                         float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)];\n                            if ((local_tid_226436 - squot32(local_tid_226436,\n                                                            32) * 32) == 0) {\n                                x_226453 = x_226455;\n                                x_226454 = x_226456;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                 ",
                   "   {\n                        skip_threads_226463 = 1;\n                        while (slt32(skip_threads_226463, 32)) {\n                            bool thread_active_226464 =\n                                 sle32(skip_threads_226463, local_tid_226436 -\n                                       squot32(local_tid_226436, 32) * 32) &&\n                                 (squot32(local_tid_226436, 32) == 0 &&\n                                  ltid_in_bounds_226459);\n                            \n                            if (thread_active_226464) {\n                                // read operands\n                                {\n                                    x_226453 = ((volatile __local\n                                                 float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436) -\n                                                                              sext_i32_i64(skip_threads_226463)];\n                                    x_226454 = ((volatile __local\n                                                 float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436) -\n                                                                              sext_i32_i64(skip_threads_226463)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226465 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226436 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226436 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226436 -\n                                                         skip_threads_226463) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_2",
                   "26464 && inactive_226465) {\n                                    x_226453 = x_226455;\n                                    x_226454 = x_226456;\n                                }\n                                if (thread_active_226464) {\n                                    if (!inactive_226465) {\n                                        float defunc_1_op_res_226457 =\n                                              x_226453 + x_226455;\n                                        float defunc_1_op_res_226458 =\n                                              x_226454 + x_226456;\n                                        \n                                        x_226453 = defunc_1_op_res_226457;\n                                        x_226454 = defunc_1_op_res_226458;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226438, skip_threads_226463)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226464) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                                        x_226453;\n                                    x_226455 = x_226453;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                                        x_226454;\n                                    x_226456 = x_226454;\n                                }\n                            }\n                            if (sle32(wave_sizze_226438, skip_threads_226463)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226463 *= 2;\n       ",
                   "                 }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226466 = squot32(local_tid_226436, 32) == 0 ||\n                     !ltid_in_bounds_226459;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226466) {\n                            x_207317 = x_207315;\n                            x_207318 = x_207316;\n                            x_207315 = ((__local\n                                         float *) red_arr_mem_226440)[sext_i32_i64(squot32(local_tid_226436,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_207316 = ((__local\n                                         float *) red_arr_mem_226442)[sext_i32_i64(squot32(local_tid_226436,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226467 =\n                             slt64(srem64(sext_i32_i64(local_tid_226436),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226436) -\n                                   sext_i32_i64(squot32(local_tid_226436, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226466) {\n                            if (inactive_226467) {\n                                x_207315 = x_207317;\n                                x_207316 = x_207318;\n                            }\n                        }\n",
                   "                        if (!no_carry_in_226466) {\n                            if (!inactive_226467) {\n                                float defunc_1_op_res_207319 = x_207315 +\n                                      x_207317;\n                                float defunc_1_op_res_207320 = x_207316 +\n                                      x_207318;\n                                \n                                x_207315 = defunc_1_op_res_207319;\n                                x_207316 = defunc_1_op_res_207320;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226466) {\n                            ((__local\n                              float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                                x_207315;\n                            ((__local\n                              float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                                x_207316;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226436, 32) == 0 &&\n                        ltid_in_bounds_226459) {\n                        ((__local\n                          float *) red_arr_mem_226440)[sext_i32_i64(local_tid_226436)] =\n                            x_207317;\n                        ((__local\n                          float *) red_arr_mem_226442)[sext_i32_i64(local_tid_226436)] =\n                            x_207318;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226446) *\n                      squot64(segred_group_sizze_207305,\n           ",
                   "                   segment_sizze_nonzzero_226433) +\n                      sext_i32_i64(local_tid_226436), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226436),\n                                             squot64(segred_group_sizze_207305,\n                                                     segment_sizze_nonzzero_226433))) {\n                float tmp_226468;\n                \n                tmp_226468 = ((__local\n                               float *) red_arr_mem_226440)[(sext_i32_i64(local_tid_226436) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226433 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223077)[squot64(sext_i32_i64(virt_group_id_226446) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226433) +\n                                               sext_i32_i64(local_tid_226436),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226446) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226433) +\n                                               sext_i32_i64(local_tid_226436) -\n                                               squot64(sext_i32_i64(virt_group_id_226446) *\n                                                       squot64(segred_group_sizze_207305,\n                                                               segment_sizze_nonzzero_226433) +\n                                                       sext_i32_i64(local_tid_2264",
                   "36),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226446) *\n                                        squot64(segred_group_sizze_207305,\n                                                segment_sizze_nonzzero_226433) +\n                                        sext_i32_i64(local_tid_226436) -\n                                        squot64(sext_i32_i64(virt_group_id_226446) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226433) +\n                                                sext_i32_i64(local_tid_226436),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226446) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226433) +\n                                                sext_i32_i64(local_tid_226436) -\n                                                squot64(sext_i32_i64(virt_group_id_226446) *\n                                                        squot64(segred_group_sizze_207305,\n                                                                segment_sizze_nonzzero_226433) +\n                                                        sext_i32_i64(local_tid_226436),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_",
                   "n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226468;\n                \n                float tmp_226469;\n                \n                tmp_226469 = ((__local\n                               float *) red_arr_mem_226442)[(sext_i32_i64(local_tid_226436) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226433 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223082)[squot64(sext_i32_i64(virt_group_id_226446) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226433) +\n                                               sext_i32_i64(local_tid_226436),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226446) *\n                                               squot64(segred_group_sizze_207305,\n                                                       segment_sizze_nonzzero_226433) +\n                                               sext_i32_i64(local_tid_226436) -\n                                               squot64(sext_i32_i64(virt_group_id_226446) *\n                                                       squot64(segred_group_sizze_207305,\n                                                               segment_sizze_nonzzero_226433) +\n                                                       sext_i32_i64(local_tid_226436),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n            ",
                   "                                   s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226446) *\n                                        squot64(segred_group_sizze_207305,\n                                                segment_sizze_nonzzero_226433) +\n                                        sext_i32_i64(local_tid_226436) -\n                                        squot64(sext_i32_i64(virt_group_id_226446) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226433) +\n                                                sext_i32_i64(local_tid_226436),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226446) *\n                                                squot64(segred_group_sizze_207305,\n                                                        segment_sizze_nonzzero_226433) +\n                                                sext_i32_i64(local_tid_226436) -\n                                                squot64(sext_i32_i64(virt_group_id_226446) *\n                                                        squot64(segred_group_sizze_207305,\n                                                                segment_sizze_nonzzero_226433) +\n                                                        sext_i32_i64(local_tid_226436),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226469;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_L",
                   "OCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_207305\n}\n__kernel void mainzisegred_small_209867(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226729_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226727_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226725_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226723_backing_aligned_3,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226721_backing_aligned_4,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_209856,\n                                        int64_t segment_sizze_nonzzero_226714,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __global unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223369,\n                                        __global unsigned char *mem_223379,\n                                        __global unsigned char *mem_223384,\n                                        __global unsigned char *mem_223389,\n   ",
                   "                                     __global unsigned char *mem_223394,\n                                        __global unsigned char *mem_223399)\n{\n    #define segred_group_sizze_209855 (mainzisegred_group_sizze_208595)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226729_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226729_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226727_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226727_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_226725_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226725_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_226723_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226723_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_226721_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226721_backing_aligned_4;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226716;\n    int32_t local_tid_226717;\n    int64_t group_sizze_226720;\n    int32_t wave_sizze_226719;\n    int32_t group_tid_226718;\n    \n    global_tid_226716 = get_global_id(0);\n    local_tid_226717 = get_local_id(0);\n    group_sizze_226720 = get_local_size(0);\n    wave_sizze_226719 = LOCKSTEP_WIDTH;\n    group_tid_226718 = get_group_id(0);\n    \n    int32_t phys_tid_209867 = global_tid_226716;\n    __local unsigned char *red_arr_mem_226721;\n    \n    red_arr_mem_226721 = (__local unsigned char *) red_",
                   "arr_mem_226721_backing_0;\n    \n    __local unsigned char *red_arr_mem_226723;\n    \n    red_arr_mem_226723 = (__local unsigned char *) red_arr_mem_226723_backing_1;\n    \n    __local unsigned char *red_arr_mem_226725;\n    \n    red_arr_mem_226725 = (__local unsigned char *) red_arr_mem_226725_backing_2;\n    \n    __local unsigned char *red_arr_mem_226727;\n    \n    red_arr_mem_226727 = (__local unsigned char *) red_arr_mem_226727_backing_3;\n    \n    __local unsigned char *red_arr_mem_226729;\n    \n    red_arr_mem_226729 = (__local unsigned char *) red_arr_mem_226729_backing_4;\n    \n    int32_t phys_group_id_226731;\n    \n    phys_group_id_226731 = get_group_id(0);\n    for (int32_t i_226732 = 0; i_226732 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_209855,\n                                                  segment_sizze_nonzzero_226714))) -\n                   phys_group_id_226731, sext_i64_i32(num_groups_209856));\n         i_226732++) {\n        int32_t virt_group_id_226733 = phys_group_id_226731 + i_226732 *\n                sext_i64_i32(num_groups_209856);\n        int64_t slice_226734 = s_n_m_196745;\n        int64_t slice_226735 = n_p_196694 * slice_226734;\n        int64_t slice_226736 = m_196691 * slice_226735;\n        int64_t gtid_209863 = squot64(squot64(sext_i32_i64(local_tid_226717),\n                                              segment_sizze_nonzzero_226714) +\n                                      sext_i32_i64(virt_group_id_226733) *\n                                      squot64(segred_group_sizze_209855,\n                                              segment_sizze_nonzzero_226714),\n                                      slice_226735);\n        int64_t remnant_226737 = squot64(sext_i32_i64(local_tid_226717),\n                                         segment_sizze_nonzzero_226714) +\n                sext_i32_i64(virt_group_id_226733) *\n                squot64(segred_grou",
                   "p_sizze_209855,\n                        segment_sizze_nonzzero_226714) - gtid_209863 *\n                slice_226735;\n        int64_t gtid_209864 = squot64(remnant_226737, slice_226734);\n        int64_t remnant_226738 = remnant_226737 - gtid_209864 * slice_226734;\n        int64_t gtid_209865 = remnant_226738;\n        int64_t remnant_226739 = remnant_226738 - gtid_209865;\n        int64_t gtid_209866 = srem64(sext_i32_i64(local_tid_226717),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_209863,\n                                                           m_196691) &&\n                                                     slt64(gtid_209864,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_209865,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_226717),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_209855,\n                                                                 segment_sizze_nonzzero_226714)))) {\n                int64_t x_209891;\n                \n                x_209891 = ((__global int64_t *) ext_mem_222321)[gtid_209863 *\n                                                                 n_p_196694 +\n                                                                 gtid_209864];\n                \n                int64_t x_209895;\n                \n                x_209895 = ((__global int64_t *) ext_mem_222420)[gtid_209863 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                             ",
                   "    gtid_209864 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_209865];\n                \n                float x_209896;\n                \n                x_209896 = ((__global float *) ext_mem_222419)[gtid_209863 *\n                                                               (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_209864 *\n                                                               s_n_m_196745 +\n                                                               gtid_209865];\n                \n                int64_t defunc_0_m_fun_res_209897;\n                \n                defunc_0_m_fun_res_209897 = ((__global\n                                              int64_t *) mem_223369)[gtid_209863 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_209864 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_209865];\n                \n                bool cond_209899 = sle64(x_209891, gtid_209866);\n                int64_t defunc_0_f_res_209900;\n                \n                if (cond_209899) {\n                    defunc_0_f_res_209900 = (int64_t) 0;\n                } else {\n                    int64_t i_209901 = add64(gtid_209866, x_209895);\n                    int64_t defunc_0_add_arg_209902;\n                    \n                    defunc_0_add_arg_209902 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_209863 *\n                                                                           (defunc_0_f_res_196740",
                   " *\n                                                                            n_p_196694) +\n                                                                           gtid_209864 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_209901];\n                    \n                    int64_t defunc_1_add_res_209903 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_209902);\n                    \n                    defunc_0_f_res_209900 = defunc_1_add_res_209903;\n                }\n                \n                float defunc_0_f_res_209904;\n                \n                if (cond_209899) {\n                    defunc_0_f_res_209904 = 0.0F;\n                } else {\n                    int64_t i_209905 = add64(gtid_209866, x_209895);\n                    float defunc_0_add_arg_209906;\n                    \n                    defunc_0_add_arg_209906 = ((__global\n                                                float *) mem_222588)[gtid_209863 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209864 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_209905];\n                    defunc_0_f_res_209904 = defunc_0_add_arg_209906;\n                }\n                \n                int64_t binop_p_209907 = sub64(defunc_0_f_res_209900,\n                                               defunc_0_m_fun_res_209897);\n                float defunc_0_f_res_209908 = sitofp_i64_f32(binop_p_209907);\n                float abs_res_209909 = (float) fabs(defunc_0_f_res_209908);\n                float tmp1_209910 = ab",
                   "s_res_209909 / x_209896;\n                float x_209911 = tmp1_209910 * tmp1_209910;\n                float y_209912 = tmp1_209910 * x_209911;\n                float tmp2_209913 = 1.0F - y_209912;\n                float x_209914 = tmp2_209913 * tmp2_209913;\n                float tmp3_209915 = tmp2_209913 * x_209914;\n                float w_j_209916 = defunc_0_f_res_209904 * tmp3_209915;\n                float xw_j_209917 = defunc_0_f_res_209908 * w_j_209916;\n                float x2w_j_209918 = defunc_0_f_res_209908 * xw_j_209917;\n                float x3w_j_209919 = defunc_0_f_res_209908 * x2w_j_209918;\n                float x4w_j_209920 = defunc_0_f_res_209908 * x3w_j_209919;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                        w_j_209916;\n                    ((__local\n                      float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                        xw_j_209917;\n                    ((__local\n                      float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n                        x2w_j_209918;\n                    ((__local\n                      float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                        x3w_j_209919;\n                    ((__local\n                      float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                        x4w_j_209920;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n  ",
                   "                  0.0F;\n                ((__local\n                  float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_209868;\n                float x_209869;\n                float x_209870;\n                float x_209871;\n                float x_209872;\n                float x_209873;\n                float x_209874;\n                float x_209875;\n                float x_209876;\n                float x_209877;\n                float x_226740;\n                float x_226741;\n                float x_226742;\n                float x_226743;\n                float x_226744;\n                float x_226745;\n                float x_226746;\n                float x_226747;\n                float x_226748;\n                float x_226749;\n                bool ltid_in_bounds_226755 =\n                     slt64(sext_i32_i64(local_tid_226717), q_s_196695 *\n                           squot64(segred_group_sizze_209855,\n                                   segment_sizze_nonzzero_226714));\n                int32_t skip_threads_226756;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226755) {\n                        x_209873 = ((volatile __local\n                                     float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)];\n                        x_209874 = ((volatile __local\n                                     float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)];\n                        x_209875 = ((volatile __local\n                                     float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)];\n      ",
                   "                  x_209876 = ((volatile __local\n                                     float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)];\n                        x_209877 = ((volatile __local\n                                     float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)];\n                        if ((local_tid_226717 - squot32(local_tid_226717, 32) *\n                             32) == 0) {\n                            x_209868 = x_209873;\n                            x_209869 = x_209874;\n                            x_209870 = x_209875;\n                            x_209871 = x_209876;\n                            x_209872 = x_209877;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226756 = 1;\n                    while (slt32(skip_threads_226756, 32)) {\n                        bool thread_active_226757 = sle32(skip_threads_226756,\n                                                          local_tid_226717 -\n                                                          squot32(local_tid_226717,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226755;\n                        \n                        if (thread_active_226757) {\n                            // read operands\n                            {\n                                x_209868 = ((volatile __local\n                                             float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717) -\n                                                                          sext_i32_i64(skip_threads_226756)];\n                                x_209869 = ((volatile __local\n                                             float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717) -\n                                                                          sext_i32_i64(skip_threads_226756)];",
                   "\n                                x_209870 = ((volatile __local\n                                             float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717) -\n                                                                          sext_i32_i64(skip_threads_226756)];\n                                x_209871 = ((volatile __local\n                                             float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717) -\n                                                                          sext_i32_i64(skip_threads_226756)];\n                                x_209872 = ((volatile __local\n                                             float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717) -\n                                                                          sext_i32_i64(skip_threads_226756)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226758 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226717),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226717) -\n                                       sext_i32_i64(local_tid_226717 -\n                                       skip_threads_226756));\n                            \n                            if (thread_active_226757 && inactive_226758) {\n                                x_209868 = x_209873;\n                                x_209869 = x_209874;\n                                x_209870 = x_209875;\n                                x_209871 = x_209876;\n                                x_209872 = x_209877;\n                            }\n                            if (thread_active_226757) {\n                                if (!inactive_226758) {\n                                    float defunc_1_op_res_209878 = x_209868 +\n                                          x_209873;\n ",
                   "                                   float defunc_1_op_res_209879 = x_209869 +\n                                          x_209874;\n                                    float defunc_1_op_res_209880 = x_209870 +\n                                          x_209875;\n                                    float defunc_1_op_res_209881 = x_209871 +\n                                          x_209876;\n                                    float defunc_1_op_res_209882 = x_209872 +\n                                          x_209877;\n                                    \n                                    x_209868 = defunc_1_op_res_209878;\n                                    x_209869 = defunc_1_op_res_209879;\n                                    x_209870 = defunc_1_op_res_209880;\n                                    x_209871 = defunc_1_op_res_209881;\n                                    x_209872 = defunc_1_op_res_209882;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_226719, skip_threads_226756)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226757) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                                    x_209868;\n                                x_209873 = x_209868;\n                                ((volatile __local\n                                  float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                                    x_209869;\n                                x_209874 = x_209869;\n                                ((volatile __local\n                                  float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n                                    x_209870;\n                        ",
                   "        x_209875 = x_209870;\n                                ((volatile __local\n                                  float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                                    x_209871;\n                                x_209876 = x_209871;\n                                ((volatile __local\n                                  float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                                    x_209872;\n                                x_209877 = x_209872;\n                            }\n                        }\n                        if (sle32(wave_sizze_226719, skip_threads_226756)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226756 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_226717 - squot32(local_tid_226717, 32) *\n                         32) == 31 && ltid_in_bounds_226755) {\n                        ((volatile __local\n                          float *) red_arr_mem_226721)[sext_i32_i64(squot32(local_tid_226717,\n                                                                            32))] =\n                            x_209868;\n                        ((volatile __local\n                          float *) red_arr_mem_226723)[sext_i32_i64(squot32(local_tid_226717,\n                                                                            32))] =\n                            x_209869;\n                        ((volatile __local\n                          float *) red_arr_mem_226725)[sext_i32_i64(squot32(local_tid_226717,\n                                                                            32))] =\n                            x_209870;\n                        ((volatile __local\n                          float *) red_arr_mem_226727)[sext_i32_i64(squ",
                   "ot32(local_tid_226717,\n                                                                            32))] =\n                            x_209871;\n                        ((volatile __local\n                          float *) red_arr_mem_226729)[sext_i32_i64(squot32(local_tid_226717,\n                                                                            32))] =\n                            x_209872;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226759;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226717, 32) == 0 &&\n                            ltid_in_bounds_226755) {\n                            x_226745 = ((volatile __local\n                                         float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)];\n                            x_226746 = ((volatile __local\n                                         float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)];\n                            x_226747 = ((volatile __local\n                                         float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)];\n                            x_226748 = ((volatile __local\n                                         float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)];\n                            x_226749 = ((volatile __local\n                                         float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)];\n                            if ((local_tid_226717 - squot32(local_tid_226717,\n                                                            32) * 32) == 0) {\n                                x_226740 = x_226745;\n                                x_226741 = x_226746;\n                                x_226742 = x_226747;\n           ",
                   "                     x_226743 = x_226748;\n                                x_226744 = x_226749;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226759 = 1;\n                        while (slt32(skip_threads_226759, 32)) {\n                            bool thread_active_226760 =\n                                 sle32(skip_threads_226759, local_tid_226717 -\n                                       squot32(local_tid_226717, 32) * 32) &&\n                                 (squot32(local_tid_226717, 32) == 0 &&\n                                  ltid_in_bounds_226755);\n                            \n                            if (thread_active_226760) {\n                                // read operands\n                                {\n                                    x_226740 = ((volatile __local\n                                                 float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717) -\n                                                                              sext_i32_i64(skip_threads_226759)];\n                                    x_226741 = ((volatile __local\n                                                 float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717) -\n                                                                              sext_i32_i64(skip_threads_226759)];\n                                    x_226742 = ((volatile __local\n                                                 float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717) -\n                                                                              sext_i32_i64(skip_threads_226759)];\n                                    x_226743 = ((volatile __local\n                                                 float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717) -\n                                                              ",
                   "                sext_i32_i64(skip_threads_226759)];\n                                    x_226744 = ((volatile __local\n                                                 float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717) -\n                                                                              sext_i32_i64(skip_threads_226759)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_226761 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226717 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226717 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226717 -\n                                                         skip_threads_226759) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226760 && inactive_226761) {\n                                    x_226740 = x_226745;\n                                    x_226741 = x_226746;\n                                    x_226742 = x_226747;\n                                    x_226743 = x_226748;\n                                    x_226744 = x_226749;\n                                }\n                                if (thread_active_226760) {\n                                    if (!inactive_226761) {\n                                        float defunc_1_op_res_226750 =\n                                              x_226740 + x_226745;\n                                        float defunc_1_op_res_226751 =\n                                              x_226741 + x_226746;\n                                        float defunc_1_op_res_226752 =\n                                              x_226742 ",
                   "+ x_226747;\n                                        float defunc_1_op_res_226753 =\n                                              x_226743 + x_226748;\n                                        float defunc_1_op_res_226754 =\n                                              x_226744 + x_226749;\n                                        \n                                        x_226740 = defunc_1_op_res_226750;\n                                        x_226741 = defunc_1_op_res_226751;\n                                        x_226742 = defunc_1_op_res_226752;\n                                        x_226743 = defunc_1_op_res_226753;\n                                        x_226744 = defunc_1_op_res_226754;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226719, skip_threads_226759)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226760) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                                        x_226740;\n                                    x_226745 = x_226740;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                                        x_226741;\n                                    x_226746 = x_226741;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n                                        x_226742;\n                                    x_226747 = x_226742;\n                                    ((volatile __local\n                                      f",
                   "loat *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                                        x_226743;\n                                    x_226748 = x_226743;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                                        x_226744;\n                                    x_226749 = x_226744;\n                                }\n                            }\n                            if (sle32(wave_sizze_226719, skip_threads_226759)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226759 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226762 = squot32(local_tid_226717, 32) == 0 ||\n                     !ltid_in_bounds_226755;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226762) {\n                            x_209873 = x_209868;\n                            x_209874 = x_209869;\n                            x_209875 = x_209870;\n                            x_209876 = x_209871;\n                            x_209877 = x_209872;\n                            x_209868 = ((__local\n                                         float *) red_arr_mem_226721)[sext_i32_i64(squot32(local_tid_226717,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209869 = ((__local\n                                         float *) red_arr_mem_226723)[sext_i32_i64(squot32(local_tid_226717,\n                                                                          ",
                   "                 32)) -\n                                                                      (int64_t) 1];\n                            x_209870 = ((__local\n                                         float *) red_arr_mem_226725)[sext_i32_i64(squot32(local_tid_226717,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209871 = ((__local\n                                         float *) red_arr_mem_226727)[sext_i32_i64(squot32(local_tid_226717,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209872 = ((__local\n                                         float *) red_arr_mem_226729)[sext_i32_i64(squot32(local_tid_226717,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_226763 =\n                             slt64(srem64(sext_i32_i64(local_tid_226717),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226717) -\n                                   sext_i32_i64(squot32(local_tid_226717, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226762) {\n                            if (inactive_226763) {\n                                x_209868 = x_209873;\n                                x_209869 = x_209874;\n                                x_209870 = x_209875;\n                                x_209871 = x_209876;\n                                x_209872 = x_209877;\n",
                   "                            }\n                        }\n                        if (!no_carry_in_226762) {\n                            if (!inactive_226763) {\n                                float defunc_1_op_res_209878 = x_209868 +\n                                      x_209873;\n                                float defunc_1_op_res_209879 = x_209869 +\n                                      x_209874;\n                                float defunc_1_op_res_209880 = x_209870 +\n                                      x_209875;\n                                float defunc_1_op_res_209881 = x_209871 +\n                                      x_209876;\n                                float defunc_1_op_res_209882 = x_209872 +\n                                      x_209877;\n                                \n                                x_209868 = defunc_1_op_res_209878;\n                                x_209869 = defunc_1_op_res_209879;\n                                x_209870 = defunc_1_op_res_209880;\n                                x_209871 = defunc_1_op_res_209881;\n                                x_209872 = defunc_1_op_res_209882;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226762) {\n                            ((__local\n                              float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                                x_209868;\n                            ((__local\n                              float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                                x_209869;\n                            ((__local\n                              float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n                                x_209870;\n                            ((__local\n                              float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                    ",
                   "            x_209871;\n                            ((__local\n                              float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                                x_209872;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226717, 32) == 0 &&\n                        ltid_in_bounds_226755) {\n                        ((__local\n                          float *) red_arr_mem_226721)[sext_i32_i64(local_tid_226717)] =\n                            x_209873;\n                        ((__local\n                          float *) red_arr_mem_226723)[sext_i32_i64(local_tid_226717)] =\n                            x_209874;\n                        ((__local\n                          float *) red_arr_mem_226725)[sext_i32_i64(local_tid_226717)] =\n                            x_209875;\n                        ((__local\n                          float *) red_arr_mem_226727)[sext_i32_i64(local_tid_226717)] =\n                            x_209876;\n                        ((__local\n                          float *) red_arr_mem_226729)[sext_i32_i64(local_tid_226717)] =\n                            x_209877;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226733) *\n                      squot64(segred_group_sizze_209855,\n                              segment_sizze_nonzzero_226714) +\n                      sext_i32_i64(local_tid_226717), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226717),\n                                             squot64(segred_group_sizze_209855,\n                                                     segment_sizze_nonzzero_226714))) {\n",
                   "                float tmp_226764;\n                \n                tmp_226764 = ((__local\n                               float *) red_arr_mem_226721)[(sext_i32_i64(local_tid_226717) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226714 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223379)[squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717) -\n                                               squot64(sext_i32_i64(virt_group_id_226733) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226714) +\n                                                       sext_i32_i64(local_tid_226717),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226733) *\n",
                   "                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226714) +\n                                        sext_i32_i64(local_tid_226717) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717) -\n                                                squot64(sext_i32_i64(virt_group_id_226733) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226714) +\n                                                        sext_i32_i64(local_tid_226717),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226764;\n                \n                float tmp_226765;\n                \n                tmp_226765 = ((__local\n                               float *) red_arr_mem_226723)[(sext_i32_i64(local_tid_226717) +\n                                                ",
                   "             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226714 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223384)[squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717) -\n                                               squot64(sext_i32_i64(virt_group_id_226733) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226714) +\n                                                       sext_i32_i64(local_tid_226717),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226733) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226714) +\n                                        sext_i32_i64(local_tid_226717) -\n   ",
                   "                                     squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717) -\n                                                squot64(sext_i32_i64(virt_group_id_226733) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226714) +\n                                                        sext_i32_i64(local_tid_226717),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226765;\n                \n                float tmp_226766;\n                \n                tmp_226766 = ((__local\n                               float *) red_arr_mem_226725)[(sext_i32_i64(local_tid_226717) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226714 -\n                                                            (int64_t) 1];\n                ((__global\n           ",
                   "       float *) mem_223389)[squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717) -\n                                               squot64(sext_i32_i64(virt_group_id_226733) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226714) +\n                                                       sext_i32_i64(local_tid_226717),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226733) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226714) +\n                                        sext_i32_i64(local_tid_226717) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_siz",
                   "ze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717) -\n                                                squot64(sext_i32_i64(virt_group_id_226733) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226714) +\n                                                        sext_i32_i64(local_tid_226717),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226766;\n                \n                float tmp_226767;\n                \n                tmp_226767 = ((__local\n                               float *) red_arr_mem_226727)[(sext_i32_i64(local_tid_226717) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226714 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223394)[squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero",
                   "_226714) +\n                                               sext_i32_i64(local_tid_226717),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717) -\n                                               squot64(sext_i32_i64(virt_group_id_226733) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226714) +\n                                                       sext_i32_i64(local_tid_226717),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226733) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226714) +\n                                        sext_i32_i64(local_tid_226717) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 *",
                   " s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717) -\n                                                squot64(sext_i32_i64(virt_group_id_226733) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226714) +\n                                                        sext_i32_i64(local_tid_226717),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226767;\n                \n                float tmp_226768;\n                \n                tmp_226768 = ((__local\n                               float *) red_arr_mem_226729)[(sext_i32_i64(local_tid_226717) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226714 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223399)[squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694)",
                   " +\n                                       squot64(sext_i32_i64(virt_group_id_226733) *\n                                               squot64(segred_group_sizze_209855,\n                                                       segment_sizze_nonzzero_226714) +\n                                               sext_i32_i64(local_tid_226717) -\n                                               squot64(sext_i32_i64(virt_group_id_226733) *\n                                                       squot64(segred_group_sizze_209855,\n                                                               segment_sizze_nonzzero_226714) +\n                                                       sext_i32_i64(local_tid_226717),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226733) *\n                                        squot64(segred_group_sizze_209855,\n                                                segment_sizze_nonzzero_226714) +\n                                        sext_i32_i64(local_tid_226717) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                                        segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226733) *\n                                                squot64(segred_group_sizze_209855,\n                                               ",
                   "         segment_sizze_nonzzero_226714) +\n                                                sext_i32_i64(local_tid_226717) -\n                                                squot64(sext_i32_i64(virt_group_id_226733) *\n                                                        squot64(segred_group_sizze_209855,\n                                                                segment_sizze_nonzzero_226714) +\n                                                        sext_i32_i64(local_tid_226717),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226768;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_209855\n}\n__kernel void mainzisegred_small_209990(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226867_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_226865_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t q_s_196695,\n                                        int64_t defunc_0_f_res_196740,\n                                        int64_t s_n_m_196745,\n                                        int64_t num_groups_209982,\n                                        int64_t segment_sizze_nonzzero_226858,\n                                        __global unsigned char *ext_mem_222321,\n                                        __global unsigned char *ext_mem_222322,\n                                        __glob",
                   "al unsigned char *ext_mem_222419,\n                                        __global unsigned char *ext_mem_222420,\n                                        __global unsigned char *mem_222583,\n                                        __global unsigned char *mem_222588,\n                                        __global unsigned char *mem_223405,\n                                        __global unsigned char *mem_223410,\n                                        __global unsigned char *mem_223415,\n                                        __global unsigned char *mem_223420,\n                                        __global unsigned char *mem_223425,\n                                        __global unsigned char *mem_223430,\n                                        __global unsigned char *mem_223436,\n                                        __global unsigned char *mem_223441)\n{\n    #define segred_group_sizze_209981 (mainzisegred_group_sizze_208426)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_226867_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226867_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_226865_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_226865_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_226860;\n    int32_t local_tid_226861;\n    int64_t group_sizze_226864;\n    int32_t wave_sizze_226863;\n    int32_t group_tid_226862;\n    \n    global_tid_226860 = get_global_id(0);\n    local_tid_226861 = get_local_id(0);\n    group_sizze_226864 = get_local_size(0);\n    wave_sizze_226863 = LOCKSTEP_WIDTH;\n    group_tid_226862 = get_group_id(0);\n    \n    int32_t phys_tid_209990 = global_tid_226860;\n    __local unsigned char *red_arr_mem_226",
                   "865;\n    \n    red_arr_mem_226865 = (__local unsigned char *) red_arr_mem_226865_backing_0;\n    \n    __local unsigned char *red_arr_mem_226867;\n    \n    red_arr_mem_226867 = (__local unsigned char *) red_arr_mem_226867_backing_1;\n    \n    int32_t phys_group_id_226869;\n    \n    phys_group_id_226869 = get_group_id(0);\n    for (int32_t i_226870 = 0; i_226870 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 * s_n_m_196745,\n                                          squot64(segred_group_sizze_209981,\n                                                  segment_sizze_nonzzero_226858))) -\n                   phys_group_id_226869, sext_i64_i32(num_groups_209982));\n         i_226870++) {\n        int32_t virt_group_id_226871 = phys_group_id_226869 + i_226870 *\n                sext_i64_i32(num_groups_209982);\n        int64_t slice_226872 = s_n_m_196745;\n        int64_t slice_226873 = n_p_196694 * slice_226872;\n        int64_t slice_226874 = m_196691 * slice_226873;\n        int64_t gtid_209986 = squot64(squot64(sext_i32_i64(local_tid_226861),\n                                              segment_sizze_nonzzero_226858) +\n                                      sext_i32_i64(virt_group_id_226871) *\n                                      squot64(segred_group_sizze_209981,\n                                              segment_sizze_nonzzero_226858),\n                                      slice_226873);\n        int64_t remnant_226875 = squot64(sext_i32_i64(local_tid_226861),\n                                         segment_sizze_nonzzero_226858) +\n                sext_i32_i64(virt_group_id_226871) *\n                squot64(segred_group_sizze_209981,\n                        segment_sizze_nonzzero_226858) - gtid_209986 *\n                slice_226873;\n        int64_t gtid_209987 = squot64(remnant_226875, slice_226872);\n        int64_t remnant_226876 = remnant_226875 - gtid_209987 * slice_226872;\n        int64_t gtid_209988 = remnant_226876;\n        int64_t remnant_226877 = remnan",
                   "t_226876 - gtid_209988;\n        int64_t gtid_209989 = srem64(sext_i32_i64(local_tid_226861),\n                                     q_s_196695);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_s_196695) && (((slt64(gtid_209986,\n                                                           m_196691) &&\n                                                     slt64(gtid_209987,\n                                                           n_p_196694)) &&\n                                                    slt64(gtid_209988,\n                                                          s_n_m_196745)) &&\n                                                   slt64(sext_i32_i64(local_tid_226861),\n                                                         q_s_196695 *\n                                                         squot64(segred_group_sizze_209981,\n                                                                 segment_sizze_nonzzero_226858)))) {\n                int64_t x_210012;\n                \n                x_210012 = ((__global int64_t *) ext_mem_222321)[gtid_209986 *\n                                                                 n_p_196694 +\n                                                                 gtid_209987];\n                \n                int64_t x_210021;\n                \n                x_210021 = ((__global int64_t *) ext_mem_222420)[gtid_209986 *\n                                                                 (s_n_m_196745 *\n                                                                  n_p_196694) +\n                                                                 gtid_209987 *\n                                                                 s_n_m_196745 +\n                                                                 gtid_209988];\n                \n                float x_210022;\n                \n                x_210022 = ((__global float *) ext_mem_222419)[gtid_209986 *\n                             ",
                   "                                  (s_n_m_196745 *\n                                                                n_p_196694) +\n                                                               gtid_209987 *\n                                                               s_n_m_196745 +\n                                                               gtid_209988];\n                \n                float a12_210023;\n                \n                a12_210023 = ((__global float *) mem_223405)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float b12_210024;\n                \n                b12_210024 = ((__global float *) mem_223410)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float c12_210025;\n                \n                c12_210025 = ((__global float *) mem_223415)[gtid_209986 *\n                                                             (s_n_m_196745 *\n                                                              n_p_196694) +\n                                                             gtid_209987 *\n                                                             s_n_m_196745 +\n                                                             gtid_209988];\n                \n                float b2_210026;\n                \n       ",
                   "         b2_210026 = ((__global float *) mem_223420)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988];\n                \n                float c2_210027;\n                \n                c2_210027 = ((__global float *) mem_223425)[gtid_209986 *\n                                                            (s_n_m_196745 *\n                                                             n_p_196694) +\n                                                            gtid_209987 *\n                                                            s_n_m_196745 +\n                                                            gtid_209988];\n                \n                int64_t defunc_0_m_fun_res_210028;\n                \n                defunc_0_m_fun_res_210028 = ((__global\n                                              int64_t *) mem_223430)[gtid_209986 *\n                                                                     (s_n_m_196745 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     s_n_m_196745 +\n                                                                     gtid_209988];\n                \n                bool cond_210030 = sle64(x_210012, gtid_209989);\n                int64_t defunc_0_f_res_210031;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210031 = (int64_t) 0;\n                } else {\n                    int64_t i_210032 = add64(gtid_209989, x_210021);\n                    int64_t defunc_0_add_arg_210033;\n                 ",
                   "   \n                    defunc_0_add_arg_210033 = ((__global\n                                                int64_t *) ext_mem_222322)[gtid_209986 *\n                                                                           (defunc_0_f_res_196740 *\n                                                                            n_p_196694) +\n                                                                           gtid_209987 *\n                                                                           defunc_0_f_res_196740 +\n                                                                           i_210032];\n                    \n                    int64_t defunc_1_add_res_210034 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_210033);\n                    \n                    defunc_0_f_res_210031 = defunc_1_add_res_210034;\n                }\n                \n                float defunc_0_f_res_210035;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210035 = 0.0F;\n                } else {\n                    int64_t i_210036 = add64(gtid_209989, x_210021);\n                    float defunc_0_add_arg_210037;\n                    \n                    defunc_0_add_arg_210037 = ((__global\n                                                float *) mem_222588)[gtid_209986 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_210036];\n                    defunc_0_f_res_210035 = defunc_0_add_arg_210037;\n                }\n                \n                int64_t binop_p_210038 = sub64(defunc_0_f_res_210031,\n                    ",
                   "                           defunc_0_m_fun_res_210028);\n                float defunc_0_f_res_210039 = sitofp_i64_f32(binop_p_210038);\n                float abs_res_210040 = (float) fabs(defunc_0_f_res_210039);\n                float tmp1_210041 = abs_res_210040 / x_210022;\n                float x_210042 = tmp1_210041 * tmp1_210041;\n                float y_210043 = tmp1_210041 * x_210042;\n                float tmp2_210044 = 1.0F - y_210043;\n                float x_210045 = tmp2_210044 * tmp2_210044;\n                float tmp3_210046 = tmp2_210044 * x_210045;\n                float tmp4_210047 = defunc_0_f_res_210035 * tmp3_210046;\n                float defunc_1_f_res_210048 = defunc_0_f_res_210039 *\n                      tmp4_210047;\n                float defunc_1_f_res_210049 = defunc_0_f_res_210039 *\n                      defunc_1_f_res_210048;\n                float defunc_0_f_res_210050;\n                \n                if (cond_210030) {\n                    defunc_0_f_res_210050 = 0.0F;\n                } else {\n                    int64_t i_210051 = add64(gtid_209989, x_210021);\n                    float defunc_0_add_arg_210052;\n                    \n                    defunc_0_add_arg_210052 = ((__global\n                                                float *) mem_222583)[gtid_209986 *\n                                                                     (defunc_0_f_res_196740 *\n                                                                      n_p_196694) +\n                                                                     gtid_209987 *\n                                                                     defunc_0_f_res_196740 +\n                                                                     i_210051];\n                    defunc_0_f_res_210050 = defunc_0_add_arg_210052;\n                }\n                \n                float x_210053 = a12_210023 * tmp4_210047;\n                float y_210054 = b12_210024 * defunc_1_f_res_210048;\n                float x_21",
                   "0055 = x_210053 + y_210054;\n                float y_210056 = c12_210025 * defunc_1_f_res_210049;\n                float x_210057 = x_210055 + y_210056;\n                float defunc_9_fit_fun_res_210058 = defunc_0_f_res_210050 *\n                      x_210057;\n                float x_210059 = b12_210024 * tmp4_210047;\n                float y_210060 = b2_210026 * defunc_1_f_res_210048;\n                float x_210061 = x_210059 + y_210060;\n                float y_210062 = c2_210027 * defunc_1_f_res_210049;\n                float x_210063 = x_210061 + y_210062;\n                float defunc_9_slope_fun_res_210064 = defunc_0_f_res_210050 *\n                      x_210063;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)] =\n                        defunc_9_fit_fun_res_210058;\n                    ((__local\n                      float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                        defunc_9_slope_fun_res_210064;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_s_196695)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_209991;\n                float x_209992;\n                float x_209993;\n                float x_209994;\n                float x_226878;\n                float x_226879;\n                float x_226880;\n                float x_226881;\n                bool ltid_in_bounds_226884 =\n                     slt64(sext_i32_i64(local_tid_226861), q_s",
                   "_196695 *\n                           squot64(segred_group_sizze_209981,\n                                   segment_sizze_nonzzero_226858));\n                int32_t skip_threads_226885;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_226884) {\n                        x_209993 = ((volatile __local\n                                     float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)];\n                        x_209994 = ((volatile __local\n                                     float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)];\n                        if ((local_tid_226861 - squot32(local_tid_226861, 32) *\n                             32) == 0) {\n                            x_209991 = x_209993;\n                            x_209992 = x_209994;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_226885 = 1;\n                    while (slt32(skip_threads_226885, 32)) {\n                        bool thread_active_226886 = sle32(skip_threads_226885,\n                                                          local_tid_226861 -\n                                                          squot32(local_tid_226861,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_226884;\n                        \n                        if (thread_active_226886) {\n                            // read operands\n                            {\n                                x_209991 = ((volatile __local\n                                             float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861) -\n                                                                          sext_i32_i64(skip_threads_226885)];\n                                x_209992 = ((volatile __local\n                                        ",
                   "     float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861) -\n                                                                          sext_i32_i64(skip_threads_226885)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_226887 =\n                                 slt64(srem64(sext_i32_i64(local_tid_226861),\n                                              q_s_196695),\n                                       sext_i32_i64(local_tid_226861) -\n                                       sext_i32_i64(local_tid_226861 -\n                                       skip_threads_226885));\n                            \n                            if (thread_active_226886 && inactive_226887) {\n                                x_209991 = x_209993;\n                                x_209992 = x_209994;\n                            }\n                            if (thread_active_226886) {\n                                if (!inactive_226887) {\n                                    float defunc_1_op_res_209995 = x_209991 +\n                                          x_209993;\n                                    float defunc_1_op_res_209996 = x_209992 +\n                                          x_209994;\n                                    \n                                    x_209991 = defunc_1_op_res_209995;\n                                    x_209992 = defunc_1_op_res_209996;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_226863, skip_threads_226885)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_226886) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_226865)[sext_i32_i64(local_ti",
                   "d_226861)] =\n                                    x_209991;\n                                x_209993 = x_209991;\n                                ((volatile __local\n                                  float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                                    x_209992;\n                                x_209994 = x_209992;\n                            }\n                        }\n                        if (sle32(wave_sizze_226863, skip_threads_226885)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_226885 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_226861 - squot32(local_tid_226861, 32) *\n                         32) == 31 && ltid_in_bounds_226884) {\n                        ((volatile __local\n                          float *) red_arr_mem_226865)[sext_i32_i64(squot32(local_tid_226861,\n                                                                            32))] =\n                            x_209991;\n                        ((volatile __local\n                          float *) red_arr_mem_226867)[sext_i32_i64(squot32(local_tid_226861,\n                                                                            32))] =\n                            x_209992;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_226888;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_226861, 32) == 0 &&\n                            ltid_in_bounds_226884) {\n                            x_226880 = ((volatile __local\n              ",
                   "                           float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)];\n                            x_226881 = ((volatile __local\n                                         float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)];\n                            if ((local_tid_226861 - squot32(local_tid_226861,\n                                                            32) * 32) == 0) {\n                                x_226878 = x_226880;\n                                x_226879 = x_226881;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_226888 = 1;\n                        while (slt32(skip_threads_226888, 32)) {\n                            bool thread_active_226889 =\n                                 sle32(skip_threads_226888, local_tid_226861 -\n                                       squot32(local_tid_226861, 32) * 32) &&\n                                 (squot32(local_tid_226861, 32) == 0 &&\n                                  ltid_in_bounds_226884);\n                            \n                            if (thread_active_226889) {\n                                // read operands\n                                {\n                                    x_226878 = ((volatile __local\n                                                 float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861) -\n                                                                              sext_i32_i64(skip_threads_226888)];\n                                    x_226879 = ((volatile __local\n                                                 float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861) -\n                                                                              sext_i32_i64(skip_threads_226888)];\n                                }\n                            }\n                            // perform operation\n",
                   "                            {\n                                bool inactive_226890 =\n                                     slt64(srem64(sext_i32_i64(local_tid_226861 *\n                                                  32 + 32 - 1), q_s_196695),\n                                           sext_i32_i64(local_tid_226861 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_226861 -\n                                                         skip_threads_226888) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_226889 && inactive_226890) {\n                                    x_226878 = x_226880;\n                                    x_226879 = x_226881;\n                                }\n                                if (thread_active_226889) {\n                                    if (!inactive_226890) {\n                                        float defunc_1_op_res_226882 =\n                                              x_226878 + x_226880;\n                                        float defunc_1_op_res_226883 =\n                                              x_226879 + x_226881;\n                                        \n                                        x_226878 = defunc_1_op_res_226882;\n                                        x_226879 = defunc_1_op_res_226883;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_226863, skip_threads_226888)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_226889) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_226865)[sext_i32_i64(local_tid_2268",
                   "61)] =\n                                        x_226878;\n                                    x_226880 = x_226878;\n                                    ((volatile __local\n                                      float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                                        x_226879;\n                                    x_226881 = x_226879;\n                                }\n                            }\n                            if (sle32(wave_sizze_226863, skip_threads_226888)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_226888 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_226891 = squot32(local_tid_226861, 32) == 0 ||\n                     !ltid_in_bounds_226884;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_226891) {\n                            x_209993 = x_209991;\n                            x_209994 = x_209992;\n                            x_209991 = ((__local\n                                         float *) red_arr_mem_226865)[sext_i32_i64(squot32(local_tid_226861,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_209992 = ((__local\n                                         float *) red_arr_mem_226867)[sext_i32_i64(squot32(local_tid_226861,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n     ",
                   "               {\n                        bool inactive_226892 =\n                             slt64(srem64(sext_i32_i64(local_tid_226861),\n                                          q_s_196695),\n                                   sext_i32_i64(local_tid_226861) -\n                                   sext_i32_i64(squot32(local_tid_226861, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_226891) {\n                            if (inactive_226892) {\n                                x_209991 = x_209993;\n                                x_209992 = x_209994;\n                            }\n                        }\n                        if (!no_carry_in_226891) {\n                            if (!inactive_226892) {\n                                float defunc_1_op_res_209995 = x_209991 +\n                                      x_209993;\n                                float defunc_1_op_res_209996 = x_209992 +\n                                      x_209994;\n                                \n                                x_209991 = defunc_1_op_res_209995;\n                                x_209992 = defunc_1_op_res_209996;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_226891) {\n                            ((__local\n                              float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)] =\n                                x_209991;\n                            ((__local\n                              float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                                x_209992;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_226861, 32) == 0 &&\n                      ",
                   "  ltid_in_bounds_226884) {\n                        ((__local\n                          float *) red_arr_mem_226865)[sext_i32_i64(local_tid_226861)] =\n                            x_209993;\n                        ((__local\n                          float *) red_arr_mem_226867)[sext_i32_i64(local_tid_226861)] =\n                            x_209994;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_226871) *\n                      squot64(segred_group_sizze_209981,\n                              segment_sizze_nonzzero_226858) +\n                      sext_i32_i64(local_tid_226861), m_196691 * n_p_196694 *\n                      s_n_m_196745) && slt64(sext_i32_i64(local_tid_226861),\n                                             squot64(segred_group_sizze_209981,\n                                                     segment_sizze_nonzzero_226858))) {\n                float tmp_226893;\n                \n                tmp_226893 = ((__local\n                               float *) red_arr_mem_226865)[(sext_i32_i64(local_tid_226861) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226858 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223436)[squot64(sext_i32_i64(virt_group_id_226871) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226858) +\n                                               sext_i32_i64(local_tid_226861),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                   ",
                   "                    squot64(sext_i32_i64(virt_group_id_226871) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226858) +\n                                               sext_i32_i64(local_tid_226861) -\n                                               squot64(sext_i32_i64(virt_group_id_226871) *\n                                                       squot64(segred_group_sizze_209981,\n                                                               segment_sizze_nonzzero_226858) +\n                                                       sext_i32_i64(local_tid_226861),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226871) *\n                                        squot64(segred_group_sizze_209981,\n                                                segment_sizze_nonzzero_226858) +\n                                        sext_i32_i64(local_tid_226861) -\n                                        squot64(sext_i32_i64(virt_group_id_226871) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226858) +\n                                                sext_i32_i64(local_tid_226861),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226871) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze",
                   "_nonzzero_226858) +\n                                                sext_i32_i64(local_tid_226861) -\n                                                squot64(sext_i32_i64(virt_group_id_226871) *\n                                                        squot64(segred_group_sizze_209981,\n                                                                segment_sizze_nonzzero_226858) +\n                                                        sext_i32_i64(local_tid_226861),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226893;\n                \n                float tmp_226894;\n                \n                tmp_226894 = ((__local\n                               float *) red_arr_mem_226867)[(sext_i32_i64(local_tid_226861) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_226858 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223441)[squot64(sext_i32_i64(virt_group_id_226871) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226858) +\n                                               sext_i32_i64(local_tid_226861),\n                                               n_p_196694 * s_n_m_196745) *\n                                       (s_n_m_196745 * n_p_196694) +\n                                       squot64(sext_i32_i64(virt_group_id_226871) *\n                                               squot64(segred_group_sizze_209981,\n                                                       segment_sizze_nonzzero_226858)",
                   " +\n                                               sext_i32_i64(local_tid_226861) -\n                                               squot64(sext_i32_i64(virt_group_id_226871) *\n                                                       squot64(segred_group_sizze_209981,\n                                                               segment_sizze_nonzzero_226858) +\n                                                       sext_i32_i64(local_tid_226861),\n                                                       n_p_196694 *\n                                                       s_n_m_196745) *\n                                               (n_p_196694 * s_n_m_196745),\n                                               s_n_m_196745) * s_n_m_196745 +\n                                       (sext_i32_i64(virt_group_id_226871) *\n                                        squot64(segred_group_sizze_209981,\n                                                segment_sizze_nonzzero_226858) +\n                                        sext_i32_i64(local_tid_226861) -\n                                        squot64(sext_i32_i64(virt_group_id_226871) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226858) +\n                                                sext_i32_i64(local_tid_226861),\n                                                n_p_196694 * s_n_m_196745) *\n                                        (n_p_196694 * s_n_m_196745) -\n                                        squot64(sext_i32_i64(virt_group_id_226871) *\n                                                squot64(segred_group_sizze_209981,\n                                                        segment_sizze_nonzzero_226858) +\n                                                sext_i32_i64(local_tid_226861) -\n                                                squot64(sext_i32_i64(virt_group_id_226871) *\n                                      ",
                   "                  squot64(segred_group_sizze_209981,\n                                                                segment_sizze_nonzzero_226858) +\n                                                        sext_i32_i64(local_tid_226861),\n                                                        n_p_196694 *\n                                                        s_n_m_196745) *\n                                                (n_p_196694 * s_n_m_196745),\n                                                s_n_m_196745) * s_n_m_196745)] =\n                    tmp_226894;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_209981\n}\n__kernel void mainzisegred_small_211714(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227072_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t C_len_196743,\n                                        int64_t num_groups_211709,\n                                        int64_t segment_sizze_nonzzero_227065,\n                                        __global unsigned char *mem_223557,\n                                        __global unsigned char *mem_223568)\n{\n    #define segred_group_sizze_211708 (mainzisegred_group_sizze_211691)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227072_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227072_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227067;\n    int32_t local_tid_227068;\n    int64_t group_sizze_227071;\n    int32_t wave_sizze_227070;\n    int32_t gr",
                   "oup_tid_227069;\n    \n    global_tid_227067 = get_global_id(0);\n    local_tid_227068 = get_local_id(0);\n    group_sizze_227071 = get_local_size(0);\n    wave_sizze_227070 = LOCKSTEP_WIDTH;\n    group_tid_227069 = get_group_id(0);\n    \n    int32_t phys_tid_211714 = global_tid_227067;\n    __local unsigned char *red_arr_mem_227072;\n    \n    red_arr_mem_227072 = (__local unsigned char *) red_arr_mem_227072_backing_0;\n    \n    int32_t phys_group_id_227074;\n    \n    phys_group_id_227074 = get_group_id(0);\n    for (int32_t i_227075 = 0; i_227075 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_211708,\n                                                  segment_sizze_nonzzero_227065))) -\n                   phys_group_id_227074, sext_i64_i32(num_groups_211709));\n         i_227075++) {\n        int32_t virt_group_id_227076 = phys_group_id_227074 + i_227075 *\n                sext_i64_i32(num_groups_211709);\n        int64_t slice_227077 = m_196691;\n        int64_t gtid_211712 = squot64(sext_i32_i64(local_tid_227068),\n                                      segment_sizze_nonzzero_227065) +\n                sext_i32_i64(virt_group_id_227076) *\n                squot64(segred_group_sizze_211708,\n                        segment_sizze_nonzzero_227065);\n        int64_t remnant_227078 = squot64(sext_i32_i64(local_tid_227068),\n                                         segment_sizze_nonzzero_227065) +\n                sext_i32_i64(virt_group_id_227076) *\n                squot64(segred_group_sizze_211708,\n                        segment_sizze_nonzzero_227065) - gtid_211712;\n        int64_t gtid_211713 = srem64(sext_i32_i64(local_tid_227068),\n                                     n_p_196694);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, n_p_196694) && (slt64(gtid_211712,\n                                                         m_196691) &&\n                                      ",
                   "             slt64(sext_i32_i64(local_tid_227068),\n                                                         n_p_196694 *\n                                                         squot64(segred_group_sizze_211708,\n                                                                 segment_sizze_nonzzero_227065)))) {\n                float x_211719;\n                \n                x_211719 = ((__global float *) mem_223557)[gtid_211712 *\n                                                           C_len_196743 +\n                                                           gtid_211713];\n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                        x_211719;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, n_p_196694)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_211715;\n                float x_211716;\n                float x_227079;\n                float x_227080;\n                bool ltid_in_bounds_227082 =\n                     slt64(sext_i32_i64(local_tid_227068), n_p_196694 *\n                           squot64(segred_group_sizze_211708,\n                                   segment_sizze_nonzzero_227065));\n                int32_t skip_threads_227083;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227082) {\n                        x_211716 = ((volatile __local\n                                     float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)];\n                        if ((local_tid_227068 - squot32(local_tid_227068, 32) *\n      ",
                   "                       32) == 0) {\n                            x_211715 = x_211716;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227083 = 1;\n                    while (slt32(skip_threads_227083, 32)) {\n                        bool thread_active_227084 = sle32(skip_threads_227083,\n                                                          local_tid_227068 -\n                                                          squot32(local_tid_227068,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227082;\n                        \n                        if (thread_active_227084) {\n                            // read operands\n                            {\n                                x_211715 = ((volatile __local\n                                             float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068) -\n                                                                          sext_i32_i64(skip_threads_227083)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227085 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227068),\n                                              n_p_196694),\n                                       sext_i32_i64(local_tid_227068) -\n                                       sext_i32_i64(local_tid_227068 -\n                                       skip_threads_227083));\n                            \n                            if (thread_active_227084 && inactive_227085) {\n                                x_211715 = x_211716;\n                            }\n                            if (thread_active_227084) {\n                                if (!inactive_227085) {\n                                    float",
                   " defunc_1_op_res_211717 = x_211715 +\n                                          x_211716;\n                                    \n                                    x_211715 = defunc_1_op_res_211717;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227070, skip_threads_227083)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227084) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                                    x_211715;\n                                x_211716 = x_211715;\n                            }\n                        }\n                        if (sle32(wave_sizze_227070, skip_threads_227083)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227083 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227068 - squot32(local_tid_227068, 32) *\n                         32) == 31 && ltid_in_bounds_227082) {\n                        ((volatile __local\n                          float *) red_arr_mem_227072)[sext_i32_i64(squot32(local_tid_227068,\n                                                                            32))] =\n                            x_211715;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227086;\n                    \n                    // read input for in-block scan\n          ",
                   "          {\n                        if (squot32(local_tid_227068, 32) == 0 &&\n                            ltid_in_bounds_227082) {\n                            x_227080 = ((volatile __local\n                                         float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)];\n                            if ((local_tid_227068 - squot32(local_tid_227068,\n                                                            32) * 32) == 0) {\n                                x_227079 = x_227080;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227086 = 1;\n                        while (slt32(skip_threads_227086, 32)) {\n                            bool thread_active_227087 =\n                                 sle32(skip_threads_227086, local_tid_227068 -\n                                       squot32(local_tid_227068, 32) * 32) &&\n                                 (squot32(local_tid_227068, 32) == 0 &&\n                                  ltid_in_bounds_227082);\n                            \n                            if (thread_active_227087) {\n                                // read operands\n                                {\n                                    x_227079 = ((volatile __local\n                                                 float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068) -\n                                                                              sext_i32_i64(skip_threads_227086)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227088 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227068 *\n                                                  32 + 32 - 1), n_p_196694),\n                                           sext_i32_i64(lo",
                   "cal_tid_227068 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227068 -\n                                                         skip_threads_227086) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227087 && inactive_227088) {\n                                    x_227079 = x_227080;\n                                }\n                                if (thread_active_227087) {\n                                    if (!inactive_227088) {\n                                        float defunc_1_op_res_227081 =\n                                              x_227079 + x_227080;\n                                        \n                                        x_227079 = defunc_1_op_res_227081;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227070, skip_threads_227086)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227087) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                                        x_227079;\n                                    x_227080 = x_227079;\n                                }\n                            }\n                            if (sle32(wave_sizze_227070, skip_threads_227086)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227086 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_22708",
                   "9 = squot32(local_tid_227068, 32) == 0 ||\n                     !ltid_in_bounds_227082;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227089) {\n                            x_211716 = x_211715;\n                            x_211715 = ((__local\n                                         float *) red_arr_mem_227072)[sext_i32_i64(squot32(local_tid_227068,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227090 =\n                             slt64(srem64(sext_i32_i64(local_tid_227068),\n                                          n_p_196694),\n                                   sext_i32_i64(local_tid_227068) -\n                                   sext_i32_i64(squot32(local_tid_227068, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227089) {\n                            if (inactive_227090) {\n                                x_211715 = x_211716;\n                            }\n                        }\n                        if (!no_carry_in_227089) {\n                            if (!inactive_227090) {\n                                float defunc_1_op_res_211717 = x_211715 +\n                                      x_211716;\n                                \n                                x_211715 = defunc_1_op_res_211717;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227089) {\n                            ((__local\n                              float *) red_arr",
                   "_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                                x_211715;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227068, 32) == 0 &&\n                        ltid_in_bounds_227082) {\n                        ((__local\n                          float *) red_arr_mem_227072)[sext_i32_i64(local_tid_227068)] =\n                            x_211716;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227076) *\n                      squot64(segred_group_sizze_211708,\n                              segment_sizze_nonzzero_227065) +\n                      sext_i32_i64(local_tid_227068), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227068),\n                      squot64(segred_group_sizze_211708,\n                              segment_sizze_nonzzero_227065))) {\n                float tmp_227091;\n                \n                tmp_227091 = ((__local\n                               float *) red_arr_mem_227072)[(sext_i32_i64(local_tid_227068) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227065 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223568)[sext_i32_i64(virt_group_id_227076) *\n                                       squot64(segred_group_sizze_211708,\n                                               segment_sizze_nonzzero_227065) +\n                                       sext_i32_i64(local_tid_227068)] =\n                    tmp_227091;\n            }\n        }\n        barrier(CL",
                   "K_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211708\n}\n__kernel void mainzisegred_small_211845(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227215_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_p_196694,\n                                        int64_t lifted_single_ma_l_arg_197247,\n                                        int64_t num_groups_211840,\n                                        int64_t segment_sizze_nonzzero_227208,\n                                        __global unsigned char *mem_223574,\n                                        __global unsigned char *mem_223585)\n{\n    #define segred_group_sizze_211839 (mainzisegred_group_sizze_211822)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227215_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227215_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227210;\n    int32_t local_tid_227211;\n    int64_t group_sizze_227214;\n    int32_t wave_sizze_227213;\n    int32_t group_tid_227212;\n    \n    global_tid_227210 = get_global_id(0);\n    local_tid_227211 = get_local_id(0);\n    group_sizze_227214 = get_local_size(0);\n    wave_sizze_227213 = LOCKSTEP_WIDTH;\n    group_tid_227212 = get_group_id(0);\n    \n    int32_t phys_tid_211845 = global_tid_227210;\n    __local unsigned char *red_arr_mem_227215;\n    \n    red_arr_mem_227215 = (__local unsigned char *) red_arr_mem_227215_backing_0;\n    \n    int32_t phys_group_id_227217;\n    \n    phys_group_id_227217 = get_group_id(0);\n    for (int32_t i_227218 = 0; i_227218 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691",
                   ",\n                                          squot64(segred_group_sizze_211839,\n                                                  segment_sizze_nonzzero_227208))) -\n                   phys_group_id_227217, sext_i64_i32(num_groups_211840));\n         i_227218++) {\n        int32_t virt_group_id_227219 = phys_group_id_227217 + i_227218 *\n                sext_i64_i32(num_groups_211840);\n        int64_t slice_227220 = m_196691;\n        int64_t gtid_211843 = squot64(sext_i32_i64(local_tid_227211),\n                                      segment_sizze_nonzzero_227208) +\n                sext_i32_i64(virt_group_id_227219) *\n                squot64(segred_group_sizze_211839,\n                        segment_sizze_nonzzero_227208);\n        int64_t remnant_227221 = squot64(sext_i32_i64(local_tid_227211),\n                                         segment_sizze_nonzzero_227208) +\n                sext_i32_i64(virt_group_id_227219) *\n                squot64(segred_group_sizze_211839,\n                        segment_sizze_nonzzero_227208) - gtid_211843;\n        int64_t gtid_211844 = srem64(sext_i32_i64(local_tid_227211),\n                                     n_p_196694);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, n_p_196694) && (slt64(gtid_211843,\n                                                         m_196691) &&\n                                                   slt64(sext_i32_i64(local_tid_227211),\n                                                         n_p_196694 *\n                                                         squot64(segred_group_sizze_211839,\n                                                                 segment_sizze_nonzzero_227208)))) {\n                float x_211850;\n                \n                x_211850 = ((__global float *) mem_223574)[gtid_211843 *\n                                                           lifted_single_ma_l_arg_197247 +\n                                                           gtid_211",
                   "844];\n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                        x_211850;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, n_p_196694)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_211846;\n                float x_211847;\n                float x_227222;\n                float x_227223;\n                bool ltid_in_bounds_227225 =\n                     slt64(sext_i32_i64(local_tid_227211), n_p_196694 *\n                           squot64(segred_group_sizze_211839,\n                                   segment_sizze_nonzzero_227208));\n                int32_t skip_threads_227226;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227225) {\n                        x_211847 = ((volatile __local\n                                     float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)];\n                        if ((local_tid_227211 - squot32(local_tid_227211, 32) *\n                             32) == 0) {\n                            x_211846 = x_211847;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227226 = 1;\n                    while (slt32(skip_threads_227226, 32)) {\n                        bool thread_active_227227 = sle32(skip_threads_227226,\n                                                          local_tid_227211 -\n                                                          squot32(local_tid_227211,",
                   "\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227225;\n                        \n                        if (thread_active_227227) {\n                            // read operands\n                            {\n                                x_211846 = ((volatile __local\n                                             float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211) -\n                                                                          sext_i32_i64(skip_threads_227226)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227228 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227211),\n                                              n_p_196694),\n                                       sext_i32_i64(local_tid_227211) -\n                                       sext_i32_i64(local_tid_227211 -\n                                       skip_threads_227226));\n                            \n                            if (thread_active_227227 && inactive_227228) {\n                                x_211846 = x_211847;\n                            }\n                            if (thread_active_227227) {\n                                if (!inactive_227228) {\n                                    float defunc_1_op_res_211848 = x_211846 +\n                                          x_211847;\n                                    \n                                    x_211846 = defunc_1_op_res_211848;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227213, skip_threads_227226)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227227) {\n                            // write result\n                            {\n   ",
                   "                             ((volatile __local\n                                  float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                                    x_211846;\n                                x_211847 = x_211846;\n                            }\n                        }\n                        if (sle32(wave_sizze_227213, skip_threads_227226)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227226 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227211 - squot32(local_tid_227211, 32) *\n                         32) == 31 && ltid_in_bounds_227225) {\n                        ((volatile __local\n                          float *) red_arr_mem_227215)[sext_i32_i64(squot32(local_tid_227211,\n                                                                            32))] =\n                            x_211846;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227229;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227211, 32) == 0 &&\n                            ltid_in_bounds_227225) {\n                            x_227223 = ((volatile __local\n                                         float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)];\n                            if ((local_tid_227211 - squot32(local_tid_227211,\n                                                            32) * 32) == 0) {\n                                x_227222 = x_227223;\n                            }\n                        }\n                    ",
                   "}\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227229 = 1;\n                        while (slt32(skip_threads_227229, 32)) {\n                            bool thread_active_227230 =\n                                 sle32(skip_threads_227229, local_tid_227211 -\n                                       squot32(local_tid_227211, 32) * 32) &&\n                                 (squot32(local_tid_227211, 32) == 0 &&\n                                  ltid_in_bounds_227225);\n                            \n                            if (thread_active_227230) {\n                                // read operands\n                                {\n                                    x_227222 = ((volatile __local\n                                                 float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211) -\n                                                                              sext_i32_i64(skip_threads_227229)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227231 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227211 *\n                                                  32 + 32 - 1), n_p_196694),\n                                           sext_i32_i64(local_tid_227211 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227211 -\n                                                         skip_threads_227229) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227230 && inactive_227231) {\n                                    x_227222 = x_227223;\n                                }\n                                if (thread_active_227230) {\n                         ",
                   "           if (!inactive_227231) {\n                                        float defunc_1_op_res_227224 =\n                                              x_227222 + x_227223;\n                                        \n                                        x_227222 = defunc_1_op_res_227224;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227213, skip_threads_227229)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227230) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                                        x_227222;\n                                    x_227223 = x_227222;\n                                }\n                            }\n                            if (sle32(wave_sizze_227213, skip_threads_227229)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227229 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227232 = squot32(local_tid_227211, 32) == 0 ||\n                     !ltid_in_bounds_227225;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227232) {\n                            x_211847 = x_211846;\n                            x_211846 = ((__local\n                                         float *) red_arr_mem_227215)[sext_i32_i64(squot32(local_tid_227211,\n                                                                             ",
                   "              32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227233 =\n                             slt64(srem64(sext_i32_i64(local_tid_227211),\n                                          n_p_196694),\n                                   sext_i32_i64(local_tid_227211) -\n                                   sext_i32_i64(squot32(local_tid_227211, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227232) {\n                            if (inactive_227233) {\n                                x_211846 = x_211847;\n                            }\n                        }\n                        if (!no_carry_in_227232) {\n                            if (!inactive_227233) {\n                                float defunc_1_op_res_211848 = x_211846 +\n                                      x_211847;\n                                \n                                x_211846 = defunc_1_op_res_211848;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227232) {\n                            ((__local\n                              float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                                x_211846;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227211, 32) == 0 &&\n                        ltid_in_bounds_227225) {\n                        ((__local\n                          float *) red_arr_mem_227215)[sext_i32_i64(local_tid_227211)] =\n                            x_211847;\n                    }\n      ",
                   "          }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227219) *\n                      squot64(segred_group_sizze_211839,\n                              segment_sizze_nonzzero_227208) +\n                      sext_i32_i64(local_tid_227211), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227211),\n                      squot64(segred_group_sizze_211839,\n                              segment_sizze_nonzzero_227208))) {\n                float tmp_227234;\n                \n                tmp_227234 = ((__local\n                               float *) red_arr_mem_227215)[(sext_i32_i64(local_tid_227211) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227208 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223585)[sext_i32_i64(virt_group_id_227219) *\n                                       squot64(segred_group_sizze_211839,\n                                               segment_sizze_nonzzero_227208) +\n                                       sext_i32_i64(local_tid_227211)] =\n                    tmp_227234;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211839\n}\n__kernel void mainzisegred_small_211976(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227358_backing_aligned_0,\n                                        int64_t m_196691,\n                                        int64_t dyn_lifted_single_ma_l_arg_197257,\n                                        int64_t num_groups_211971,\n ",
                   "                                       int64_t segment_sizze_nonzzero_227351,\n                                        __global unsigned char *mem_223591,\n                                        __global unsigned char *mem_223602)\n{\n    #define segred_group_sizze_211970 (mainzisegred_group_sizze_211953)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227358_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227358_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227353;\n    int32_t local_tid_227354;\n    int64_t group_sizze_227357;\n    int32_t wave_sizze_227356;\n    int32_t group_tid_227355;\n    \n    global_tid_227353 = get_global_id(0);\n    local_tid_227354 = get_local_id(0);\n    group_sizze_227357 = get_local_size(0);\n    wave_sizze_227356 = LOCKSTEP_WIDTH;\n    group_tid_227355 = get_group_id(0);\n    \n    int32_t phys_tid_211976 = global_tid_227353;\n    __local unsigned char *red_arr_mem_227358;\n    \n    red_arr_mem_227358 = (__local unsigned char *) red_arr_mem_227358_backing_0;\n    \n    int32_t phys_group_id_227360;\n    \n    phys_group_id_227360 = get_group_id(0);\n    for (int32_t i_227361 = 0; i_227361 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_211970,\n                                                  segment_sizze_nonzzero_227351))) -\n                   phys_group_id_227360, sext_i64_i32(num_groups_211971));\n         i_227361++) {\n        int32_t virt_group_id_227362 = phys_group_id_227360 + i_227361 *\n                sext_i64_i32(num_groups_211971);\n        int64_t slice_227363 = m_196691;\n        int64_t gtid_211974 = squot64(sext_i32_i64(local_tid_227354),\n                                      segment_sizze_nonzzero_227351) +\n                sext_i32_i6",
                   "4(virt_group_id_227362) *\n                squot64(segred_group_sizze_211970,\n                        segment_sizze_nonzzero_227351);\n        int64_t remnant_227364 = squot64(sext_i32_i64(local_tid_227354),\n                                         segment_sizze_nonzzero_227351) +\n                sext_i32_i64(virt_group_id_227362) *\n                squot64(segred_group_sizze_211970,\n                        segment_sizze_nonzzero_227351) - gtid_211974;\n        int64_t gtid_211975 = srem64(sext_i32_i64(local_tid_227354),\n                                     (int64_t) 3);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, (int64_t) 3) && (slt64(gtid_211974,\n                                                          m_196691) &&\n                                                    slt64(sext_i32_i64(local_tid_227354),\n                                                          (int64_t) 3 *\n                                                          squot64(segred_group_sizze_211970,\n                                                                  segment_sizze_nonzzero_227351)))) {\n                float x_211981;\n                \n                x_211981 = ((__global float *) mem_223591)[gtid_211974 *\n                                                           dyn_lifted_single_ma_l_arg_197257 +\n                                                           gtid_211975];\n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                        x_211981;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, (int64_t) 3)) {\n            // perfor",
                   "m segmented scan to imitate reduction\n            {\n                float x_211977;\n                float x_211978;\n                float x_227365;\n                float x_227366;\n                bool ltid_in_bounds_227368 =\n                     slt64(sext_i32_i64(local_tid_227354), (int64_t) 3 *\n                           squot64(segred_group_sizze_211970,\n                                   segment_sizze_nonzzero_227351));\n                int32_t skip_threads_227369;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227368) {\n                        x_211978 = ((volatile __local\n                                     float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)];\n                        if ((local_tid_227354 - squot32(local_tid_227354, 32) *\n                             32) == 0) {\n                            x_211977 = x_211978;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227369 = 1;\n                    while (slt32(skip_threads_227369, 32)) {\n                        bool thread_active_227370 = sle32(skip_threads_227369,\n                                                          local_tid_227354 -\n                                                          squot32(local_tid_227354,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227368;\n                        \n                        if (thread_active_227370) {\n                            // read operands\n                            {\n                                x_211977 = ((volatile __local\n                                             float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354) -\n                                                                          sext_i32_i64(skip_threads_227369)];\n                ",
                   "            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227371 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227354),\n                                              (int64_t) 3),\n                                       sext_i32_i64(local_tid_227354) -\n                                       sext_i32_i64(local_tid_227354 -\n                                       skip_threads_227369));\n                            \n                            if (thread_active_227370 && inactive_227371) {\n                                x_211977 = x_211978;\n                            }\n                            if (thread_active_227370) {\n                                if (!inactive_227371) {\n                                    float defunc_1_op_res_211979 = x_211977 +\n                                          x_211978;\n                                    \n                                    x_211977 = defunc_1_op_res_211979;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227356, skip_threads_227369)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227370) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                                    x_211977;\n                                x_211978 = x_211977;\n                            }\n                        }\n                        if (sle32(wave_sizze_227356, skip_threads_227369)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227369 *= 2;\n                    }\n                }\n                barrier(CLK",
                   "_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227354 - squot32(local_tid_227354, 32) *\n                         32) == 31 && ltid_in_bounds_227368) {\n                        ((volatile __local\n                          float *) red_arr_mem_227358)[sext_i32_i64(squot32(local_tid_227354,\n                                                                            32))] =\n                            x_211977;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227372;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227354, 32) == 0 &&\n                            ltid_in_bounds_227368) {\n                            x_227366 = ((volatile __local\n                                         float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)];\n                            if ((local_tid_227354 - squot32(local_tid_227354,\n                                                            32) * 32) == 0) {\n                                x_227365 = x_227366;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227372 = 1;\n                        while (slt32(skip_threads_227372, 32)) {\n                            bool thread_active_227373 =\n                                 sle32(skip_threads_227372, local_tid_227354 -\n                                       squot32(local_tid_227354, 32) * 32) &&\n                                 (squot32(local_tid_227354, 32) == 0 &&\n                                  ltid_in_bounds_227368);\n                            \n",
                   "                            if (thread_active_227373) {\n                                // read operands\n                                {\n                                    x_227365 = ((volatile __local\n                                                 float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354) -\n                                                                              sext_i32_i64(skip_threads_227372)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227374 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227354 *\n                                                  32 + 32 - 1), (int64_t) 3),\n                                           sext_i32_i64(local_tid_227354 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227354 -\n                                                         skip_threads_227372) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227373 && inactive_227374) {\n                                    x_227365 = x_227366;\n                                }\n                                if (thread_active_227373) {\n                                    if (!inactive_227374) {\n                                        float defunc_1_op_res_227367 =\n                                              x_227365 + x_227366;\n                                        \n                                        x_227365 = defunc_1_op_res_227367;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227356, skip_threads_227372)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n             ",
                   "               if (thread_active_227373) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                                        x_227365;\n                                    x_227366 = x_227365;\n                                }\n                            }\n                            if (sle32(wave_sizze_227356, skip_threads_227372)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227372 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227375 = squot32(local_tid_227354, 32) == 0 ||\n                     !ltid_in_bounds_227368;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227375) {\n                            x_211978 = x_211977;\n                            x_211977 = ((__local\n                                         float *) red_arr_mem_227358)[sext_i32_i64(squot32(local_tid_227354,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227376 =\n                             slt64(srem64(sext_i32_i64(local_tid_227354),\n                                          (int64_t) 3),\n                                   sext_i32_i64(local_tid_227354) -\n                                   sext_i32_i64(squot32(local_tid_227354, 32) *\n                                   3",
                   "2 - 1));\n                        \n                        if (!no_carry_in_227375) {\n                            if (inactive_227376) {\n                                x_211977 = x_211978;\n                            }\n                        }\n                        if (!no_carry_in_227375) {\n                            if (!inactive_227376) {\n                                float defunc_1_op_res_211979 = x_211977 +\n                                      x_211978;\n                                \n                                x_211977 = defunc_1_op_res_211979;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227375) {\n                            ((__local\n                              float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                                x_211977;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227354, 32) == 0 &&\n                        ltid_in_bounds_227368) {\n                        ((__local\n                          float *) red_arr_mem_227358)[sext_i32_i64(local_tid_227354)] =\n                            x_211978;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227362) *\n                      squot64(segred_group_sizze_211970,\n                              segment_sizze_nonzzero_227351) +\n                      sext_i32_i64(local_tid_227354), m_196691) &&\n                slt64(sext_i32_i64(local_tid_227354),\n                      squot64(segred_group_sizze_211970,\n                              segment_sizze_nonz",
                   "zero_227351))) {\n                float tmp_227377;\n                \n                tmp_227377 = ((__local\n                               float *) red_arr_mem_227358)[(sext_i32_i64(local_tid_227354) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227351 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223602)[sext_i32_i64(virt_group_id_227362) *\n                                       squot64(segred_group_sizze_211970,\n                                               segment_sizze_nonzzero_227351) +\n                                       sext_i32_i64(local_tid_227354)] =\n                    tmp_227377;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_211970\n}\n__kernel void mainzisegred_small_212598(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227535_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_212592,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t segment_sizze_nonzzero_227528,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_me",
                   "m_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223653)\n{\n    #define segred_group_sizze_212591 (mainzisegred_group_sizze_212343)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227535_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227535_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227530;\n    int32_t local_tid_227531;\n    int64_t group_sizze_227534;\n    int32_t wave_sizze_227533;\n    int32_t group_tid_227532;\n    \n    global_tid_227530 = get_global_id(0);\n    local_tid_227531 = get_local_id(0);\n    group_sizze_227534 = get_local_size(0);\n    wave_sizze_227533 = LOCKSTEP_WIDTH;\n    group_tid_227532 = get_group_id(0);\n    \n    int32_t phys_tid_212598 = global_tid_227530;\n    __local unsigned char *red_arr_mem_227535;\n    \n    red_arr_mem_227535 = (__local unsigned char *) red_arr_mem_227535_backing_0;\n    \n    int32_t phys_group_id_227537;\n    \n    phys_group_id_227537 = get_group_id(0);\n    for (int32_t i_227538 = 0; i_227538 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_212591,\n                                                  segment_sizze_nonzzero_227528))) -\n                   phys_group_id_227537, sext_i64_i32(num_groups_212592));\n         i_227538++) {\n        int32_t virt_group_id_227539 = phys_group_id_227537 + i_227538 *\n                sext_i64_i32(num_groups_212592);\n        int64_t slice_227540 = l_n_m_196752;\n        int64_t slice_227541 = m_196691 * slice_227540;\n        int64_t gtid_212595 = squot64(squot64(sext_i32_i64(local_tid_227531),\n                                     ",
                   "         segment_sizze_nonzzero_227528) +\n                                      sext_i32_i64(virt_group_id_227539) *\n                                      squot64(segred_group_sizze_212591,\n                                              segment_sizze_nonzzero_227528),\n                                      slice_227540);\n        int64_t remnant_227542 = squot64(sext_i32_i64(local_tid_227531),\n                                         segment_sizze_nonzzero_227528) +\n                sext_i32_i64(virt_group_id_227539) *\n                squot64(segred_group_sizze_212591,\n                        segment_sizze_nonzzero_227528) - gtid_212595 *\n                slice_227540;\n        int64_t gtid_212596 = remnant_227542;\n        int64_t remnant_227543 = remnant_227542 - gtid_212596;\n        int64_t gtid_212597 = srem64(sext_i32_i64(local_tid_227531),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64(gtid_212595,\n                                                          m_196691) &&\n                                                    slt64(gtid_212596,\n                                                          l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_227531),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_212591,\n                                                                 segment_sizze_nonzzero_227528)))) {\n                int64_t x_212606;\n                \n                x_212606 = ((__global int64_t *) ext_mem_222469)[gtid_212595 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_212596];\n                \n                float x_212607;\n                \n                x_212607 = ((__global flo",
                   "at *) ext_mem_222468)[gtid_212595 *\n                                                               l_n_m_196752 +\n                                                               gtid_212596];\n                \n                int64_t binop_y_221782 = mul64(jump_t_196702, gtid_212596);\n                int64_t binop_y_221783 = smin64(i_196779, binop_y_221782);\n                int64_t index_primexp_221784 = add64((int64_t) 1,\n                                                     binop_y_221783);\n                bool cond_212610 = sle64(n_196692, gtid_212597);\n                int64_t defunc_0_f_res_212611;\n                \n                if (cond_212610) {\n                    defunc_0_f_res_212611 = (int64_t) 0;\n                } else {\n                    int64_t i_212612 = add64(gtid_212597, x_212606);\n                    int64_t defunc_1_add_res_212613 = add64((int64_t) 1,\n                                                            i_212612);\n                    \n                    defunc_0_f_res_212611 = defunc_1_add_res_212613;\n                }\n                \n                float defunc_0_f_res_212614;\n                \n                if (cond_212610) {\n                    defunc_0_f_res_212614 = 0.0F;\n                } else {\n                    int64_t i_212615 = add64(gtid_212597, x_212606);\n                    float defunc_0_add_arg_212616;\n                    \n                    defunc_0_add_arg_212616 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_212595 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_212615 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_212614 = defunc_0_add_arg_212616;\n        ",
                   "        }\n                \n                int64_t binop_p_212617 = sub64(defunc_0_f_res_212611,\n                                               index_primexp_221784);\n                float defunc_0_f_res_212618 = sitofp_i64_f32(binop_p_212617);\n                float abs_res_212619 = (float) fabs(defunc_0_f_res_212618);\n                float tmp1_212620 = abs_res_212619 / x_212607;\n                float x_212621 = tmp1_212620 * tmp1_212620;\n                float y_212622 = tmp1_212620 * x_212621;\n                float tmp2_212623 = 1.0F - y_212622;\n                float x_212624 = tmp2_212623 * tmp2_212623;\n                float tmp3_212625 = tmp2_212623 * x_212624;\n                float w_j_212626 = defunc_0_f_res_212614 * tmp3_212625;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                        w_j_212626;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_212599;\n                float x_212600;\n                float x_227544;\n                float x_227545;\n                bool ltid_in_bounds_227547 =\n                     slt64(sext_i32_i64(local_tid_227531), q_l_196697 *\n                           squot64(segred_group_sizze_212591,\n                                   segment_sizze_nonzzero_227528));\n                int32_t skip_threads_227548;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227547) {\n                        x_212600 = ((volatile __local\n   ",
                   "                                  float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)];\n                        if ((local_tid_227531 - squot32(local_tid_227531, 32) *\n                             32) == 0) {\n                            x_212599 = x_212600;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227548 = 1;\n                    while (slt32(skip_threads_227548, 32)) {\n                        bool thread_active_227549 = sle32(skip_threads_227548,\n                                                          local_tid_227531 -\n                                                          squot32(local_tid_227531,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227547;\n                        \n                        if (thread_active_227549) {\n                            // read operands\n                            {\n                                x_212599 = ((volatile __local\n                                             float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531) -\n                                                                          sext_i32_i64(skip_threads_227548)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227550 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227531),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227531) -\n                                       sext_i32_i64(local_tid_227531 -\n                                       skip_threads_227548));\n                            \n                            if (thread_active_227549 && inactive_227550) {\n                                x_212599 = x_212600;\n ",
                   "                           }\n                            if (thread_active_227549) {\n                                if (!inactive_227550) {\n                                    float defunc_1_op_res_212601 = x_212599 +\n                                          x_212600;\n                                    \n                                    x_212599 = defunc_1_op_res_212601;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227533, skip_threads_227548)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227549) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                                    x_212599;\n                                x_212600 = x_212599;\n                            }\n                        }\n                        if (sle32(wave_sizze_227533, skip_threads_227548)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227548 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227531 - squot32(local_tid_227531, 32) *\n                         32) == 31 && ltid_in_bounds_227547) {\n                        ((volatile __local\n                          float *) red_arr_mem_227535)[sext_i32_i64(squot32(local_tid_227531,\n                                                                            32))] =\n                            x_212599;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' co",
                   "ntains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227551;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227531, 32) == 0 &&\n                            ltid_in_bounds_227547) {\n                            x_227545 = ((volatile __local\n                                         float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)];\n                            if ((local_tid_227531 - squot32(local_tid_227531,\n                                                            32) * 32) == 0) {\n                                x_227544 = x_227545;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227551 = 1;\n                        while (slt32(skip_threads_227551, 32)) {\n                            bool thread_active_227552 =\n                                 sle32(skip_threads_227551, local_tid_227531 -\n                                       squot32(local_tid_227531, 32) * 32) &&\n                                 (squot32(local_tid_227531, 32) == 0 &&\n                                  ltid_in_bounds_227547);\n                            \n                            if (thread_active_227552) {\n                                // read operands\n                                {\n                                    x_227544 = ((volatile __local\n                                                 float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531) -\n                                                                              sext_i32_i64(skip_threads_227551)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227553 =\n                                   ",
                   "  slt64(srem64(sext_i32_i64(local_tid_227531 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227531 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227531 -\n                                                         skip_threads_227551) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227552 && inactive_227553) {\n                                    x_227544 = x_227545;\n                                }\n                                if (thread_active_227552) {\n                                    if (!inactive_227553) {\n                                        float defunc_1_op_res_227546 =\n                                              x_227544 + x_227545;\n                                        \n                                        x_227544 = defunc_1_op_res_227546;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227533, skip_threads_227551)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227552) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                                        x_227544;\n                                    x_227545 = x_227544;\n                                }\n                            }\n                            if (sle32(wave_sizze_227533, skip_threads_227551)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_thread",
                   "s_227551 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227554 = squot32(local_tid_227531, 32) == 0 ||\n                     !ltid_in_bounds_227547;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227554) {\n                            x_212600 = x_212599;\n                            x_212599 = ((__local\n                                         float *) red_arr_mem_227535)[sext_i32_i64(squot32(local_tid_227531,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227555 =\n                             slt64(srem64(sext_i32_i64(local_tid_227531),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227531) -\n                                   sext_i32_i64(squot32(local_tid_227531, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227554) {\n                            if (inactive_227555) {\n                                x_212599 = x_212600;\n                            }\n                        }\n                        if (!no_carry_in_227554) {\n                            if (!inactive_227555) {\n                                float defunc_1_op_res_212601 = x_212599 +\n                                      x_212600;\n                                \n                                x_212599 = defunc_1_op_res_212601;\n                            }\n                        }\n                    }\n                 ",
                   "   // write final result\n                    {\n                        if (!no_carry_in_227554) {\n                            ((__local\n                              float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                                x_212599;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227531, 32) == 0 &&\n                        ltid_in_bounds_227547) {\n                        ((__local\n                          float *) red_arr_mem_227535)[sext_i32_i64(local_tid_227531)] =\n                            x_212600;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227539) *\n                      squot64(segred_group_sizze_212591,\n                              segment_sizze_nonzzero_227528) +\n                      sext_i32_i64(local_tid_227531), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227531),\n                                             squot64(segred_group_sizze_212591,\n                                                     segment_sizze_nonzzero_227528))) {\n                float tmp_227556;\n                \n                tmp_227556 = ((__local\n                               float *) red_arr_mem_227535)[(sext_i32_i64(local_tid_227531) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227528 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223653)[squot64(sext_i32_i64(virt_group_id_227539) *\n                                            ",
                   "   squot64(segred_group_sizze_212591,\n                                                       segment_sizze_nonzzero_227528) +\n                                               sext_i32_i64(local_tid_227531),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227539) *\n                                        squot64(segred_group_sizze_212591,\n                                                segment_sizze_nonzzero_227528) +\n                                        sext_i32_i64(local_tid_227531) -\n                                        squot64(sext_i32_i64(virt_group_id_227539) *\n                                                squot64(segred_group_sizze_212591,\n                                                        segment_sizze_nonzzero_227528) +\n                                                sext_i32_i64(local_tid_227531),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227556;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_212591\n}\n__kernel void mainzisegred_small_212647(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227617_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_212641,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222",
                   "548,\n                                        int64_t segment_sizze_nonzzero_227610,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223658,\n                                        __global unsigned char *mem_223663)\n{\n    #define segred_group_sizze_212640 (mainzisegred_group_sizze_212276)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227617_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227617_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227612;\n    int32_t local_tid_227613;\n    int64_t group_sizze_227616;\n    int32_t wave_sizze_227615;\n    int32_t group_tid_227614;\n    \n    global_tid_227612 = get_global_id(0);\n    local_tid_227613 = get_local_id(0);\n    group_sizze_227616 = get_local_size(0);\n    wave_sizze_227615 = LOCKSTEP_WIDTH;\n    group_tid_227614 = get_group_id(0);\n    \n    int32_t phys_tid_212647 = global_tid_227612;\n    __local unsigned char *red_arr_mem_227617;\n    \n    red_arr_mem_227617 = (__local unsigned char *) red_arr_mem_227617_backing_0;\n    \n    int32_t phys_group_id_227619;\n    \n    phys_group_id_227619 = get_group_id(0);\n    for (int32_t i_227620 = 0; i_227620 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_212640,\n                                                  segment_sizze_nonzzero_227610))) -\n                   phys_group_id_227619, sext_i64_",
                   "i32(num_groups_212641));\n         i_227620++) {\n        int32_t virt_group_id_227621 = phys_group_id_227619 + i_227620 *\n                sext_i64_i32(num_groups_212641);\n        int64_t slice_227622 = l_n_m_196752;\n        int64_t slice_227623 = m_196691 * slice_227622;\n        int64_t gtid_212644 = squot64(squot64(sext_i32_i64(local_tid_227613),\n                                              segment_sizze_nonzzero_227610) +\n                                      sext_i32_i64(virt_group_id_227621) *\n                                      squot64(segred_group_sizze_212640,\n                                              segment_sizze_nonzzero_227610),\n                                      slice_227622);\n        int64_t remnant_227624 = squot64(sext_i32_i64(local_tid_227613),\n                                         segment_sizze_nonzzero_227610) +\n                sext_i32_i64(virt_group_id_227621) *\n                squot64(segred_group_sizze_212640,\n                        segment_sizze_nonzzero_227610) - gtid_212644 *\n                slice_227622;\n        int64_t gtid_212645 = remnant_227624;\n        int64_t remnant_227625 = remnant_227624 - gtid_212645;\n        int64_t gtid_212646 = srem64(sext_i32_i64(local_tid_227613),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64(gtid_212644,\n                                                          m_196691) &&\n                                                    slt64(gtid_212645,\n                                                          l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_227613),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_212640,\n                                                                 segment_sizze_nonzzero_227610)))) {\n          ",
                   "      int64_t x_212657;\n                \n                x_212657 = ((__global int64_t *) ext_mem_222469)[gtid_212644 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_212645];\n                \n                float x_212658;\n                \n                x_212658 = ((__global float *) ext_mem_222468)[gtid_212644 *\n                                                               l_n_m_196752 +\n                                                               gtid_212645];\n                \n                int64_t binop_y_221777 = mul64(jump_t_196702, gtid_212645);\n                int64_t binop_y_221778 = smin64(i_196779, binop_y_221777);\n                int64_t index_primexp_221779 = add64((int64_t) 1,\n                                                     binop_y_221778);\n                float a0_212660;\n                \n                a0_212660 = ((__global float *) mem_223658)[gtid_212644 *\n                                                            l_n_m_196752 +\n                                                            gtid_212645];\n                \n                bool cond_212662 = sle64(n_196692, gtid_212646);\n                int64_t defunc_0_f_res_212663;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212663 = (int64_t) 0;\n                } else {\n                    int64_t i_212664 = add64(gtid_212646, x_212657);\n                    int64_t defunc_1_add_res_212665 = add64((int64_t) 1,\n                                                            i_212664);\n                    \n                    defunc_0_f_res_212663 = defunc_1_add_res_212665;\n                }\n                \n                float defunc_0_f_res_212666;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212666 = 0.0F;\n                } else {\n                    int64_t i_212667 = add64(gtid_212646, x_212657);\n    ",
                   "                float defunc_0_add_arg_212668;\n                    \n                    defunc_0_add_arg_212668 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_212644 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_212667 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_212666 = defunc_0_add_arg_212668;\n                }\n                \n                int64_t binop_p_212669 = sub64(defunc_0_f_res_212663,\n                                               index_primexp_221779);\n                float defunc_0_f_res_212670 = sitofp_i64_f32(binop_p_212669);\n                float abs_res_212671 = (float) fabs(defunc_0_f_res_212670);\n                float tmp1_212672 = abs_res_212671 / x_212658;\n                float x_212673 = tmp1_212672 * tmp1_212672;\n                float y_212674 = tmp1_212672 * x_212673;\n                float tmp2_212675 = 1.0F - y_212674;\n                float x_212676 = tmp2_212675 * tmp2_212675;\n                float tmp3_212677 = tmp2_212675 * x_212676;\n                float tmp4_212678 = defunc_0_f_res_212666 * tmp3_212677;\n                float defunc_0_f_res_212679;\n                \n                if (cond_212662) {\n                    defunc_0_f_res_212679 = 0.0F;\n                } else {\n                    int64_t i_212680 = add64(gtid_212646, x_212657);\n                    float defunc_0_add_arg_212681;\n                    \n                    defunc_0_add_arg_212681 = ((__global\n                                                float *) mem_223608)[gtid_212644 *\n                                                                     n_196692 +\n                                            ",
                   "                         i_212680];\n                    defunc_0_f_res_212679 = defunc_0_add_arg_212681;\n                }\n                \n                float x_212682 = a0_212660 * tmp4_212678;\n                float defunc_9_fit_fun_res_212683 = defunc_0_f_res_212679 *\n                      x_212682;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                        defunc_9_fit_fun_res_212683;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_212648;\n                float x_212649;\n                float x_227626;\n                float x_227627;\n                bool ltid_in_bounds_227629 =\n                     slt64(sext_i32_i64(local_tid_227613), q_l_196697 *\n                           squot64(segred_group_sizze_212640,\n                                   segment_sizze_nonzzero_227610));\n                int32_t skip_threads_227630;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227629) {\n                        x_212649 = ((volatile __local\n                                     float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)];\n                        if ((local_tid_227613 - squot32(local_tid_227613, 32) *\n                             32) == 0) {\n                            x_212648 = x_212649;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n         ",
                   "           skip_threads_227630 = 1;\n                    while (slt32(skip_threads_227630, 32)) {\n                        bool thread_active_227631 = sle32(skip_threads_227630,\n                                                          local_tid_227613 -\n                                                          squot32(local_tid_227613,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227629;\n                        \n                        if (thread_active_227631) {\n                            // read operands\n                            {\n                                x_212648 = ((volatile __local\n                                             float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613) -\n                                                                          sext_i32_i64(skip_threads_227630)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227632 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227613),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227613) -\n                                       sext_i32_i64(local_tid_227613 -\n                                       skip_threads_227630));\n                            \n                            if (thread_active_227631 && inactive_227632) {\n                                x_212648 = x_212649;\n                            }\n                            if (thread_active_227631) {\n                                if (!inactive_227632) {\n                                    float defunc_1_op_res_212650 = x_212648 +\n                                          x_212649;\n                                    \n                                    x_212648 = defunc_1_op_res_212650;\n                                }\n          ",
                   "                  }\n                        }\n                        if (sle32(wave_sizze_227615, skip_threads_227630)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227631) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                                    x_212648;\n                                x_212649 = x_212648;\n                            }\n                        }\n                        if (sle32(wave_sizze_227615, skip_threads_227630)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227630 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227613 - squot32(local_tid_227613, 32) *\n                         32) == 31 && ltid_in_bounds_227629) {\n                        ((volatile __local\n                          float *) red_arr_mem_227617)[sext_i32_i64(squot32(local_tid_227613,\n                                                                            32))] =\n                            x_212648;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227633;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227613, 32) == 0 &&\n                            ltid_in_bounds_227629) {\n                            x_227627 = ((volatile __local\n                                         float *) re",
                   "d_arr_mem_227617)[sext_i32_i64(local_tid_227613)];\n                            if ((local_tid_227613 - squot32(local_tid_227613,\n                                                            32) * 32) == 0) {\n                                x_227626 = x_227627;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227633 = 1;\n                        while (slt32(skip_threads_227633, 32)) {\n                            bool thread_active_227634 =\n                                 sle32(skip_threads_227633, local_tid_227613 -\n                                       squot32(local_tid_227613, 32) * 32) &&\n                                 (squot32(local_tid_227613, 32) == 0 &&\n                                  ltid_in_bounds_227629);\n                            \n                            if (thread_active_227634) {\n                                // read operands\n                                {\n                                    x_227626 = ((volatile __local\n                                                 float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613) -\n                                                                              sext_i32_i64(skip_threads_227633)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227635 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227613 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227613 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227613 -\n                                                         skip_threads_227633) *\n          ",
                   "                                 32 + 32 - 1));\n                                \n                                if (thread_active_227634 && inactive_227635) {\n                                    x_227626 = x_227627;\n                                }\n                                if (thread_active_227634) {\n                                    if (!inactive_227635) {\n                                        float defunc_1_op_res_227628 =\n                                              x_227626 + x_227627;\n                                        \n                                        x_227626 = defunc_1_op_res_227628;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227615, skip_threads_227633)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227634) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                                        x_227626;\n                                    x_227627 = x_227626;\n                                }\n                            }\n                            if (sle32(wave_sizze_227615, skip_threads_227633)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227633 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227636 = squot32(local_tid_227613, 32) == 0 ||\n                     !ltid_in_bounds_227629;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {",
                   "\n                        if (!no_carry_in_227636) {\n                            x_212649 = x_212648;\n                            x_212648 = ((__local\n                                         float *) red_arr_mem_227617)[sext_i32_i64(squot32(local_tid_227613,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227637 =\n                             slt64(srem64(sext_i32_i64(local_tid_227613),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227613) -\n                                   sext_i32_i64(squot32(local_tid_227613, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227636) {\n                            if (inactive_227637) {\n                                x_212648 = x_212649;\n                            }\n                        }\n                        if (!no_carry_in_227636) {\n                            if (!inactive_227637) {\n                                float defunc_1_op_res_212650 = x_212648 +\n                                      x_212649;\n                                \n                                x_212648 = defunc_1_op_res_212650;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227636) {\n                            ((__local\n                              float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                                x_212648;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct value",
                   "s for first block\n                {\n                    if (squot32(local_tid_227613, 32) == 0 &&\n                        ltid_in_bounds_227629) {\n                        ((__local\n                          float *) red_arr_mem_227617)[sext_i32_i64(local_tid_227613)] =\n                            x_212649;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227621) *\n                      squot64(segred_group_sizze_212640,\n                              segment_sizze_nonzzero_227610) +\n                      sext_i32_i64(local_tid_227613), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227613),\n                                             squot64(segred_group_sizze_212640,\n                                                     segment_sizze_nonzzero_227610))) {\n                float tmp_227638;\n                \n                tmp_227638 = ((__local\n                               float *) red_arr_mem_227617)[(sext_i32_i64(local_tid_227613) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227610 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223663)[squot64(sext_i32_i64(virt_group_id_227621) *\n                                               squot64(segred_group_sizze_212640,\n                                                       segment_sizze_nonzzero_227610) +\n                                               sext_i32_i64(local_tid_227613),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227621) *\n                                        squot64(segred_group_si",
                   "zze_212640,\n                                                segment_sizze_nonzzero_227610) +\n                                        sext_i32_i64(local_tid_227613) -\n                                        squot64(sext_i32_i64(virt_group_id_227621) *\n                                                squot64(segred_group_sizze_212640,\n                                                        segment_sizze_nonzzero_227610) +\n                                                sext_i32_i64(local_tid_227613),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227638;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_212640\n}\n__kernel void mainzisegred_small_213427(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227747_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227745_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227743_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_213419,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t segment_sizze_nonzzero_227736,\n                                        __global un",
                   "signed char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223733,\n                                        __global unsigned char *mem_223737,\n                                        __global unsigned char *mem_223741)\n{\n    #define segred_group_sizze_213418 (mainzisegred_group_sizze_213095)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227747_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227747_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227745_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227745_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_227743_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227743_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227738;\n    int32_t local_tid_227739;\n    int64_t group_sizze_227742;\n    int32_t wave_sizze_227741;\n    int32_t group_tid_227740;\n    \n    global_tid_227738 = get_global_id(0);\n    local_tid_227739 = get_local_id(0);\n    group_sizze_227742 = get_local_size(0);\n    wave_sizze_227741 = LOCKSTEP_WIDTH;\n    group_tid_227740 = get_group_id(0);\n    \n    int32_t phys_tid_213427 = global_tid_227738;\n    __local unsigned char *red_arr_mem_227743;\n    \n    red_arr_mem_227743 = (__local unsigned char *) red_arr_mem_227743_backing_0;\n    \n    __local unsigned char *red_arr_mem_227745;\n    \n    red_arr_mem_227745 = (__local unsigned char",
                   " *) red_arr_mem_227745_backing_1;\n    \n    __local unsigned char *red_arr_mem_227747;\n    \n    red_arr_mem_227747 = (__local unsigned char *) red_arr_mem_227747_backing_2;\n    \n    int32_t phys_group_id_227749;\n    \n    phys_group_id_227749 = get_group_id(0);\n    for (int32_t i_227750 = 0; i_227750 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_213418,\n                                                  segment_sizze_nonzzero_227736))) -\n                   phys_group_id_227749, sext_i64_i32(num_groups_213419));\n         i_227750++) {\n        int32_t virt_group_id_227751 = phys_group_id_227749 + i_227750 *\n                sext_i64_i32(num_groups_213419);\n        int64_t slice_227752 = l_n_m_196752;\n        int64_t slice_227753 = m_196691 * slice_227752;\n        int64_t gtid_213424 = squot64(squot64(sext_i32_i64(local_tid_227739),\n                                              segment_sizze_nonzzero_227736) +\n                                      sext_i32_i64(virt_group_id_227751) *\n                                      squot64(segred_group_sizze_213418,\n                                              segment_sizze_nonzzero_227736),\n                                      slice_227752);\n        int64_t remnant_227754 = squot64(sext_i32_i64(local_tid_227739),\n                                         segment_sizze_nonzzero_227736) +\n                sext_i32_i64(virt_group_id_227751) *\n                squot64(segred_group_sizze_213418,\n                        segment_sizze_nonzzero_227736) - gtid_213424 *\n                slice_227752;\n        int64_t gtid_213425 = remnant_227754;\n        int64_t remnant_227755 = remnant_227754 - gtid_213425;\n        int64_t gtid_213426 = srem64(sext_i32_i64(local_tid_227739),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64(gtid_213424,",
                   "\n                                                          m_196691) &&\n                                                    slt64(gtid_213425,\n                                                          l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_227739),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_213418,\n                                                                 segment_sizze_nonzzero_227736)))) {\n                int64_t x_213441;\n                \n                x_213441 = ((__global int64_t *) ext_mem_222469)[gtid_213424 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_213425];\n                \n                float x_213442;\n                \n                x_213442 = ((__global float *) ext_mem_222468)[gtid_213424 *\n                                                               l_n_m_196752 +\n                                                               gtid_213425];\n                \n                int64_t binop_y_221792 = mul64(jump_t_196702, gtid_213425);\n                int64_t binop_y_221793 = smin64(i_196779, binop_y_221792);\n                int64_t index_primexp_221794 = add64((int64_t) 1,\n                                                     binop_y_221793);\n                bool cond_213445 = sle64(n_196692, gtid_213426);\n                int64_t defunc_0_f_res_213446;\n                \n                if (cond_213445) {\n                    defunc_0_f_res_213446 = (int64_t) 0;\n                } else {\n                    int64_t i_213447 = add64(gtid_213426, x_213441);\n                    int64_t defunc_1_add_res_213448 = add64((int64_t) 1,\n                                                            i_213447);\n                    \n                    defunc_0_f_res_213446 = defunc_1_add_r",
                   "es_213448;\n                }\n                \n                float defunc_0_f_res_213449;\n                \n                if (cond_213445) {\n                    defunc_0_f_res_213449 = 0.0F;\n                } else {\n                    int64_t i_213450 = add64(gtid_213426, x_213441);\n                    float defunc_0_add_arg_213451;\n                    \n                    defunc_0_add_arg_213451 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_213424 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_213450 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_213449 = defunc_0_add_arg_213451;\n                }\n                \n                int64_t binop_p_213452 = sub64(defunc_0_f_res_213446,\n                                               index_primexp_221794);\n                float defunc_0_f_res_213453 = sitofp_i64_f32(binop_p_213452);\n                float abs_res_213454 = (float) fabs(defunc_0_f_res_213453);\n                float tmp1_213455 = abs_res_213454 / x_213442;\n                float x_213456 = tmp1_213455 * tmp1_213455;\n                float y_213457 = tmp1_213455 * x_213456;\n                float tmp2_213458 = 1.0F - y_213457;\n                float x_213459 = tmp2_213458 * tmp2_213458;\n                float tmp3_213460 = tmp2_213458 * x_213459;\n                float w_j_213461 = defunc_0_f_res_213449 * tmp3_213460;\n                float xw_j_213462 = defunc_0_f_res_213453 * w_j_213461;\n                float x2w_j_213463 = defunc_0_f_res_213453 * xw_j_213462;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n",
                   "                    ((__local\n                      float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n                        w_j_213461;\n                    ((__local\n                      float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                        xw_j_213462;\n                    ((__local\n                      float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                        x2w_j_213463;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_213428;\n                float x_213429;\n                float x_213430;\n                float x_213431;\n                float x_213432;\n                float x_213433;\n                float x_227756;\n                float x_227757;\n                float x_227758;\n                float x_227759;\n                float x_227760;\n                float x_227761;\n                bool ltid_in_bounds_227765 =\n                     slt64(sext_i32_i64(local_tid_227739), q_l_196697 *\n                           squot64(segred_group_sizze_213418,\n                                   segment_sizze_nonzzero_227736));\n                int32_t skip_threads_227766;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227765) {\n                        x_213431 = ((volatile __local\n                                     float *) red_arr_mem_22774",
                   "3)[sext_i32_i64(local_tid_227739)];\n                        x_213432 = ((volatile __local\n                                     float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)];\n                        x_213433 = ((volatile __local\n                                     float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)];\n                        if ((local_tid_227739 - squot32(local_tid_227739, 32) *\n                             32) == 0) {\n                            x_213428 = x_213431;\n                            x_213429 = x_213432;\n                            x_213430 = x_213433;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227766 = 1;\n                    while (slt32(skip_threads_227766, 32)) {\n                        bool thread_active_227767 = sle32(skip_threads_227766,\n                                                          local_tid_227739 -\n                                                          squot32(local_tid_227739,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227765;\n                        \n                        if (thread_active_227767) {\n                            // read operands\n                            {\n                                x_213428 = ((volatile __local\n                                             float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739) -\n                                                                          sext_i32_i64(skip_threads_227766)];\n                                x_213429 = ((volatile __local\n                                             float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739) -\n                                                                          sext_i32_i64(skip_threads_227766)];\n                                x_213430 = ((volatile _",
                   "_local\n                                             float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739) -\n                                                                          sext_i32_i64(skip_threads_227766)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227768 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227739),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227739) -\n                                       sext_i32_i64(local_tid_227739 -\n                                       skip_threads_227766));\n                            \n                            if (thread_active_227767 && inactive_227768) {\n                                x_213428 = x_213431;\n                                x_213429 = x_213432;\n                                x_213430 = x_213433;\n                            }\n                            if (thread_active_227767) {\n                                if (!inactive_227768) {\n                                    float defunc_1_op_res_213434 = x_213428 +\n                                          x_213431;\n                                    float defunc_1_op_res_213435 = x_213429 +\n                                          x_213432;\n                                    float defunc_1_op_res_213436 = x_213430 +\n                                          x_213433;\n                                    \n                                    x_213428 = defunc_1_op_res_213434;\n                                    x_213429 = defunc_1_op_res_213435;\n                                    x_213430 = defunc_1_op_res_213436;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227741, skip_threads_227766)) {\n                            barrier(CLK_LOCA",
                   "L_MEM_FENCE);\n                        }\n                        if (thread_active_227767) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n                                    x_213428;\n                                x_213431 = x_213428;\n                                ((volatile __local\n                                  float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                                    x_213429;\n                                x_213432 = x_213429;\n                                ((volatile __local\n                                  float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                                    x_213430;\n                                x_213433 = x_213430;\n                            }\n                        }\n                        if (sle32(wave_sizze_227741, skip_threads_227766)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227766 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227739 - squot32(local_tid_227739, 32) *\n                         32) == 31 && ltid_in_bounds_227765) {\n                        ((volatile __local\n                          float *) red_arr_mem_227743)[sext_i32_i64(squot32(local_tid_227739,\n                                                                            32))] =\n                            x_213428;\n                        ((volatile __local\n                          float *) red_arr_mem_227745)[sext_i32_i64(squot32(local_tid_227739,\n                                                                            32))] =\n                           ",
                   " x_213429;\n                        ((volatile __local\n                          float *) red_arr_mem_227747)[sext_i32_i64(squot32(local_tid_227739,\n                                                                            32))] =\n                            x_213430;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227769;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227739, 32) == 0 &&\n                            ltid_in_bounds_227765) {\n                            x_227759 = ((volatile __local\n                                         float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)];\n                            x_227760 = ((volatile __local\n                                         float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)];\n                            x_227761 = ((volatile __local\n                                         float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)];\n                            if ((local_tid_227739 - squot32(local_tid_227739,\n                                                            32) * 32) == 0) {\n                                x_227756 = x_227759;\n                                x_227757 = x_227760;\n                                x_227758 = x_227761;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227769 = 1;\n                        while (slt32(skip_threads_227769, 32)) {\n                            bool thread_active_227770 =\n                                 sle32(skip_threads_227769, local_tid_227739 -\n                                       squot32(loc",
                   "al_tid_227739, 32) * 32) &&\n                                 (squot32(local_tid_227739, 32) == 0 &&\n                                  ltid_in_bounds_227765);\n                            \n                            if (thread_active_227770) {\n                                // read operands\n                                {\n                                    x_227756 = ((volatile __local\n                                                 float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739) -\n                                                                              sext_i32_i64(skip_threads_227769)];\n                                    x_227757 = ((volatile __local\n                                                 float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739) -\n                                                                              sext_i32_i64(skip_threads_227769)];\n                                    x_227758 = ((volatile __local\n                                                 float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739) -\n                                                                              sext_i32_i64(skip_threads_227769)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227771 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227739 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227739 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227739 -\n                                                         skip_threads_227769) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227770 && inac",
                   "tive_227771) {\n                                    x_227756 = x_227759;\n                                    x_227757 = x_227760;\n                                    x_227758 = x_227761;\n                                }\n                                if (thread_active_227770) {\n                                    if (!inactive_227771) {\n                                        float defunc_1_op_res_227762 =\n                                              x_227756 + x_227759;\n                                        float defunc_1_op_res_227763 =\n                                              x_227757 + x_227760;\n                                        float defunc_1_op_res_227764 =\n                                              x_227758 + x_227761;\n                                        \n                                        x_227756 = defunc_1_op_res_227762;\n                                        x_227757 = defunc_1_op_res_227763;\n                                        x_227758 = defunc_1_op_res_227764;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227741, skip_threads_227769)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227770) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n                                        x_227756;\n                                    x_227759 = x_227756;\n                                    ((volatile __local\n                                      float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                                        x_227757;\n                                    x_227760 = x_227757;\n                                    ((vol",
                   "atile __local\n                                      float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                                        x_227758;\n                                    x_227761 = x_227758;\n                                }\n                            }\n                            if (sle32(wave_sizze_227741, skip_threads_227769)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227769 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_227772 = squot32(local_tid_227739, 32) == 0 ||\n                     !ltid_in_bounds_227765;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227772) {\n                            x_213431 = x_213428;\n                            x_213432 = x_213429;\n                            x_213433 = x_213430;\n                            x_213428 = ((__local\n                                         float *) red_arr_mem_227743)[sext_i32_i64(squot32(local_tid_227739,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213429 = ((__local\n                                         float *) red_arr_mem_227745)[sext_i32_i64(squot32(local_tid_227739,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213430 = ((__local\n                                         float *) red_arr_mem_227747)[sext_i32_i64(squot32(local_tid_227739,\n                                          ",
                   "                                                 32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227773 =\n                             slt64(srem64(sext_i32_i64(local_tid_227739),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227739) -\n                                   sext_i32_i64(squot32(local_tid_227739, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227772) {\n                            if (inactive_227773) {\n                                x_213428 = x_213431;\n                                x_213429 = x_213432;\n                                x_213430 = x_213433;\n                            }\n                        }\n                        if (!no_carry_in_227772) {\n                            if (!inactive_227773) {\n                                float defunc_1_op_res_213434 = x_213428 +\n                                      x_213431;\n                                float defunc_1_op_res_213435 = x_213429 +\n                                      x_213432;\n                                float defunc_1_op_res_213436 = x_213430 +\n                                      x_213433;\n                                \n                                x_213428 = defunc_1_op_res_213434;\n                                x_213429 = defunc_1_op_res_213435;\n                                x_213430 = defunc_1_op_res_213436;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227772) {\n                            ((__local\n                              float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n           ",
                   "                     x_213428;\n                            ((__local\n                              float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                                x_213429;\n                            ((__local\n                              float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                                x_213430;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227739, 32) == 0 &&\n                        ltid_in_bounds_227765) {\n                        ((__local\n                          float *) red_arr_mem_227743)[sext_i32_i64(local_tid_227739)] =\n                            x_213431;\n                        ((__local\n                          float *) red_arr_mem_227745)[sext_i32_i64(local_tid_227739)] =\n                            x_213432;\n                        ((__local\n                          float *) red_arr_mem_227747)[sext_i32_i64(local_tid_227739)] =\n                            x_213433;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227751) *\n                      squot64(segred_group_sizze_213418,\n                              segment_sizze_nonzzero_227736) +\n                      sext_i32_i64(local_tid_227739), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227739),\n                                             squot64(segred_group_sizze_213418,\n                                                     segment_sizze_nonzzero_227736))) {\n                float tmp_227774;\n                \n                tmp_227774 = ((__local\n                               float *) red_arr_mem_227743)[(se",
                   "xt_i32_i64(local_tid_227739) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227736 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223733)[squot64(sext_i32_i64(virt_group_id_227751) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227736) +\n                                               sext_i32_i64(local_tid_227739),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227751) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227736) +\n                                        sext_i32_i64(local_tid_227739) -\n                                        squot64(sext_i32_i64(virt_group_id_227751) *\n                                                squot64(segred_group_sizze_213418,\n                                                        segment_sizze_nonzzero_227736) +\n                                                sext_i32_i64(local_tid_227739),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227774;\n                \n                float tmp_227775;\n                \n                tmp_227775 = ((__local\n                               float *) red_arr_mem_227745)[(sext_i32_i64(local_tid_227739) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227736 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223737)[squot64(sext_i32_i64(vir",
                   "t_group_id_227751) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227736) +\n                                               sext_i32_i64(local_tid_227739),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227751) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227736) +\n                                        sext_i32_i64(local_tid_227739) -\n                                        squot64(sext_i32_i64(virt_group_id_227751) *\n                                                squot64(segred_group_sizze_213418,\n                                                        segment_sizze_nonzzero_227736) +\n                                                sext_i32_i64(local_tid_227739),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227775;\n                \n                float tmp_227776;\n                \n                tmp_227776 = ((__local\n                               float *) red_arr_mem_227747)[(sext_i32_i64(local_tid_227739) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227736 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223741)[squot64(sext_i32_i64(virt_group_id_227751) *\n                                               squot64(segred_group_sizze_213418,\n                                                       segment_sizze_nonzzero_227736) +\n                                               sext_i32_i64(local_tid_227739),\n                                               l_n_m_196752) * l_n_m_196752 +\n               ",
                   "                        (sext_i32_i64(virt_group_id_227751) *\n                                        squot64(segred_group_sizze_213418,\n                                                segment_sizze_nonzzero_227736) +\n                                        sext_i32_i64(local_tid_227739) -\n                                        squot64(sext_i32_i64(virt_group_id_227751) *\n                                                squot64(segred_group_sizze_213418,\n                                                        segment_sizze_nonzzero_227736) +\n                                                sext_i32_i64(local_tid_227739),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227776;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_213418\n}\n__kernel void mainzisegred_small_213496(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227855_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227853_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_213489,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t segment_sizze_nonzzero_227846,\n                                        __global unsigned char *ext_me",
                   "m_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223746,\n                                        __global unsigned char *mem_223750,\n                                        __global unsigned char *mem_223754,\n                                        __global unsigned char *mem_223759,\n                                        __global unsigned char *mem_223763)\n{\n    #define segred_group_sizze_213488 (mainzisegred_group_sizze_213001)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_227855_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227855_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_227853_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227853_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227848;\n    int32_t local_tid_227849;\n    int64_t group_sizze_227852;\n    int32_t wave_sizze_227851;\n    int32_t group_tid_227850;\n    \n    global_tid_227848 = get_global_id(0);\n    local_tid_227849 = get_local_id(0);\n    group_sizze_227852 = get_local_size(0);\n    wave_sizze_227851 = LOCKSTEP_WIDTH;\n    group_tid_227850 = get_group_id(0);\n    \n    int32_t phys_tid_213496 = global_tid_227848;\n    __local unsigned char *red_arr_mem_227853;\n    \n    red_arr_mem_227853 = (__local unsigned char *) red_arr_mem_227853_backing_0;\n    \n    __local unsigned char *red_arr_mem_227855;\n    \n    red_arr_mem_227855 = (__local unsigned char *) red_arr",
                   "_mem_227855_backing_1;\n    \n    int32_t phys_group_id_227857;\n    \n    phys_group_id_227857 = get_group_id(0);\n    for (int32_t i_227858 = 0; i_227858 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_213488,\n                                                  segment_sizze_nonzzero_227846))) -\n                   phys_group_id_227857, sext_i64_i32(num_groups_213489));\n         i_227858++) {\n        int32_t virt_group_id_227859 = phys_group_id_227857 + i_227858 *\n                sext_i64_i32(num_groups_213489);\n        int64_t slice_227860 = l_n_m_196752;\n        int64_t slice_227861 = m_196691 * slice_227860;\n        int64_t gtid_213493 = squot64(squot64(sext_i32_i64(local_tid_227849),\n                                              segment_sizze_nonzzero_227846) +\n                                      sext_i32_i64(virt_group_id_227859) *\n                                      squot64(segred_group_sizze_213488,\n                                              segment_sizze_nonzzero_227846),\n                                      slice_227860);\n        int64_t remnant_227862 = squot64(sext_i32_i64(local_tid_227849),\n                                         segment_sizze_nonzzero_227846) +\n                sext_i32_i64(virt_group_id_227859) *\n                squot64(segred_group_sizze_213488,\n                        segment_sizze_nonzzero_227846) - gtid_213493 *\n                slice_227860;\n        int64_t gtid_213494 = remnant_227862;\n        int64_t remnant_227863 = remnant_227862 - gtid_213494;\n        int64_t gtid_213495 = srem64(sext_i32_i64(local_tid_227849),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64(gtid_213493,\n                                                          m_196691) &&\n                                                    slt64(gtid_213494,\n      ",
                   "                                                    l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_227849),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_213488,\n                                                                 segment_sizze_nonzzero_227846)))) {\n                int64_t x_213511;\n                \n                x_213511 = ((__global int64_t *) ext_mem_222469)[gtid_213493 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_213494];\n                \n                float x_213512;\n                \n                x_213512 = ((__global float *) ext_mem_222468)[gtid_213493 *\n                                                               l_n_m_196752 +\n                                                               gtid_213494];\n                \n                int64_t binop_y_221787 = mul64(jump_t_196702, gtid_213494);\n                int64_t binop_y_221788 = smin64(i_196779, binop_y_221787);\n                int64_t index_primexp_221789 = add64((int64_t) 1,\n                                                     binop_y_221788);\n                float a11_213514;\n                \n                a11_213514 = ((__global float *) mem_223746)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                float b11_213515;\n                \n                b11_213515 = ((__global float *) mem_223750)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                float c11_213516;\n                \n                c11_213516 = ((__global float *)",
                   " mem_223754)[gtid_213493 *\n                                                             l_n_m_196752 +\n                                                             gtid_213494];\n                \n                bool cond_213518 = sle64(n_196692, gtid_213495);\n                int64_t defunc_0_f_res_213519;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213519 = (int64_t) 0;\n                } else {\n                    int64_t i_213520 = add64(gtid_213495, x_213511);\n                    int64_t defunc_1_add_res_213521 = add64((int64_t) 1,\n                                                            i_213520);\n                    \n                    defunc_0_f_res_213519 = defunc_1_add_res_213521;\n                }\n                \n                float defunc_0_f_res_213522;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213522 = 0.0F;\n                } else {\n                    int64_t i_213523 = add64(gtid_213495, x_213511);\n                    float defunc_0_add_arg_213524;\n                    \n                    defunc_0_add_arg_213524 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_213493 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_213523 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_213522 = defunc_0_add_arg_213524;\n                }\n                \n                int64_t binop_p_213525 = sub64(defunc_0_f_res_213519,\n                                               index_primexp_221789);\n                float defunc_0_f_res_213526 = sitofp_i64_f32(binop_p_213525);\n                float abs_res_213527 = (float) fabs(def",
                   "unc_0_f_res_213526);\n                float tmp1_213528 = abs_res_213527 / x_213512;\n                float x_213529 = tmp1_213528 * tmp1_213528;\n                float y_213530 = tmp1_213528 * x_213529;\n                float tmp2_213531 = 1.0F - y_213530;\n                float x_213532 = tmp2_213531 * tmp2_213531;\n                float tmp3_213533 = tmp2_213531 * x_213532;\n                float tmp4_213534 = defunc_0_f_res_213522 * tmp3_213533;\n                float defunc_1_f_res_213535 = defunc_0_f_res_213526 *\n                      tmp4_213534;\n                float defunc_0_f_res_213536;\n                \n                if (cond_213518) {\n                    defunc_0_f_res_213536 = 0.0F;\n                } else {\n                    int64_t i_213537 = add64(gtid_213495, x_213511);\n                    float defunc_0_add_arg_213538;\n                    \n                    defunc_0_add_arg_213538 = ((__global\n                                                float *) mem_223608)[gtid_213493 *\n                                                                     n_196692 +\n                                                                     i_213537];\n                    defunc_0_f_res_213536 = defunc_0_add_arg_213538;\n                }\n                \n                float x_213539 = a11_213514 * tmp4_213534;\n                float y_213540 = b11_213515 * defunc_1_f_res_213535;\n                float x_213541 = x_213539 + y_213540;\n                float defunc_9_fit_fun_res_213542 = defunc_0_f_res_213536 *\n                      x_213541;\n                float x_213543 = b11_213515 * tmp4_213534;\n                float y_213544 = c11_213516 * defunc_1_f_res_213535;\n                float x_213545 = x_213543 + y_213544;\n                float defunc_9_slope_fun_res_213546 = defunc_0_f_res_213536 *\n                      x_213545;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n        ",
                   "            ((__local\n                      float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                        defunc_9_fit_fun_res_213542;\n                    ((__local\n                      float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                        defunc_9_slope_fun_res_213546;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_213497;\n                float x_213498;\n                float x_213499;\n                float x_213500;\n                float x_227864;\n                float x_227865;\n                float x_227866;\n                float x_227867;\n                bool ltid_in_bounds_227870 =\n                     slt64(sext_i32_i64(local_tid_227849), q_l_196697 *\n                           squot64(segred_group_sizze_213488,\n                                   segment_sizze_nonzzero_227846));\n                int32_t skip_threads_227871;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_227870) {\n                        x_213499 = ((volatile __local\n                                     float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)];\n                        x_213500 = ((volatile __local\n                                     float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)];\n                        if ((local_tid_227849 - squot32(local_tid_227849, 32) *\n                             32) == 0) {\n                            x_213497 = x_213499;\n                            ",
                   "x_213498 = x_213500;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_227871 = 1;\n                    while (slt32(skip_threads_227871, 32)) {\n                        bool thread_active_227872 = sle32(skip_threads_227871,\n                                                          local_tid_227849 -\n                                                          squot32(local_tid_227849,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_227870;\n                        \n                        if (thread_active_227872) {\n                            // read operands\n                            {\n                                x_213497 = ((volatile __local\n                                             float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849) -\n                                                                          sext_i32_i64(skip_threads_227871)];\n                                x_213498 = ((volatile __local\n                                             float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849) -\n                                                                          sext_i32_i64(skip_threads_227871)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_227873 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227849),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227849) -\n                                       sext_i32_i64(local_tid_227849 -\n                                       skip_threads_227871));\n                            \n                            if (thread_active_227872 && inactive_227873) {\n                    ",
                   "            x_213497 = x_213499;\n                                x_213498 = x_213500;\n                            }\n                            if (thread_active_227872) {\n                                if (!inactive_227873) {\n                                    float defunc_1_op_res_213501 = x_213497 +\n                                          x_213499;\n                                    float defunc_1_op_res_213502 = x_213498 +\n                                          x_213500;\n                                    \n                                    x_213497 = defunc_1_op_res_213501;\n                                    x_213498 = defunc_1_op_res_213502;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227851, skip_threads_227871)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_227872) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                                    x_213497;\n                                x_213499 = x_213497;\n                                ((volatile __local\n                                  float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                                    x_213498;\n                                x_213500 = x_213498;\n                            }\n                        }\n                        if (sle32(wave_sizze_227851, skip_threads_227871)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_227871 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n               ",
                   "     if ((local_tid_227849 - squot32(local_tid_227849, 32) *\n                         32) == 31 && ltid_in_bounds_227870) {\n                        ((volatile __local\n                          float *) red_arr_mem_227853)[sext_i32_i64(squot32(local_tid_227849,\n                                                                            32))] =\n                            x_213497;\n                        ((volatile __local\n                          float *) red_arr_mem_227855)[sext_i32_i64(squot32(local_tid_227849,\n                                                                            32))] =\n                            x_213498;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_227874;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227849, 32) == 0 &&\n                            ltid_in_bounds_227870) {\n                            x_227866 = ((volatile __local\n                                         float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)];\n                            x_227867 = ((volatile __local\n                                         float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)];\n                            if ((local_tid_227849 - squot32(local_tid_227849,\n                                                            32) * 32) == 0) {\n                                x_227864 = x_227866;\n                                x_227865 = x_227867;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_227874 = 1;\n                        while (slt32(skip_threads_227874, 32)) {\n                           ",
                   " bool thread_active_227875 =\n                                 sle32(skip_threads_227874, local_tid_227849 -\n                                       squot32(local_tid_227849, 32) * 32) &&\n                                 (squot32(local_tid_227849, 32) == 0 &&\n                                  ltid_in_bounds_227870);\n                            \n                            if (thread_active_227875) {\n                                // read operands\n                                {\n                                    x_227864 = ((volatile __local\n                                                 float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849) -\n                                                                              sext_i32_i64(skip_threads_227874)];\n                                    x_227865 = ((volatile __local\n                                                 float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849) -\n                                                                              sext_i32_i64(skip_threads_227874)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_227876 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227849 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227849 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227849 -\n                                                         skip_threads_227874) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_227875 && inactive_227876) {\n                                    x_227864 = x_227866;\n                                    x_227865 = x_227867;\n    ",
                   "                            }\n                                if (thread_active_227875) {\n                                    if (!inactive_227876) {\n                                        float defunc_1_op_res_227868 =\n                                              x_227864 + x_227866;\n                                        float defunc_1_op_res_227869 =\n                                              x_227865 + x_227867;\n                                        \n                                        x_227864 = defunc_1_op_res_227868;\n                                        x_227865 = defunc_1_op_res_227869;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227851, skip_threads_227874)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_227875) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                                        x_227864;\n                                    x_227866 = x_227864;\n                                    ((volatile __local\n                                      float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                                        x_227865;\n                                    x_227867 = x_227865;\n                                }\n                            }\n                            if (sle32(wave_sizze_227851, skip_threads_227874)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_227874 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_",
                   "carry_in_227877 = squot32(local_tid_227849, 32) == 0 ||\n                     !ltid_in_bounds_227870;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_227877) {\n                            x_213499 = x_213497;\n                            x_213500 = x_213498;\n                            x_213497 = ((__local\n                                         float *) red_arr_mem_227853)[sext_i32_i64(squot32(local_tid_227849,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_213498 = ((__local\n                                         float *) red_arr_mem_227855)[sext_i32_i64(squot32(local_tid_227849,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_227878 =\n                             slt64(srem64(sext_i32_i64(local_tid_227849),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227849) -\n                                   sext_i32_i64(squot32(local_tid_227849, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_227877) {\n                            if (inactive_227878) {\n                                x_213497 = x_213499;\n                                x_213498 = x_213500;\n                            }\n                        }\n                        if (!no_carry_in_227877) {\n                            if (!inactive_227878) {\n                                float defun",
                   "c_1_op_res_213501 = x_213497 +\n                                      x_213499;\n                                float defunc_1_op_res_213502 = x_213498 +\n                                      x_213500;\n                                \n                                x_213497 = defunc_1_op_res_213501;\n                                x_213498 = defunc_1_op_res_213502;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_227877) {\n                            ((__local\n                              float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                                x_213497;\n                            ((__local\n                              float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                                x_213498;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227849, 32) == 0 &&\n                        ltid_in_bounds_227870) {\n                        ((__local\n                          float *) red_arr_mem_227853)[sext_i32_i64(local_tid_227849)] =\n                            x_213499;\n                        ((__local\n                          float *) red_arr_mem_227855)[sext_i32_i64(local_tid_227849)] =\n                            x_213500;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_227859) *\n                      squot64(segred_group_sizze_213488,\n                              segment_sizze_nonzzero_227846) +\n                      sext_i32_i64(local_tid_227849), m_196691 *\n                      l_n_m_1",
                   "96752) && slt64(sext_i32_i64(local_tid_227849),\n                                             squot64(segred_group_sizze_213488,\n                                                     segment_sizze_nonzzero_227846))) {\n                float tmp_227879;\n                \n                tmp_227879 = ((__local\n                               float *) red_arr_mem_227853)[(sext_i32_i64(local_tid_227849) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227846 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223759)[squot64(sext_i32_i64(virt_group_id_227859) *\n                                               squot64(segred_group_sizze_213488,\n                                                       segment_sizze_nonzzero_227846) +\n                                               sext_i32_i64(local_tid_227849),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227859) *\n                                        squot64(segred_group_sizze_213488,\n                                                segment_sizze_nonzzero_227846) +\n                                        sext_i32_i64(local_tid_227849) -\n                                        squot64(sext_i32_i64(virt_group_id_227859) *\n                                                squot64(segred_group_sizze_213488,\n                                                        segment_sizze_nonzzero_227846) +\n                                                sext_i32_i64(local_tid_227849),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227879;\n                \n                float tmp_227880;\n                \n                tmp_227880 = ((__local\n                               float *) red_arr_mem_22785",
                   "5)[(sext_i32_i64(local_tid_227849) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227846 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223763)[squot64(sext_i32_i64(virt_group_id_227859) *\n                                               squot64(segred_group_sizze_213488,\n                                                       segment_sizze_nonzzero_227846) +\n                                               sext_i32_i64(local_tid_227849),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_227859) *\n                                        squot64(segred_group_sizze_213488,\n                                                segment_sizze_nonzzero_227846) +\n                                        sext_i32_i64(local_tid_227849) -\n                                        squot64(sext_i32_i64(virt_group_id_227859) *\n                                                squot64(segred_group_sizze_213488,\n                                                        segment_sizze_nonzzero_227846) +\n                                                sext_i32_i64(local_tid_227849),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_227880;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_213488\n}\n__kernel void mainzisegred_small_214506(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228005_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem",
                   "_228003_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228001_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227999_backing_aligned_3,\n                                        __local volatile\n                                        int64_t *red_arr_mem_227997_backing_aligned_4,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_214496,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t segment_sizze_nonzzero_227990,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223840,\n                                        __global unsigned char *mem_223844,\n                                        __global unsigned char *mem_223848,\n                                        __global unsigned char *mem_223852,\n                                        __global unsigned char *mem_223856)\n{\n    #define segred_group_sizze_214495 (mainzisegred_group_sizze_214092)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228005_backing_4 =",
                   "\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228005_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228003_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228003_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228001_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228001_backing_aligned_2;\n    __local volatile unsigned char *restrict red_arr_mem_227999_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227999_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_227997_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_227997_backing_aligned_4;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_227992;\n    int32_t local_tid_227993;\n    int64_t group_sizze_227996;\n    int32_t wave_sizze_227995;\n    int32_t group_tid_227994;\n    \n    global_tid_227992 = get_global_id(0);\n    local_tid_227993 = get_local_id(0);\n    group_sizze_227996 = get_local_size(0);\n    wave_sizze_227995 = LOCKSTEP_WIDTH;\n    group_tid_227994 = get_group_id(0);\n    \n    int32_t phys_tid_214506 = global_tid_227992;\n    __local unsigned char *red_arr_mem_227997;\n    \n    red_arr_mem_227997 = (__local unsigned char *) red_arr_mem_227997_backing_0;\n    \n    __local unsigned char *red_arr_mem_227999;\n    \n    red_arr_mem_227999 = (__local unsigned char *) red_arr_mem_227999_backing_1;\n    \n    __local unsigned char *red_arr_mem_228001;\n    \n    red_arr_mem_228001 = (__local unsigned char *) red_arr_mem_228001_backing_2;\n    \n    __local unsigned char *red_arr_mem_228003;\n    \n    red_arr_mem_228003 = (__local ",
                   "unsigned char *) red_arr_mem_228003_backing_3;\n    \n    __local unsigned char *red_arr_mem_228005;\n    \n    red_arr_mem_228005 = (__local unsigned char *) red_arr_mem_228005_backing_4;\n    \n    int32_t phys_group_id_228007;\n    \n    phys_group_id_228007 = get_group_id(0);\n    for (int32_t i_228008 = 0; i_228008 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_214495,\n                                                  segment_sizze_nonzzero_227990))) -\n                   phys_group_id_228007, sext_i64_i32(num_groups_214496));\n         i_228008++) {\n        int32_t virt_group_id_228009 = phys_group_id_228007 + i_228008 *\n                sext_i64_i32(num_groups_214496);\n        int64_t slice_228010 = l_n_m_196752;\n        int64_t slice_228011 = m_196691 * slice_228010;\n        int64_t gtid_214503 = squot64(squot64(sext_i32_i64(local_tid_227993),\n                                              segment_sizze_nonzzero_227990) +\n                                      sext_i32_i64(virt_group_id_228009) *\n                                      squot64(segred_group_sizze_214495,\n                                              segment_sizze_nonzzero_227990),\n                                      slice_228010);\n        int64_t remnant_228012 = squot64(sext_i32_i64(local_tid_227993),\n                                         segment_sizze_nonzzero_227990) +\n                sext_i32_i64(virt_group_id_228009) *\n                squot64(segred_group_sizze_214495,\n                        segment_sizze_nonzzero_227990) - gtid_214503 *\n                slice_228010;\n        int64_t gtid_214504 = remnant_228012;\n        int64_t remnant_228013 = remnant_228012 - gtid_214504;\n        int64_t gtid_214505 = srem64(sext_i32_i64(local_tid_227993),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64",
                   "(gtid_214503,\n                                                          m_196691) &&\n                                                    slt64(gtid_214504,\n                                                          l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_227993),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_214495,\n                                                                 segment_sizze_nonzzero_227990)))) {\n                int64_t x_214526;\n                \n                x_214526 = ((__global int64_t *) ext_mem_222469)[gtid_214503 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_214504];\n                \n                float x_214527;\n                \n                x_214527 = ((__global float *) ext_mem_222468)[gtid_214503 *\n                                                               l_n_m_196752 +\n                                                               gtid_214504];\n                \n                int64_t binop_y_221802 = mul64(jump_t_196702, gtid_214504);\n                int64_t binop_y_221803 = smin64(i_196779, binop_y_221802);\n                int64_t index_primexp_221804 = add64((int64_t) 1,\n                                                     binop_y_221803);\n                bool cond_214530 = sle64(n_196692, gtid_214505);\n                int64_t defunc_0_f_res_214531;\n                \n                if (cond_214530) {\n                    defunc_0_f_res_214531 = (int64_t) 0;\n                } else {\n                    int64_t i_214532 = add64(gtid_214505, x_214526);\n                    int64_t defunc_1_add_res_214533 = add64((int64_t) 1,\n                                                            i_214532);\n                    \n                    defunc_0_f_res_214531 = d",
                   "efunc_1_add_res_214533;\n                }\n                \n                float defunc_0_f_res_214534;\n                \n                if (cond_214530) {\n                    defunc_0_f_res_214534 = 0.0F;\n                } else {\n                    int64_t i_214535 = add64(gtid_214505, x_214526);\n                    float defunc_0_add_arg_214536;\n                    \n                    defunc_0_add_arg_214536 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_214503 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_214535 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_214534 = defunc_0_add_arg_214536;\n                }\n                \n                int64_t binop_p_214537 = sub64(defunc_0_f_res_214531,\n                                               index_primexp_221804);\n                float defunc_0_f_res_214538 = sitofp_i64_f32(binop_p_214537);\n                float abs_res_214539 = (float) fabs(defunc_0_f_res_214538);\n                float tmp1_214540 = abs_res_214539 / x_214527;\n                float x_214541 = tmp1_214540 * tmp1_214540;\n                float y_214542 = tmp1_214540 * x_214541;\n                float tmp2_214543 = 1.0F - y_214542;\n                float x_214544 = tmp2_214543 * tmp2_214543;\n                float tmp3_214545 = tmp2_214543 * x_214544;\n                float w_j_214546 = defunc_0_f_res_214534 * tmp3_214545;\n                float xw_j_214547 = defunc_0_f_res_214538 * w_j_214546;\n                float x2w_j_214548 = defunc_0_f_res_214538 * xw_j_214547;\n                float x3w_j_214549 = defunc_0_f_res_214538 * x2w_j_214548;\n                float x4w_j_214550 = defunc_0_f_res_2",
                   "14538 * x3w_j_214549;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                        w_j_214546;\n                    ((__local\n                      float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                        xw_j_214547;\n                    ((__local\n                      float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                        x2w_j_214548;\n                    ((__local\n                      float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                        x3w_j_214549;\n                    ((__local\n                      float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                        x4w_j_214550;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_214507;\n                float x_214508;\n                float x_214509;\n                float x_214510;\n                float x_214511;\n                float x_214512",
                   ";\n                float x_214513;\n                float x_214514;\n                float x_214515;\n                float x_214516;\n                float x_228014;\n                float x_228015;\n                float x_228016;\n                float x_228017;\n                float x_228018;\n                float x_228019;\n                float x_228020;\n                float x_228021;\n                float x_228022;\n                float x_228023;\n                bool ltid_in_bounds_228029 =\n                     slt64(sext_i32_i64(local_tid_227993), q_l_196697 *\n                           squot64(segred_group_sizze_214495,\n                                   segment_sizze_nonzzero_227990));\n                int32_t skip_threads_228030;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228029) {\n                        x_214512 = ((volatile __local\n                                     float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)];\n                        x_214513 = ((volatile __local\n                                     float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)];\n                        x_214514 = ((volatile __local\n                                     float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)];\n                        x_214515 = ((volatile __local\n                                     float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)];\n                        x_214516 = ((volatile __local\n                                     float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)];\n                        if ((local_tid_227993 - squot32(local_tid_227993, 32) *\n                             32) == 0) {\n                            x_214507 = x_214512;\n                            x_214508 = x_214513;\n                            x_214509 = x_214514;\n                            x_214510 = x_214515;\n                            x_214511 = x_214",
                   "516;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228030 = 1;\n                    while (slt32(skip_threads_228030, 32)) {\n                        bool thread_active_228031 = sle32(skip_threads_228030,\n                                                          local_tid_227993 -\n                                                          squot32(local_tid_227993,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228029;\n                        \n                        if (thread_active_228031) {\n                            // read operands\n                            {\n                                x_214507 = ((volatile __local\n                                             float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993) -\n                                                                          sext_i32_i64(skip_threads_228030)];\n                                x_214508 = ((volatile __local\n                                             float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993) -\n                                                                          sext_i32_i64(skip_threads_228030)];\n                                x_214509 = ((volatile __local\n                                             float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993) -\n                                                                          sext_i32_i64(skip_threads_228030)];\n                                x_214510 = ((volatile __local\n                                             float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993) -\n                                                                          sext_i32_i64(skip_threads_228030)];\n                                x_214511 = ((volatile __local\n                                        ",
                   "     float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993) -\n                                                                          sext_i32_i64(skip_threads_228030)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228032 =\n                                 slt64(srem64(sext_i32_i64(local_tid_227993),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_227993) -\n                                       sext_i32_i64(local_tid_227993 -\n                                       skip_threads_228030));\n                            \n                            if (thread_active_228031 && inactive_228032) {\n                                x_214507 = x_214512;\n                                x_214508 = x_214513;\n                                x_214509 = x_214514;\n                                x_214510 = x_214515;\n                                x_214511 = x_214516;\n                            }\n                            if (thread_active_228031) {\n                                if (!inactive_228032) {\n                                    float defunc_1_op_res_214517 = x_214507 +\n                                          x_214512;\n                                    float defunc_1_op_res_214518 = x_214508 +\n                                          x_214513;\n                                    float defunc_1_op_res_214519 = x_214509 +\n                                          x_214514;\n                                    float defunc_1_op_res_214520 = x_214510 +\n                                          x_214515;\n                                    float defunc_1_op_res_214521 = x_214511 +\n                                          x_214516;\n                                    \n                                    x_214507 = defunc_1_op_res_214517;\n                                  ",
                   "  x_214508 = defunc_1_op_res_214518;\n                                    x_214509 = defunc_1_op_res_214519;\n                                    x_214510 = defunc_1_op_res_214520;\n                                    x_214511 = defunc_1_op_res_214521;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_227995, skip_threads_228030)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228031) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                                    x_214507;\n                                x_214512 = x_214507;\n                                ((volatile __local\n                                  float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                                    x_214508;\n                                x_214513 = x_214508;\n                                ((volatile __local\n                                  float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                                    x_214509;\n                                x_214514 = x_214509;\n                                ((volatile __local\n                                  float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                                    x_214510;\n                                x_214515 = x_214510;\n                                ((volatile __local\n                                  float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                                    x_214511;\n                                x_214516 = x_214511;\n                            }\n                        }\n                        if (sle32(wave_sizze_227995, skip_threads_228030)) {\n     ",
                   "                       barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228030 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_227993 - squot32(local_tid_227993, 32) *\n                         32) == 31 && ltid_in_bounds_228029) {\n                        ((volatile __local\n                          float *) red_arr_mem_227997)[sext_i32_i64(squot32(local_tid_227993,\n                                                                            32))] =\n                            x_214507;\n                        ((volatile __local\n                          float *) red_arr_mem_227999)[sext_i32_i64(squot32(local_tid_227993,\n                                                                            32))] =\n                            x_214508;\n                        ((volatile __local\n                          float *) red_arr_mem_228001)[sext_i32_i64(squot32(local_tid_227993,\n                                                                            32))] =\n                            x_214509;\n                        ((volatile __local\n                          float *) red_arr_mem_228003)[sext_i32_i64(squot32(local_tid_227993,\n                                                                            32))] =\n                            x_214510;\n                        ((volatile __local\n                          float *) red_arr_mem_228005)[sext_i32_i64(squot32(local_tid_227993,\n                                                                            32))] =\n                            x_214511;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228033;\n      ",
                   "              \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_227993, 32) == 0 &&\n                            ltid_in_bounds_228029) {\n                            x_228019 = ((volatile __local\n                                         float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)];\n                            x_228020 = ((volatile __local\n                                         float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)];\n                            x_228021 = ((volatile __local\n                                         float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)];\n                            x_228022 = ((volatile __local\n                                         float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)];\n                            x_228023 = ((volatile __local\n                                         float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)];\n                            if ((local_tid_227993 - squot32(local_tid_227993,\n                                                            32) * 32) == 0) {\n                                x_228014 = x_228019;\n                                x_228015 = x_228020;\n                                x_228016 = x_228021;\n                                x_228017 = x_228022;\n                                x_228018 = x_228023;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228033 = 1;\n                        while (slt32(skip_threads_228033, 32)) {\n                            bool thread_active_228034 =\n                                 sle32(skip_threads_228033, local_tid_227993 -\n                                       squot32(local_tid_227993, 32) * 32) &&\n                                 (squot32(local_tid_227993, 32) == 0 &&",
                   "\n                                  ltid_in_bounds_228029);\n                            \n                            if (thread_active_228034) {\n                                // read operands\n                                {\n                                    x_228014 = ((volatile __local\n                                                 float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993) -\n                                                                              sext_i32_i64(skip_threads_228033)];\n                                    x_228015 = ((volatile __local\n                                                 float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993) -\n                                                                              sext_i32_i64(skip_threads_228033)];\n                                    x_228016 = ((volatile __local\n                                                 float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993) -\n                                                                              sext_i32_i64(skip_threads_228033)];\n                                    x_228017 = ((volatile __local\n                                                 float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993) -\n                                                                              sext_i32_i64(skip_threads_228033)];\n                                    x_228018 = ((volatile __local\n                                                 float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993) -\n                                                                              sext_i32_i64(skip_threads_228033)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228035 =\n                                     slt64(srem64(sext_i32_i64(local_tid_227993 *\n                                      ",
                   "            32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_227993 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_227993 -\n                                                         skip_threads_228033) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228034 && inactive_228035) {\n                                    x_228014 = x_228019;\n                                    x_228015 = x_228020;\n                                    x_228016 = x_228021;\n                                    x_228017 = x_228022;\n                                    x_228018 = x_228023;\n                                }\n                                if (thread_active_228034) {\n                                    if (!inactive_228035) {\n                                        float defunc_1_op_res_228024 =\n                                              x_228014 + x_228019;\n                                        float defunc_1_op_res_228025 =\n                                              x_228015 + x_228020;\n                                        float defunc_1_op_res_228026 =\n                                              x_228016 + x_228021;\n                                        float defunc_1_op_res_228027 =\n                                              x_228017 + x_228022;\n                                        float defunc_1_op_res_228028 =\n                                              x_228018 + x_228023;\n                                        \n                                        x_228014 = defunc_1_op_res_228024;\n                                        x_228015 = defunc_1_op_res_228025;\n                                        x_228016 = defunc_1_op_res_228026;\n                                        x_228017 = defunc_1_op_res_228027;\n                                ",
                   "        x_228018 = defunc_1_op_res_228028;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_227995, skip_threads_228033)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228034) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                                        x_228014;\n                                    x_228019 = x_228014;\n                                    ((volatile __local\n                                      float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                                        x_228015;\n                                    x_228020 = x_228015;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                                        x_228016;\n                                    x_228021 = x_228016;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                                        x_228017;\n                                    x_228022 = x_228017;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                                        x_228018;\n                                    x_228023 = x_228018;\n                                }\n                            }\n                            if (sle32(wave_sizze_227995, skip_threads_228033)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                      ",
                   "      }\n                            skip_threads_228033 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228036 = squot32(local_tid_227993, 32) == 0 ||\n                     !ltid_in_bounds_228029;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228036) {\n                            x_214512 = x_214507;\n                            x_214513 = x_214508;\n                            x_214514 = x_214509;\n                            x_214515 = x_214510;\n                            x_214516 = x_214511;\n                            x_214507 = ((__local\n                                         float *) red_arr_mem_227997)[sext_i32_i64(squot32(local_tid_227993,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214508 = ((__local\n                                         float *) red_arr_mem_227999)[sext_i32_i64(squot32(local_tid_227993,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214509 = ((__local\n                                         float *) red_arr_mem_228001)[sext_i32_i64(squot32(local_tid_227993,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214510 = ((__local\n                                         float *) red_arr_mem_228003)[sext_i32_i64(squot32(local_tid_227993,\n                                                       ",
                   "                                    32)) -\n                                                                      (int64_t) 1];\n                            x_214511 = ((__local\n                                         float *) red_arr_mem_228005)[sext_i32_i64(squot32(local_tid_227993,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228037 =\n                             slt64(srem64(sext_i32_i64(local_tid_227993),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_227993) -\n                                   sext_i32_i64(squot32(local_tid_227993, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228036) {\n                            if (inactive_228037) {\n                                x_214507 = x_214512;\n                                x_214508 = x_214513;\n                                x_214509 = x_214514;\n                                x_214510 = x_214515;\n                                x_214511 = x_214516;\n                            }\n                        }\n                        if (!no_carry_in_228036) {\n                            if (!inactive_228037) {\n                                float defunc_1_op_res_214517 = x_214507 +\n                                      x_214512;\n                                float defunc_1_op_res_214518 = x_214508 +\n                                      x_214513;\n                                float defunc_1_op_res_214519 = x_214509 +\n                                      x_214514;\n                                float defunc_1_op_res_214520 = x_214510 +\n                                      x_214515;\n              ",
                   "                  float defunc_1_op_res_214521 = x_214511 +\n                                      x_214516;\n                                \n                                x_214507 = defunc_1_op_res_214517;\n                                x_214508 = defunc_1_op_res_214518;\n                                x_214509 = defunc_1_op_res_214519;\n                                x_214510 = defunc_1_op_res_214520;\n                                x_214511 = defunc_1_op_res_214521;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228036) {\n                            ((__local\n                              float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                                x_214507;\n                            ((__local\n                              float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                                x_214508;\n                            ((__local\n                              float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                                x_214509;\n                            ((__local\n                              float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                                x_214510;\n                            ((__local\n                              float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                                x_214511;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_227993, 32) == 0 &&\n                        ltid_in_bounds_228029) {\n                        ((__local\n                          float *) red_arr_mem_227997)[sext_i32_i64(local_tid_227993)] =\n                            x_214512;\n      ",
                   "                  ((__local\n                          float *) red_arr_mem_227999)[sext_i32_i64(local_tid_227993)] =\n                            x_214513;\n                        ((__local\n                          float *) red_arr_mem_228001)[sext_i32_i64(local_tid_227993)] =\n                            x_214514;\n                        ((__local\n                          float *) red_arr_mem_228003)[sext_i32_i64(local_tid_227993)] =\n                            x_214515;\n                        ((__local\n                          float *) red_arr_mem_228005)[sext_i32_i64(local_tid_227993)] =\n                            x_214516;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228009) *\n                      squot64(segred_group_sizze_214495,\n                              segment_sizze_nonzzero_227990) +\n                      sext_i32_i64(local_tid_227993), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_227993),\n                                             squot64(segred_group_sizze_214495,\n                                                     segment_sizze_nonzzero_227990))) {\n                float tmp_228038;\n                \n                tmp_228038 = ((__local\n                               float *) red_arr_mem_227997)[(sext_i32_i64(local_tid_227993) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227990 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223840)[squot64(sext_i32_i64(virt_group_id_228009) *\n                                               squot64(segred_group_sizze_214495,\n                                                       ",
                   "segment_sizze_nonzzero_227990) +\n                                               sext_i32_i64(local_tid_227993),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228009) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_227990) +\n                                        sext_i32_i64(local_tid_227993) -\n                                        squot64(sext_i32_i64(virt_group_id_228009) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_227990) +\n                                                sext_i32_i64(local_tid_227993),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228038;\n                \n                float tmp_228039;\n                \n                tmp_228039 = ((__local\n                               float *) red_arr_mem_227999)[(sext_i32_i64(local_tid_227993) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227990 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223844)[squot64(sext_i32_i64(virt_group_id_228009) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_227990) +\n                                               sext_i32_i64(local_tid_227993),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228009) *\n                                        squot64(segred_group_sizze_214495,\n                     ",
                   "                           segment_sizze_nonzzero_227990) +\n                                        sext_i32_i64(local_tid_227993) -\n                                        squot64(sext_i32_i64(virt_group_id_228009) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_227990) +\n                                                sext_i32_i64(local_tid_227993),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228039;\n                \n                float tmp_228040;\n                \n                tmp_228040 = ((__local\n                               float *) red_arr_mem_228001)[(sext_i32_i64(local_tid_227993) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227990 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223848)[squot64(sext_i32_i64(virt_group_id_228009) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_227990) +\n                                               sext_i32_i64(local_tid_227993),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228009) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_227990) +\n                                        sext_i32_i64(local_tid_227993) -\n                                        squot64(sext_i32_i64(virt_group_id_228009) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segmen",
                   "t_sizze_nonzzero_227990) +\n                                                sext_i32_i64(local_tid_227993),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228040;\n                \n                float tmp_228041;\n                \n                tmp_228041 = ((__local\n                               float *) red_arr_mem_228003)[(sext_i32_i64(local_tid_227993) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227990 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223852)[squot64(sext_i32_i64(virt_group_id_228009) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_227990) +\n                                               sext_i32_i64(local_tid_227993),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228009) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_227990) +\n                                        sext_i32_i64(local_tid_227993) -\n                                        squot64(sext_i32_i64(virt_group_id_228009) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_227990) +\n                                                sext_i32_i64(local_tid_227993),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228041;\n                \n                float tmp_228042;\n                \n                tmp_228042 = ((__local\n                               float",
                   " *) red_arr_mem_228005)[(sext_i32_i64(local_tid_227993) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_227990 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223856)[squot64(sext_i32_i64(virt_group_id_228009) *\n                                               squot64(segred_group_sizze_214495,\n                                                       segment_sizze_nonzzero_227990) +\n                                               sext_i32_i64(local_tid_227993),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228009) *\n                                        squot64(segred_group_sizze_214495,\n                                                segment_sizze_nonzzero_227990) +\n                                        sext_i32_i64(local_tid_227993) -\n                                        squot64(sext_i32_i64(virt_group_id_228009) *\n                                                squot64(segred_group_sizze_214495,\n                                                        segment_sizze_nonzzero_227990) +\n                                                sext_i32_i64(local_tid_227993),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228042;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_214495\n}\n__kernel void mainzisegred_small_214604(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228137_backing_aligned_0,\n                                        __local volatile\n                                       ",
                   " int64_t *red_arr_mem_228135_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_l_196697,\n                                        int64_t jump_t_196702,\n                                        int64_t l_n_m_196752, int64_t i_196779,\n                                        int64_t num_groups_214597,\n                                        int64_t ctx_param_ext_222545,\n                                        int64_t ctx_param_ext_222546,\n                                        int64_t ctx_param_ext_222548,\n                                        int64_t segment_sizze_nonzzero_228128,\n                                        __global unsigned char *ext_mem_222468,\n                                        __global unsigned char *ext_mem_222469,\n                                        __global\n                                        unsigned char *mem_param_222550,\n                                        __global unsigned char *mem_223608,\n                                        __global unsigned char *mem_223861,\n                                        __global unsigned char *mem_223865,\n                                        __global unsigned char *mem_223869,\n                                        __global unsigned char *mem_223873,\n                                        __global unsigned char *mem_223877,\n                                        __global unsigned char *mem_223882,\n                                        __global unsigned char *mem_223886)\n{\n    #define segred_group_sizze_214596 (mainzisegred_group_sizze_213966)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228137_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228137_backing_aligned_0;\n    __local volatile unsigned char *re",
                   "strict red_arr_mem_228135_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228135_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228130;\n    int32_t local_tid_228131;\n    int64_t group_sizze_228134;\n    int32_t wave_sizze_228133;\n    int32_t group_tid_228132;\n    \n    global_tid_228130 = get_global_id(0);\n    local_tid_228131 = get_local_id(0);\n    group_sizze_228134 = get_local_size(0);\n    wave_sizze_228133 = LOCKSTEP_WIDTH;\n    group_tid_228132 = get_group_id(0);\n    \n    int32_t phys_tid_214604 = global_tid_228130;\n    __local unsigned char *red_arr_mem_228135;\n    \n    red_arr_mem_228135 = (__local unsigned char *) red_arr_mem_228135_backing_0;\n    \n    __local unsigned char *red_arr_mem_228137;\n    \n    red_arr_mem_228137 = (__local unsigned char *) red_arr_mem_228137_backing_1;\n    \n    int32_t phys_group_id_228139;\n    \n    phys_group_id_228139 = get_group_id(0);\n    for (int32_t i_228140 = 0; i_228140 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * l_n_m_196752,\n                                          squot64(segred_group_sizze_214596,\n                                                  segment_sizze_nonzzero_228128))) -\n                   phys_group_id_228139, sext_i64_i32(num_groups_214597));\n         i_228140++) {\n        int32_t virt_group_id_228141 = phys_group_id_228139 + i_228140 *\n                sext_i64_i32(num_groups_214597);\n        int64_t slice_228142 = l_n_m_196752;\n        int64_t slice_228143 = m_196691 * slice_228142;\n        int64_t gtid_214601 = squot64(squot64(sext_i32_i64(local_tid_228131),\n                                              segment_sizze_nonzzero_228128) +\n                                      sext_i32_i64(virt_group_id_228141) *\n                                      squot64(segred_group_sizze_214596,\n                                              segment_sizze_nonzzero_228128),\n         ",
                   "                             slice_228142);\n        int64_t remnant_228144 = squot64(sext_i32_i64(local_tid_228131),\n                                         segment_sizze_nonzzero_228128) +\n                sext_i32_i64(virt_group_id_228141) *\n                squot64(segred_group_sizze_214596,\n                        segment_sizze_nonzzero_228128) - gtid_214601 *\n                slice_228142;\n        int64_t gtid_214602 = remnant_228144;\n        int64_t remnant_228145 = remnant_228144 - gtid_214602;\n        int64_t gtid_214603 = srem64(sext_i32_i64(local_tid_228131),\n                                     q_l_196697);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_l_196697) && ((slt64(gtid_214601,\n                                                          m_196691) &&\n                                                    slt64(gtid_214602,\n                                                          l_n_m_196752)) &&\n                                                   slt64(sext_i32_i64(local_tid_228131),\n                                                         q_l_196697 *\n                                                         squot64(segred_group_sizze_214596,\n                                                                 segment_sizze_nonzzero_228128)))) {\n                int64_t x_214621;\n                \n                x_214621 = ((__global int64_t *) ext_mem_222469)[gtid_214601 *\n                                                                 l_n_m_196752 +\n                                                                 gtid_214602];\n                \n                float x_214622;\n                \n                x_214622 = ((__global float *) ext_mem_222468)[gtid_214601 *\n                                                               l_n_m_196752 +\n                                                               gtid_214602];\n                \n                int64_t binop_y_221797 = mul64(jump_t_196702, gtid_21",
                   "4602);\n                int64_t binop_y_221798 = smin64(i_196779, binop_y_221797);\n                int64_t index_primexp_221799 = add64((int64_t) 1,\n                                                     binop_y_221798);\n                float a12_214624;\n                \n                a12_214624 = ((__global float *) mem_223861)[gtid_214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float b12_214625;\n                \n                b12_214625 = ((__global float *) mem_223865)[gtid_214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float c12_214626;\n                \n                c12_214626 = ((__global float *) mem_223869)[gtid_214601 *\n                                                             l_n_m_196752 +\n                                                             gtid_214602];\n                \n                float b2_214627;\n                \n                b2_214627 = ((__global float *) mem_223873)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602];\n                \n                float c2_214628;\n                \n                c2_214628 = ((__global float *) mem_223877)[gtid_214601 *\n                                                            l_n_m_196752 +\n                                                            gtid_214602];\n                \n                bool cond_214630 = sle64(n_196692, gtid_214603);\n                int64_t defunc_0_f_res_214631;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214631 = (int64_t) 0;\n                } else {\n                    int64_t i_214632 = add64(gtid_214603, x_214621);\n     ",
                   "               int64_t defunc_1_add_res_214633 = add64((int64_t) 1,\n                                                            i_214632);\n                    \n                    defunc_0_f_res_214631 = defunc_1_add_res_214633;\n                }\n                \n                float defunc_0_f_res_214634;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214634 = 0.0F;\n                } else {\n                    int64_t i_214635 = add64(gtid_214603, x_214621);\n                    float defunc_0_add_arg_214636;\n                    \n                    defunc_0_add_arg_214636 = ((__global\n                                                float *) mem_param_222550)[ctx_param_ext_222545 +\n                                                                           (gtid_214601 *\n                                                                            ctx_param_ext_222546 +\n                                                                            i_214635 *\n                                                                            ctx_param_ext_222548)];\n                    defunc_0_f_res_214634 = defunc_0_add_arg_214636;\n                }\n                \n                int64_t binop_p_214637 = sub64(defunc_0_f_res_214631,\n                                               index_primexp_221799);\n                float defunc_0_f_res_214638 = sitofp_i64_f32(binop_p_214637);\n                float abs_res_214639 = (float) fabs(defunc_0_f_res_214638);\n                float tmp1_214640 = abs_res_214639 / x_214622;\n                float x_214641 = tmp1_214640 * tmp1_214640;\n                float y_214642 = tmp1_214640 * x_214641;\n                float tmp2_214643 = 1.0F - y_214642;\n                float x_214644 = tmp2_214643 * tmp2_214643;\n                float tmp3_214645 = tmp2_214643 * x_214644;\n                float tmp4_214646 = defunc_0_f_res_214634 * tmp3_214645;\n                float defunc_1_f_res_214647 = defunc_0_f_res_214638 ",
                   "*\n                      tmp4_214646;\n                float defunc_1_f_res_214648 = defunc_0_f_res_214638 *\n                      defunc_1_f_res_214647;\n                float defunc_0_f_res_214649;\n                \n                if (cond_214630) {\n                    defunc_0_f_res_214649 = 0.0F;\n                } else {\n                    int64_t i_214650 = add64(gtid_214603, x_214621);\n                    float defunc_0_add_arg_214651;\n                    \n                    defunc_0_add_arg_214651 = ((__global\n                                                float *) mem_223608)[gtid_214601 *\n                                                                     n_196692 +\n                                                                     i_214650];\n                    defunc_0_f_res_214649 = defunc_0_add_arg_214651;\n                }\n                \n                float x_214652 = a12_214624 * tmp4_214646;\n                float y_214653 = b12_214625 * defunc_1_f_res_214647;\n                float x_214654 = x_214652 + y_214653;\n                float y_214655 = c12_214626 * defunc_1_f_res_214648;\n                float x_214656 = x_214654 + y_214655;\n                float defunc_9_fit_fun_res_214657 = defunc_0_f_res_214649 *\n                      x_214656;\n                float x_214658 = b12_214625 * tmp4_214646;\n                float y_214659 = b2_214627 * defunc_1_f_res_214647;\n                float x_214660 = x_214658 + y_214659;\n                float y_214661 = c2_214628 * defunc_1_f_res_214648;\n                float x_214662 = x_214660 + y_214661;\n                float defunc_9_slope_fun_res_214663 = defunc_0_f_res_214649 *\n                      x_214662;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                        defunc_9_fit_fun_res_2146",
                   "57;\n                    ((__local\n                      float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                        defunc_9_slope_fun_res_214663;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_l_196697)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_214605;\n                float x_214606;\n                float x_214607;\n                float x_214608;\n                float x_228146;\n                float x_228147;\n                float x_228148;\n                float x_228149;\n                bool ltid_in_bounds_228152 =\n                     slt64(sext_i32_i64(local_tid_228131), q_l_196697 *\n                           squot64(segred_group_sizze_214596,\n                                   segment_sizze_nonzzero_228128));\n                int32_t skip_threads_228153;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228152) {\n                        x_214607 = ((volatile __local\n                                     float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)];\n                        x_214608 = ((volatile __local\n                                     float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)];\n                        if ((local_tid_228131 - squot32(local_tid_228131, 32) *\n                             32) == 0) {\n                            x_214605 = x_214607;\n                            x_214606 = x_214608;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n     ",
                   "           {\n                    skip_threads_228153 = 1;\n                    while (slt32(skip_threads_228153, 32)) {\n                        bool thread_active_228154 = sle32(skip_threads_228153,\n                                                          local_tid_228131 -\n                                                          squot32(local_tid_228131,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228152;\n                        \n                        if (thread_active_228154) {\n                            // read operands\n                            {\n                                x_214605 = ((volatile __local\n                                             float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131) -\n                                                                          sext_i32_i64(skip_threads_228153)];\n                                x_214606 = ((volatile __local\n                                             float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131) -\n                                                                          sext_i32_i64(skip_threads_228153)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228155 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228131),\n                                              q_l_196697),\n                                       sext_i32_i64(local_tid_228131) -\n                                       sext_i32_i64(local_tid_228131 -\n                                       skip_threads_228153));\n                            \n                            if (thread_active_228154 && inactive_228155) {\n                                x_214605 = x_214607;\n                                x_214606 = x_214608;\n                            }\n                            if (thread_a",
                   "ctive_228154) {\n                                if (!inactive_228155) {\n                                    float defunc_1_op_res_214609 = x_214605 +\n                                          x_214607;\n                                    float defunc_1_op_res_214610 = x_214606 +\n                                          x_214608;\n                                    \n                                    x_214605 = defunc_1_op_res_214609;\n                                    x_214606 = defunc_1_op_res_214610;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228133, skip_threads_228153)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228154) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                                    x_214605;\n                                x_214607 = x_214605;\n                                ((volatile __local\n                                  float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                                    x_214606;\n                                x_214608 = x_214606;\n                            }\n                        }\n                        if (sle32(wave_sizze_228133, skip_threads_228153)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228153 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228131 - squot32(local_tid_228131, 32) *\n                         32) == 31 && ltid_in_bounds_228152) {\n                        ((volati",
                   "le __local\n                          float *) red_arr_mem_228135)[sext_i32_i64(squot32(local_tid_228131,\n                                                                            32))] =\n                            x_214605;\n                        ((volatile __local\n                          float *) red_arr_mem_228137)[sext_i32_i64(squot32(local_tid_228131,\n                                                                            32))] =\n                            x_214606;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228156;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228131, 32) == 0 &&\n                            ltid_in_bounds_228152) {\n                            x_228148 = ((volatile __local\n                                         float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)];\n                            x_228149 = ((volatile __local\n                                         float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)];\n                            if ((local_tid_228131 - squot32(local_tid_228131,\n                                                            32) * 32) == 0) {\n                                x_228146 = x_228148;\n                                x_228147 = x_228149;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228156 = 1;\n                        while (slt32(skip_threads_228156, 32)) {\n                            bool thread_active_228157 =\n                                 sle32(skip_threads_228156, local_tid_228131 -\n                                       squot32(l",
                   "ocal_tid_228131, 32) * 32) &&\n                                 (squot32(local_tid_228131, 32) == 0 &&\n                                  ltid_in_bounds_228152);\n                            \n                            if (thread_active_228157) {\n                                // read operands\n                                {\n                                    x_228146 = ((volatile __local\n                                                 float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131) -\n                                                                              sext_i32_i64(skip_threads_228156)];\n                                    x_228147 = ((volatile __local\n                                                 float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131) -\n                                                                              sext_i32_i64(skip_threads_228156)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228158 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228131 *\n                                                  32 + 32 - 1), q_l_196697),\n                                           sext_i32_i64(local_tid_228131 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228131 -\n                                                         skip_threads_228156) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228157 && inactive_228158) {\n                                    x_228146 = x_228148;\n                                    x_228147 = x_228149;\n                                }\n                                if (thread_active_228157) {\n                                    if (!inactive_228158) {\n      ",
                   "                                  float defunc_1_op_res_228150 =\n                                              x_228146 + x_228148;\n                                        float defunc_1_op_res_228151 =\n                                              x_228147 + x_228149;\n                                        \n                                        x_228146 = defunc_1_op_res_228150;\n                                        x_228147 = defunc_1_op_res_228151;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228133, skip_threads_228156)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228157) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                                        x_228146;\n                                    x_228148 = x_228146;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                                        x_228147;\n                                    x_228149 = x_228147;\n                                }\n                            }\n                            if (sle32(wave_sizze_228133, skip_threads_228156)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228156 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228159 = squot32(local_tid_228131, 32) == 0 ||\n                     !ltid_in_bounds_228152;\n                \n                // carry-in for every ",
                   "block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228159) {\n                            x_214607 = x_214605;\n                            x_214608 = x_214606;\n                            x_214605 = ((__local\n                                         float *) red_arr_mem_228135)[sext_i32_i64(squot32(local_tid_228131,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_214606 = ((__local\n                                         float *) red_arr_mem_228137)[sext_i32_i64(squot32(local_tid_228131,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228160 =\n                             slt64(srem64(sext_i32_i64(local_tid_228131),\n                                          q_l_196697),\n                                   sext_i32_i64(local_tid_228131) -\n                                   sext_i32_i64(squot32(local_tid_228131, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228159) {\n                            if (inactive_228160) {\n                                x_214605 = x_214607;\n                                x_214606 = x_214608;\n                            }\n                        }\n                        if (!no_carry_in_228159) {\n                            if (!inactive_228160) {\n                                float defunc_1_op_res_214609 = x_214605 +\n                                      x_214607;\n                                float defunc_1_op_res_214610 = x_214606 +\n   ",
                   "                                   x_214608;\n                                \n                                x_214605 = defunc_1_op_res_214609;\n                                x_214606 = defunc_1_op_res_214610;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228159) {\n                            ((__local\n                              float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                                x_214605;\n                            ((__local\n                              float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                                x_214606;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228131, 32) == 0 &&\n                        ltid_in_bounds_228152) {\n                        ((__local\n                          float *) red_arr_mem_228135)[sext_i32_i64(local_tid_228131)] =\n                            x_214607;\n                        ((__local\n                          float *) red_arr_mem_228137)[sext_i32_i64(local_tid_228131)] =\n                            x_214608;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228141) *\n                      squot64(segred_group_sizze_214596,\n                              segment_sizze_nonzzero_228128) +\n                      sext_i32_i64(local_tid_228131), m_196691 *\n                      l_n_m_196752) && slt64(sext_i32_i64(local_tid_228131),\n                                             squot64(segred_group_sizze_214596,\n                            ",
                   "                         segment_sizze_nonzzero_228128))) {\n                float tmp_228161;\n                \n                tmp_228161 = ((__local\n                               float *) red_arr_mem_228135)[(sext_i32_i64(local_tid_228131) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228128 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223882)[squot64(sext_i32_i64(virt_group_id_228141) *\n                                               squot64(segred_group_sizze_214596,\n                                                       segment_sizze_nonzzero_228128) +\n                                               sext_i32_i64(local_tid_228131),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228141) *\n                                        squot64(segred_group_sizze_214596,\n                                                segment_sizze_nonzzero_228128) +\n                                        sext_i32_i64(local_tid_228131) -\n                                        squot64(sext_i32_i64(virt_group_id_228141) *\n                                                squot64(segred_group_sizze_214596,\n                                                        segment_sizze_nonzzero_228128) +\n                                                sext_i32_i64(local_tid_228131),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228161;\n                \n                float tmp_228162;\n                \n                tmp_228162 = ((__local\n                               float *) red_arr_mem_228137)[(sext_i32_i64(local_tid_228131) +\n                                                             (int64_t) 1) *\n                                           ",
                   "                 segment_sizze_nonzzero_228128 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_223886)[squot64(sext_i32_i64(virt_group_id_228141) *\n                                               squot64(segred_group_sizze_214596,\n                                                       segment_sizze_nonzzero_228128) +\n                                               sext_i32_i64(local_tid_228131),\n                                               l_n_m_196752) * l_n_m_196752 +\n                                       (sext_i32_i64(virt_group_id_228141) *\n                                        squot64(segred_group_sizze_214596,\n                                                segment_sizze_nonzzero_228128) +\n                                        sext_i32_i64(local_tid_228131) -\n                                        squot64(sext_i32_i64(virt_group_id_228141) *\n                                                squot64(segred_group_sizze_214596,\n                                                        segment_sizze_nonzzero_228128) +\n                                                sext_i32_i64(local_tid_228131),\n                                                l_n_m_196752) * l_n_m_196752)] =\n                    tmp_228162;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_214596\n}\n__kernel void mainzisegred_small_216280(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228385_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_19",
                   "6779,\n                                        int64_t num_groups_216274,\n                                        int64_t segment_sizze_nonzzero_228378,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224073,\n                                        __global unsigned char *mem_224087)\n{\n    #define segred_group_sizze_216273 (mainzisegred_group_sizze_215877)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228385_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228385_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228380;\n    int32_t local_tid_228381;\n    int64_t group_sizze_228384;\n    int32_t wave_sizze_228383;\n    int32_t group_tid_228382;\n    \n    global_tid_228380 = get_global_id(0);\n    local_tid_228381 = get_local_id(0);\n    group_sizze_228384 = get_local_size(0);\n    wave_sizze_228383 = LOCKSTEP_WIDTH;\n    group_tid_228382 = get_group_id(0);\n    \n    int32_t phys_tid_216280 = global_tid_228380;\n    __local unsigned char *red_arr_mem_228385;\n    \n    red_arr_mem_228385 = (__local unsigned char *) red_arr_mem_228385_backing_0;\n    \n    int32_t phys_group_id_228387;\n    \n    phys_group_id_228387 = get_group_id(0);\n    for (int32_t i_228388 = 0; i_228388 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_216273,\n                                                  segment_sizze_nonzzero_228378))) -\n                   p",
                   "hys_group_id_228387, sext_i64_i32(num_groups_216274));\n         i_228388++) {\n        int32_t virt_group_id_228389 = phys_group_id_228387 + i_228388 *\n                sext_i64_i32(num_groups_216274);\n        int64_t slice_228390 = t_n_m_196759;\n        int64_t slice_228391 = m_196691 * slice_228390;\n        int64_t gtid_216277 = squot64(squot64(sext_i32_i64(local_tid_228381),\n                                              segment_sizze_nonzzero_228378) +\n                                      sext_i32_i64(virt_group_id_228389) *\n                                      squot64(segred_group_sizze_216273,\n                                              segment_sizze_nonzzero_228378),\n                                      slice_228390);\n        int64_t remnant_228392 = squot64(sext_i32_i64(local_tid_228381),\n                                         segment_sizze_nonzzero_228378) +\n                sext_i32_i64(virt_group_id_228389) *\n                squot64(segred_group_sizze_216273,\n                        segment_sizze_nonzzero_228378) - gtid_216277 *\n                slice_228390;\n        int64_t gtid_216278 = remnant_228392;\n        int64_t remnant_228393 = remnant_228392 - gtid_216278;\n        int64_t gtid_216279 = srem64(sext_i32_i64(local_tid_228381),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_216277,\n                                                          m_196691) &&\n                                                    slt64(gtid_216278,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_228381),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_216273,\n                                                                 segment_sizze_no",
                   "nzzero_228378)))) {\n                int64_t x_216285;\n                \n                x_216285 = ((__global int64_t *) ext_mem_222256)[gtid_216277];\n                \n                int64_t x_216290;\n                \n                x_216290 = ((__global int64_t *) ext_mem_222518)[gtid_216277 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_216278];\n                \n                float x_216291;\n                \n                x_216291 = ((__global float *) ext_mem_222517)[gtid_216277 *\n                                                               t_n_m_196759 +\n                                                               gtid_216278];\n                \n                int64_t binop_y_221752 = mul64(jump_t_196702, gtid_216278);\n                int64_t binop_y_221753 = smin64(i_196779, binop_y_221752);\n                int64_t index_primexp_221754 = add64((int64_t) 1,\n                                                     binop_y_221753);\n                bool cond_216294 = sle64(x_216285, gtid_216279);\n                int64_t defunc_0_f_res_216295;\n                \n                if (cond_216294) {\n                    defunc_0_f_res_216295 = (int64_t) 0;\n                } else {\n                    int64_t i_216296 = add64(gtid_216279, x_216290);\n                    int64_t defunc_0_add_arg_216297;\n                    \n                    defunc_0_add_arg_216297 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_216277 *\n                                                                           n_196692 +\n                                                                           i_216296];\n                    \n                    int64_t defunc_1_add_res_216298 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_216297);\n                    \n                    defunc_0_f_res",
                   "_216295 = defunc_1_add_res_216298;\n                }\n                \n                float defunc_0_f_res_216299;\n                \n                if (cond_216294) {\n                    defunc_0_f_res_216299 = 0.0F;\n                } else {\n                    int64_t i_216300 = add64(gtid_216279, x_216290);\n                    float defunc_0_add_arg_216301;\n                    \n                    defunc_0_add_arg_216301 = ((__global\n                                                float *) mem_224073)[gtid_216277 *\n                                                                     n_196692 +\n                                                                     i_216300];\n                    defunc_0_f_res_216299 = defunc_0_add_arg_216301;\n                }\n                \n                int64_t binop_p_216302 = sub64(defunc_0_f_res_216295,\n                                               index_primexp_221754);\n                float defunc_0_f_res_216303 = sitofp_i64_f32(binop_p_216302);\n                float abs_res_216304 = (float) fabs(defunc_0_f_res_216303);\n                float tmp1_216305 = abs_res_216304 / x_216291;\n                float x_216306 = tmp1_216305 * tmp1_216305;\n                float y_216307 = tmp1_216305 * x_216306;\n                float tmp2_216308 = 1.0F - y_216307;\n                float x_216309 = tmp2_216308 * tmp2_216308;\n                float tmp3_216310 = tmp2_216308 * x_216309;\n                float w_j_216311 = defunc_0_f_res_216299 * tmp3_216310;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                        w_j_216311;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                    0.0F;\n            }\n        }\n      ",
                   "  barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_216281;\n                float x_216282;\n                float x_228394;\n                float x_228395;\n                bool ltid_in_bounds_228397 =\n                     slt64(sext_i32_i64(local_tid_228381), q_t_196696 *\n                           squot64(segred_group_sizze_216273,\n                                   segment_sizze_nonzzero_228378));\n                int32_t skip_threads_228398;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228397) {\n                        x_216282 = ((volatile __local\n                                     float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)];\n                        if ((local_tid_228381 - squot32(local_tid_228381, 32) *\n                             32) == 0) {\n                            x_216281 = x_216282;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228398 = 1;\n                    while (slt32(skip_threads_228398, 32)) {\n                        bool thread_active_228399 = sle32(skip_threads_228398,\n                                                          local_tid_228381 -\n                                                          squot32(local_tid_228381,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228397;\n                        \n                        if (thread_active_228399) {\n                            // read operands\n                            {\n                                x_216281 = ((volatile __local\n                                             float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381) -\n                            ",
                   "                                              sext_i32_i64(skip_threads_228398)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228400 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228381),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228381) -\n                                       sext_i32_i64(local_tid_228381 -\n                                       skip_threads_228398));\n                            \n                            if (thread_active_228399 && inactive_228400) {\n                                x_216281 = x_216282;\n                            }\n                            if (thread_active_228399) {\n                                if (!inactive_228400) {\n                                    float defunc_1_op_res_216283 = x_216281 +\n                                          x_216282;\n                                    \n                                    x_216281 = defunc_1_op_res_216283;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228383, skip_threads_228398)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228399) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                                    x_216281;\n                                x_216282 = x_216281;\n                            }\n                        }\n                        if (sle32(wave_sizze_228383, skip_threads_228398)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                    ",
                   "    skip_threads_228398 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228381 - squot32(local_tid_228381, 32) *\n                         32) == 31 && ltid_in_bounds_228397) {\n                        ((volatile __local\n                          float *) red_arr_mem_228385)[sext_i32_i64(squot32(local_tid_228381,\n                                                                            32))] =\n                            x_216281;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228401;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228381, 32) == 0 &&\n                            ltid_in_bounds_228397) {\n                            x_228395 = ((volatile __local\n                                         float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)];\n                            if ((local_tid_228381 - squot32(local_tid_228381,\n                                                            32) * 32) == 0) {\n                                x_228394 = x_228395;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228401 = 1;\n                        while (slt32(skip_threads_228401, 32)) {\n                            bool thread_active_228402 =\n                                 sle32(skip_threads_228401, local_tid_228381 -\n                                       squot32(local_tid_228381, 32) * 32) &&\n                                 (squot32(local_tid_228381, 32",
                   ") == 0 &&\n                                  ltid_in_bounds_228397);\n                            \n                            if (thread_active_228402) {\n                                // read operands\n                                {\n                                    x_228394 = ((volatile __local\n                                                 float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381) -\n                                                                              sext_i32_i64(skip_threads_228401)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228403 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228381 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228381 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228381 -\n                                                         skip_threads_228401) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228402 && inactive_228403) {\n                                    x_228394 = x_228395;\n                                }\n                                if (thread_active_228402) {\n                                    if (!inactive_228403) {\n                                        float defunc_1_op_res_228396 =\n                                              x_228394 + x_228395;\n                                        \n                                        x_228394 = defunc_1_op_res_228396;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228383, skip_threads_228401)) {\n         ",
                   "                       barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228402) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                                        x_228394;\n                                    x_228395 = x_228394;\n                                }\n                            }\n                            if (sle32(wave_sizze_228383, skip_threads_228401)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228401 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228404 = squot32(local_tid_228381, 32) == 0 ||\n                     !ltid_in_bounds_228397;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228404) {\n                            x_216282 = x_216281;\n                            x_216281 = ((__local\n                                         float *) red_arr_mem_228385)[sext_i32_i64(squot32(local_tid_228381,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228405 =\n                             slt64(srem64(sext_i32_i64(local_tid_228381),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228381) -\n                     ",
                   "              sext_i32_i64(squot32(local_tid_228381, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228404) {\n                            if (inactive_228405) {\n                                x_216281 = x_216282;\n                            }\n                        }\n                        if (!no_carry_in_228404) {\n                            if (!inactive_228405) {\n                                float defunc_1_op_res_216283 = x_216281 +\n                                      x_216282;\n                                \n                                x_216281 = defunc_1_op_res_216283;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228404) {\n                            ((__local\n                              float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                                x_216281;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228381, 32) == 0 &&\n                        ltid_in_bounds_228397) {\n                        ((__local\n                          float *) red_arr_mem_228385)[sext_i32_i64(local_tid_228381)] =\n                            x_216282;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228389) *\n                      squot64(segred_group_sizze_216273,\n                              segment_sizze_nonzzero_228378) +\n                      sext_i32_i64(local_tid_228381), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_ti",
                   "d_228381),\n                                             squot64(segred_group_sizze_216273,\n                                                     segment_sizze_nonzzero_228378))) {\n                float tmp_228406;\n                \n                tmp_228406 = ((__local\n                               float *) red_arr_mem_228385)[(sext_i32_i64(local_tid_228381) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228378 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224087)[squot64(sext_i32_i64(virt_group_id_228389) *\n                                               squot64(segred_group_sizze_216273,\n                                                       segment_sizze_nonzzero_228378) +\n                                               sext_i32_i64(local_tid_228381),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228389) *\n                                        squot64(segred_group_sizze_216273,\n                                                segment_sizze_nonzzero_228378) +\n                                        sext_i32_i64(local_tid_228381) -\n                                        squot64(sext_i32_i64(virt_group_id_228389) *\n                                                squot64(segred_group_sizze_216273,\n                                                        segment_sizze_nonzzero_228378) +\n                                                sext_i32_i64(local_tid_228381),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228406;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_216273\n}\n__ker",
                   "nel void mainzisegred_small_216332(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228467_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_216326,\n                                        int64_t segment_sizze_nonzzero_228460,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224073,\n                                        __global unsigned char *mem_224077,\n                                        __global unsigned char *mem_224092,\n                                        __global unsigned char *mem_224097)\n{\n    #define segred_group_sizze_216325 (mainzisegred_group_sizze_215807)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228467_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228467_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228462;\n    int32_t local_tid_228463;\n    int64_t group_sizze_228466;\n    int32_t wave_sizze_228465;\n    int32_t group_tid_228464;\n    \n    global_tid_228462 = get_global_id(0);\n    local_tid_228463 = get_local_id(0);\n    group_sizze_228466 = get_local_size(0);\n    wave_siz",
                   "ze_228465 = LOCKSTEP_WIDTH;\n    group_tid_228464 = get_group_id(0);\n    \n    int32_t phys_tid_216332 = global_tid_228462;\n    __local unsigned char *red_arr_mem_228467;\n    \n    red_arr_mem_228467 = (__local unsigned char *) red_arr_mem_228467_backing_0;\n    \n    int32_t phys_group_id_228469;\n    \n    phys_group_id_228469 = get_group_id(0);\n    for (int32_t i_228470 = 0; i_228470 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_216325,\n                                                  segment_sizze_nonzzero_228460))) -\n                   phys_group_id_228469, sext_i64_i32(num_groups_216326));\n         i_228470++) {\n        int32_t virt_group_id_228471 = phys_group_id_228469 + i_228470 *\n                sext_i64_i32(num_groups_216326);\n        int64_t slice_228472 = t_n_m_196759;\n        int64_t slice_228473 = m_196691 * slice_228472;\n        int64_t gtid_216329 = squot64(squot64(sext_i32_i64(local_tid_228463),\n                                              segment_sizze_nonzzero_228460) +\n                                      sext_i32_i64(virt_group_id_228471) *\n                                      squot64(segred_group_sizze_216325,\n                                              segment_sizze_nonzzero_228460),\n                                      slice_228472);\n        int64_t remnant_228474 = squot64(sext_i32_i64(local_tid_228463),\n                                         segment_sizze_nonzzero_228460) +\n                sext_i32_i64(virt_group_id_228471) *\n                squot64(segred_group_sizze_216325,\n                        segment_sizze_nonzzero_228460) - gtid_216329 *\n                slice_228472;\n        int64_t gtid_216330 = remnant_228474;\n        int64_t remnant_228475 = remnant_228474 - gtid_216330;\n        int64_t gtid_216331 = srem64(sext_i32_i64(local_tid_228463),\n                                     q_t_196696);\n        \n        // apply map function if in boun",
                   "ds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_216329,\n                                                          m_196691) &&\n                                                    slt64(gtid_216330,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_228463),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_216325,\n                                                                 segment_sizze_nonzzero_228460)))) {\n                int64_t x_216337;\n                \n                x_216337 = ((__global int64_t *) ext_mem_222256)[gtid_216329];\n                \n                int64_t x_216344;\n                \n                x_216344 = ((__global int64_t *) ext_mem_222518)[gtid_216329 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_216330];\n                \n                float x_216345;\n                \n                x_216345 = ((__global float *) ext_mem_222517)[gtid_216329 *\n                                                               t_n_m_196759 +\n                                                               gtid_216330];\n                \n                int64_t binop_y_221747 = mul64(jump_t_196702, gtid_216330);\n                int64_t binop_y_221748 = smin64(i_196779, binop_y_221747);\n                int64_t index_primexp_221749 = add64((int64_t) 1,\n                                                     binop_y_221748);\n                float a0_216347;\n                \n                a0_216347 = ((__global float *) mem_224092)[gtid_216329 *\n                                                            t_n_m_196759 +\n                                                            gtid_216330];\n                \n                bo",
                   "ol cond_216349 = sle64(x_216337, gtid_216331);\n                int64_t defunc_0_f_res_216350;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216350 = (int64_t) 0;\n                } else {\n                    int64_t i_216351 = add64(gtid_216331, x_216344);\n                    int64_t defunc_0_add_arg_216352;\n                    \n                    defunc_0_add_arg_216352 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_216329 *\n                                                                           n_196692 +\n                                                                           i_216351];\n                    \n                    int64_t defunc_1_add_res_216353 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_216352);\n                    \n                    defunc_0_f_res_216350 = defunc_1_add_res_216353;\n                }\n                \n                float defunc_0_f_res_216354;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216354 = 0.0F;\n                } else {\n                    int64_t i_216355 = add64(gtid_216331, x_216344);\n                    float defunc_0_add_arg_216356;\n                    \n                    defunc_0_add_arg_216356 = ((__global\n                                                float *) mem_224073)[gtid_216329 *\n                                                                     n_196692 +\n                                                                     i_216355];\n                    defunc_0_f_res_216354 = defunc_0_add_arg_216356;\n                }\n                \n                int64_t binop_p_216357 = sub64(defunc_0_f_res_216350,\n                                               index_primexp_221749);\n                float defunc_0_f_res_216358 = sitofp_i64_f32(binop_p_216357);\n                float abs_res_216359 = (float) fabs(defunc_0_f_res_2163",
                   "58);\n                float tmp1_216360 = abs_res_216359 / x_216345;\n                float x_216361 = tmp1_216360 * tmp1_216360;\n                float y_216362 = tmp1_216360 * x_216361;\n                float tmp2_216363 = 1.0F - y_216362;\n                float x_216364 = tmp2_216363 * tmp2_216363;\n                float tmp3_216365 = tmp2_216363 * x_216364;\n                float tmp4_216366 = defunc_0_f_res_216354 * tmp3_216365;\n                float defunc_0_f_res_216367;\n                \n                if (cond_216349) {\n                    defunc_0_f_res_216367 = 0.0F;\n                } else {\n                    int64_t i_216368 = add64(gtid_216331, x_216344);\n                    float defunc_0_add_arg_216369;\n                    \n                    defunc_0_add_arg_216369 = ((__global\n                                                float *) mem_224077)[gtid_216329 *\n                                                                     n_196692 +\n                                                                     i_216368];\n                    defunc_0_f_res_216367 = defunc_0_add_arg_216369;\n                }\n                \n                float x_216370 = a0_216347 * tmp4_216366;\n                float defunc_9_fit_fun_res_216371 = defunc_0_f_res_216367 *\n                      x_216370;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                        defunc_9_fit_fun_res_216371;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_",
                   "216333;\n                float x_216334;\n                float x_228476;\n                float x_228477;\n                bool ltid_in_bounds_228479 =\n                     slt64(sext_i32_i64(local_tid_228463), q_t_196696 *\n                           squot64(segred_group_sizze_216325,\n                                   segment_sizze_nonzzero_228460));\n                int32_t skip_threads_228480;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228479) {\n                        x_216334 = ((volatile __local\n                                     float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)];\n                        if ((local_tid_228463 - squot32(local_tid_228463, 32) *\n                             32) == 0) {\n                            x_216333 = x_216334;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228480 = 1;\n                    while (slt32(skip_threads_228480, 32)) {\n                        bool thread_active_228481 = sle32(skip_threads_228480,\n                                                          local_tid_228463 -\n                                                          squot32(local_tid_228463,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228479;\n                        \n                        if (thread_active_228481) {\n                            // read operands\n                            {\n                                x_216333 = ((volatile __local\n                                             float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463) -\n                                                                          sext_i32_i64(skip_threads_228480)];\n                            }\n                        }\n                        // perform op",
                   "eration\n                        {\n                            bool inactive_228482 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228463),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228463) -\n                                       sext_i32_i64(local_tid_228463 -\n                                       skip_threads_228480));\n                            \n                            if (thread_active_228481 && inactive_228482) {\n                                x_216333 = x_216334;\n                            }\n                            if (thread_active_228481) {\n                                if (!inactive_228482) {\n                                    float defunc_1_op_res_216335 = x_216333 +\n                                          x_216334;\n                                    \n                                    x_216333 = defunc_1_op_res_216335;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228465, skip_threads_228480)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228481) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                                    x_216333;\n                                x_216334 = x_216333;\n                            }\n                        }\n                        if (sle32(wave_sizze_228465, skip_threads_228480)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228480 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its resu",
                   "lt to offset 'i'\n                {\n                    if ((local_tid_228463 - squot32(local_tid_228463, 32) *\n                         32) == 31 && ltid_in_bounds_228479) {\n                        ((volatile __local\n                          float *) red_arr_mem_228467)[sext_i32_i64(squot32(local_tid_228463,\n                                                                            32))] =\n                            x_216333;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228483;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228463, 32) == 0 &&\n                            ltid_in_bounds_228479) {\n                            x_228477 = ((volatile __local\n                                         float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)];\n                            if ((local_tid_228463 - squot32(local_tid_228463,\n                                                            32) * 32) == 0) {\n                                x_228476 = x_228477;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228483 = 1;\n                        while (slt32(skip_threads_228483, 32)) {\n                            bool thread_active_228484 =\n                                 sle32(skip_threads_228483, local_tid_228463 -\n                                       squot32(local_tid_228463, 32) * 32) &&\n                                 (squot32(local_tid_228463, 32) == 0 &&\n                                  ltid_in_bounds_228479);\n                            \n                            if (thread_active_228484) {\n                      ",
                   "          // read operands\n                                {\n                                    x_228476 = ((volatile __local\n                                                 float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463) -\n                                                                              sext_i32_i64(skip_threads_228483)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228485 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228463 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228463 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228463 -\n                                                         skip_threads_228483) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228484 && inactive_228485) {\n                                    x_228476 = x_228477;\n                                }\n                                if (thread_active_228484) {\n                                    if (!inactive_228485) {\n                                        float defunc_1_op_res_228478 =\n                                              x_228476 + x_228477;\n                                        \n                                        x_228476 = defunc_1_op_res_228478;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228465, skip_threads_228483)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228484) {\n                                // w",
                   "rite result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                                        x_228476;\n                                    x_228477 = x_228476;\n                                }\n                            }\n                            if (sle32(wave_sizze_228465, skip_threads_228483)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228483 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228486 = squot32(local_tid_228463, 32) == 0 ||\n                     !ltid_in_bounds_228479;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228486) {\n                            x_216334 = x_216333;\n                            x_216333 = ((__local\n                                         float *) red_arr_mem_228467)[sext_i32_i64(squot32(local_tid_228463,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228487 =\n                             slt64(srem64(sext_i32_i64(local_tid_228463),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228463) -\n                                   sext_i32_i64(squot32(local_tid_228463, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_22848",
                   "6) {\n                            if (inactive_228487) {\n                                x_216333 = x_216334;\n                            }\n                        }\n                        if (!no_carry_in_228486) {\n                            if (!inactive_228487) {\n                                float defunc_1_op_res_216335 = x_216333 +\n                                      x_216334;\n                                \n                                x_216333 = defunc_1_op_res_216335;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228486) {\n                            ((__local\n                              float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                                x_216333;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228463, 32) == 0 &&\n                        ltid_in_bounds_228479) {\n                        ((__local\n                          float *) red_arr_mem_228467)[sext_i32_i64(local_tid_228463)] =\n                            x_216334;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228471) *\n                      squot64(segred_group_sizze_216325,\n                              segment_sizze_nonzzero_228460) +\n                      sext_i32_i64(local_tid_228463), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228463),\n                                             squot64(segred_group_sizze_216325,\n                                                     segment_sizze_nonzzero_228460))",
                   ") {\n                float tmp_228488;\n                \n                tmp_228488 = ((__local\n                               float *) red_arr_mem_228467)[(sext_i32_i64(local_tid_228463) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228460 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224097)[squot64(sext_i32_i64(virt_group_id_228471) *\n                                               squot64(segred_group_sizze_216325,\n                                                       segment_sizze_nonzzero_228460) +\n                                               sext_i32_i64(local_tid_228463),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228471) *\n                                        squot64(segred_group_sizze_216325,\n                                                segment_sizze_nonzzero_228460) +\n                                        sext_i32_i64(local_tid_228463) -\n                                        squot64(sext_i32_i64(virt_group_id_228471) *\n                                                squot64(segred_group_sizze_216325,\n                                                        segment_sizze_nonzzero_228460) +\n                                                sext_i32_i64(local_tid_228463),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228488;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_216325\n}\n__kernel void mainzisegred_small_217318(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_",
                   "arr_mem_228620_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228618_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228616_backing_aligned_2,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_217310,\n                                        int64_t segment_sizze_nonzzero_228609,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224214,\n                                        __global unsigned char *mem_224232,\n                                        __global unsigned char *mem_224236,\n                                        __global unsigned char *mem_224240)\n{\n    #define segred_group_sizze_217309 (mainzisegred_group_sizze_216838)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228620_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228620_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228618_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228618_backing_aligned_1;\n    __local volatile",
                   " unsigned char *restrict red_arr_mem_228616_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228616_backing_aligned_2;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228611;\n    int32_t local_tid_228612;\n    int64_t group_sizze_228615;\n    int32_t wave_sizze_228614;\n    int32_t group_tid_228613;\n    \n    global_tid_228611 = get_global_id(0);\n    local_tid_228612 = get_local_id(0);\n    group_sizze_228615 = get_local_size(0);\n    wave_sizze_228614 = LOCKSTEP_WIDTH;\n    group_tid_228613 = get_group_id(0);\n    \n    int32_t phys_tid_217318 = global_tid_228611;\n    __local unsigned char *red_arr_mem_228616;\n    \n    red_arr_mem_228616 = (__local unsigned char *) red_arr_mem_228616_backing_0;\n    \n    __local unsigned char *red_arr_mem_228618;\n    \n    red_arr_mem_228618 = (__local unsigned char *) red_arr_mem_228618_backing_1;\n    \n    __local unsigned char *red_arr_mem_228620;\n    \n    red_arr_mem_228620 = (__local unsigned char *) red_arr_mem_228620_backing_2;\n    \n    int32_t phys_group_id_228622;\n    \n    phys_group_id_228622 = get_group_id(0);\n    for (int32_t i_228623 = 0; i_228623 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_217309,\n                                                  segment_sizze_nonzzero_228609))) -\n                   phys_group_id_228622, sext_i64_i32(num_groups_217310));\n         i_228623++) {\n        int32_t virt_group_id_228624 = phys_group_id_228622 + i_228623 *\n                sext_i64_i32(num_groups_217310);\n        int64_t slice_228625 = t_n_m_196759;\n        int64_t slice_228626 = m_196691 * slice_228625;\n        int64_t gtid_217315 = squot64(squot64(sext_i32_i64(local_tid_228612),\n                                              segment_sizze_nonzzero_228609) +\n                                      sext_i32_i64(virt_group_id_228624) *\n    ",
                   "                                  squot64(segred_group_sizze_217309,\n                                              segment_sizze_nonzzero_228609),\n                                      slice_228625);\n        int64_t remnant_228627 = squot64(sext_i32_i64(local_tid_228612),\n                                         segment_sizze_nonzzero_228609) +\n                sext_i32_i64(virt_group_id_228624) *\n                squot64(segred_group_sizze_217309,\n                        segment_sizze_nonzzero_228609) - gtid_217315 *\n                slice_228625;\n        int64_t gtid_217316 = remnant_228627;\n        int64_t remnant_228628 = remnant_228627 - gtid_217316;\n        int64_t gtid_217317 = srem64(sext_i32_i64(local_tid_228612),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_217315,\n                                                          m_196691) &&\n                                                    slt64(gtid_217316,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_228612),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_217309,\n                                                                 segment_sizze_nonzzero_228609)))) {\n                int64_t x_217329;\n                \n                x_217329 = ((__global int64_t *) ext_mem_222256)[gtid_217315];\n                \n                int64_t x_217334;\n                \n                x_217334 = ((__global int64_t *) ext_mem_222518)[gtid_217315 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_217316];\n                \n                float x_217335;\n                \n               ",
                   " x_217335 = ((__global float *) ext_mem_222517)[gtid_217315 *\n                                                               t_n_m_196759 +\n                                                               gtid_217316];\n                \n                int64_t binop_y_221762 = mul64(jump_t_196702, gtid_217316);\n                int64_t binop_y_221763 = smin64(i_196779, binop_y_221762);\n                int64_t index_primexp_221764 = add64((int64_t) 1,\n                                                     binop_y_221763);\n                bool cond_217338 = sle64(x_217329, gtid_217317);\n                int64_t defunc_0_f_res_217339;\n                \n                if (cond_217338) {\n                    defunc_0_f_res_217339 = (int64_t) 0;\n                } else {\n                    int64_t i_217340 = add64(gtid_217317, x_217334);\n                    int64_t defunc_0_add_arg_217341;\n                    \n                    defunc_0_add_arg_217341 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_217315 *\n                                                                           n_196692 +\n                                                                           i_217340];\n                    \n                    int64_t defunc_1_add_res_217342 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_217341);\n                    \n                    defunc_0_f_res_217339 = defunc_1_add_res_217342;\n                }\n                \n                float defunc_0_f_res_217343;\n                \n                if (cond_217338) {\n                    defunc_0_f_res_217343 = 0.0F;\n                } else {\n                    int64_t i_217344 = add64(gtid_217317, x_217334);\n                    float defunc_0_add_arg_217345;\n                    \n                    defunc_0_add_arg_217345 = ((__global\n                                                float *) mem_224214)[gtid_217315 *\n              ",
                   "                                                       n_196692 +\n                                                                     i_217344];\n                    defunc_0_f_res_217343 = defunc_0_add_arg_217345;\n                }\n                \n                int64_t binop_p_217346 = sub64(defunc_0_f_res_217339,\n                                               index_primexp_221764);\n                float defunc_0_f_res_217347 = sitofp_i64_f32(binop_p_217346);\n                float abs_res_217348 = (float) fabs(defunc_0_f_res_217347);\n                float tmp1_217349 = abs_res_217348 / x_217335;\n                float x_217350 = tmp1_217349 * tmp1_217349;\n                float y_217351 = tmp1_217349 * x_217350;\n                float tmp2_217352 = 1.0F - y_217351;\n                float x_217353 = tmp2_217352 * tmp2_217352;\n                float tmp3_217354 = tmp2_217352 * x_217353;\n                float w_j_217355 = defunc_0_f_res_217343 * tmp3_217354;\n                float xw_j_217356 = defunc_0_f_res_217347 * w_j_217355;\n                float x2w_j_217357 = defunc_0_f_res_217347 * xw_j_217356;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                        w_j_217355;\n                    ((__local\n                      float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n                        xw_j_217356;\n                    ((__local\n                      float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                        x2w_j_217357;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n         ",
                   "           0.0F;\n                ((__local\n                  float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_217319;\n                float x_217320;\n                float x_217321;\n                float x_217322;\n                float x_217323;\n                float x_217324;\n                float x_228629;\n                float x_228630;\n                float x_228631;\n                float x_228632;\n                float x_228633;\n                float x_228634;\n                bool ltid_in_bounds_228638 =\n                     slt64(sext_i32_i64(local_tid_228612), q_t_196696 *\n                           squot64(segred_group_sizze_217309,\n                                   segment_sizze_nonzzero_228609));\n                int32_t skip_threads_228639;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228638) {\n                        x_217322 = ((volatile __local\n                                     float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)];\n                        x_217323 = ((volatile __local\n                                     float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)];\n                        x_217324 = ((volatile __local\n                                     float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)];\n                        if ((local_tid_228612 - squot32(local_tid_228612, 32) *\n                             32) == 0) {\n                            x_217319 = x_217322;\n                            x_217320 = x_217323;\n                            x_217321 = x_217324;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n    ",
                   "            {\n                    skip_threads_228639 = 1;\n                    while (slt32(skip_threads_228639, 32)) {\n                        bool thread_active_228640 = sle32(skip_threads_228639,\n                                                          local_tid_228612 -\n                                                          squot32(local_tid_228612,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228638;\n                        \n                        if (thread_active_228640) {\n                            // read operands\n                            {\n                                x_217319 = ((volatile __local\n                                             float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612) -\n                                                                          sext_i32_i64(skip_threads_228639)];\n                                x_217320 = ((volatile __local\n                                             float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612) -\n                                                                          sext_i32_i64(skip_threads_228639)];\n                                x_217321 = ((volatile __local\n                                             float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612) -\n                                                                          sext_i32_i64(skip_threads_228639)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228641 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228612),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228612) -\n                                       sext_i32_i64(local_tid_228612 -\n                                       skip_threads_228639));\n",
                   "                            \n                            if (thread_active_228640 && inactive_228641) {\n                                x_217319 = x_217322;\n                                x_217320 = x_217323;\n                                x_217321 = x_217324;\n                            }\n                            if (thread_active_228640) {\n                                if (!inactive_228641) {\n                                    float defunc_1_op_res_217325 = x_217319 +\n                                          x_217322;\n                                    float defunc_1_op_res_217326 = x_217320 +\n                                          x_217323;\n                                    float defunc_1_op_res_217327 = x_217321 +\n                                          x_217324;\n                                    \n                                    x_217319 = defunc_1_op_res_217325;\n                                    x_217320 = defunc_1_op_res_217326;\n                                    x_217321 = defunc_1_op_res_217327;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228614, skip_threads_228639)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228640) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                                    x_217319;\n                                x_217322 = x_217319;\n                                ((volatile __local\n                                  float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n                                    x_217320;\n                                x_217323 = x_217320;\n                                ((volatile __local\n                                 ",
                   " float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                                    x_217321;\n                                x_217324 = x_217321;\n                            }\n                        }\n                        if (sle32(wave_sizze_228614, skip_threads_228639)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228639 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228612 - squot32(local_tid_228612, 32) *\n                         32) == 31 && ltid_in_bounds_228638) {\n                        ((volatile __local\n                          float *) red_arr_mem_228616)[sext_i32_i64(squot32(local_tid_228612,\n                                                                            32))] =\n                            x_217319;\n                        ((volatile __local\n                          float *) red_arr_mem_228618)[sext_i32_i64(squot32(local_tid_228612,\n                                                                            32))] =\n                            x_217320;\n                        ((volatile __local\n                          float *) red_arr_mem_228620)[sext_i32_i64(squot32(local_tid_228612,\n                                                                            32))] =\n                            x_217321;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228642;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228612, 32) == 0 &&\n                            ltid_in_bounds_228638) {\n         ",
                   "                   x_228632 = ((volatile __local\n                                         float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)];\n                            x_228633 = ((volatile __local\n                                         float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)];\n                            x_228634 = ((volatile __local\n                                         float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)];\n                            if ((local_tid_228612 - squot32(local_tid_228612,\n                                                            32) * 32) == 0) {\n                                x_228629 = x_228632;\n                                x_228630 = x_228633;\n                                x_228631 = x_228634;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228642 = 1;\n                        while (slt32(skip_threads_228642, 32)) {\n                            bool thread_active_228643 =\n                                 sle32(skip_threads_228642, local_tid_228612 -\n                                       squot32(local_tid_228612, 32) * 32) &&\n                                 (squot32(local_tid_228612, 32) == 0 &&\n                                  ltid_in_bounds_228638);\n                            \n                            if (thread_active_228643) {\n                                // read operands\n                                {\n                                    x_228629 = ((volatile __local\n                                                 float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612) -\n                                                                              sext_i32_i64(skip_threads_228642)];\n                                    x_228630 = ((volatile __local\n                                                 float *) red",
                   "_arr_mem_228618)[sext_i32_i64(local_tid_228612) -\n                                                                              sext_i32_i64(skip_threads_228642)];\n                                    x_228631 = ((volatile __local\n                                                 float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612) -\n                                                                              sext_i32_i64(skip_threads_228642)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228644 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228612 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228612 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228612 -\n                                                         skip_threads_228642) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228643 && inactive_228644) {\n                                    x_228629 = x_228632;\n                                    x_228630 = x_228633;\n                                    x_228631 = x_228634;\n                                }\n                                if (thread_active_228643) {\n                                    if (!inactive_228644) {\n                                        float defunc_1_op_res_228635 =\n                                              x_228629 + x_228632;\n                                        float defunc_1_op_res_228636 =\n                                              x_228630 + x_228633;\n                                        float defunc_1_op_res_228637 =\n                                              x_228631 + ",
                   "x_228634;\n                                        \n                                        x_228629 = defunc_1_op_res_228635;\n                                        x_228630 = defunc_1_op_res_228636;\n                                        x_228631 = defunc_1_op_res_228637;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228614, skip_threads_228642)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228643) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                                        x_228629;\n                                    x_228632 = x_228629;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n                                        x_228630;\n                                    x_228633 = x_228630;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                                        x_228631;\n                                    x_228634 = x_228631;\n                                }\n                            }\n                            if (sle32(wave_sizze_228614, skip_threads_228642)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228642 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228645 = squot32(local_tid_228612, 32) == 0 ||\n                     !",
                   "ltid_in_bounds_228638;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228645) {\n                            x_217322 = x_217319;\n                            x_217323 = x_217320;\n                            x_217324 = x_217321;\n                            x_217319 = ((__local\n                                         float *) red_arr_mem_228616)[sext_i32_i64(squot32(local_tid_228612,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217320 = ((__local\n                                         float *) red_arr_mem_228618)[sext_i32_i64(squot32(local_tid_228612,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217321 = ((__local\n                                         float *) red_arr_mem_228620)[sext_i32_i64(squot32(local_tid_228612,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228646 =\n                             slt64(srem64(sext_i32_i64(local_tid_228612),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228612) -\n                                   sext_i32_i64(squot32(local_tid_228612, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228645) {\n                            if (inactive_228646)",
                   " {\n                                x_217319 = x_217322;\n                                x_217320 = x_217323;\n                                x_217321 = x_217324;\n                            }\n                        }\n                        if (!no_carry_in_228645) {\n                            if (!inactive_228646) {\n                                float defunc_1_op_res_217325 = x_217319 +\n                                      x_217322;\n                                float defunc_1_op_res_217326 = x_217320 +\n                                      x_217323;\n                                float defunc_1_op_res_217327 = x_217321 +\n                                      x_217324;\n                                \n                                x_217319 = defunc_1_op_res_217325;\n                                x_217320 = defunc_1_op_res_217326;\n                                x_217321 = defunc_1_op_res_217327;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228645) {\n                            ((__local\n                              float *) red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                                x_217319;\n                            ((__local\n                              float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n                                x_217320;\n                            ((__local\n                              float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                                x_217321;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228612, 32) == 0 &&\n                        ltid_in_bounds_228638) {\n                        ((__local\n                          float *)",
                   " red_arr_mem_228616)[sext_i32_i64(local_tid_228612)] =\n                            x_217322;\n                        ((__local\n                          float *) red_arr_mem_228618)[sext_i32_i64(local_tid_228612)] =\n                            x_217323;\n                        ((__local\n                          float *) red_arr_mem_228620)[sext_i32_i64(local_tid_228612)] =\n                            x_217324;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228624) *\n                      squot64(segred_group_sizze_217309,\n                              segment_sizze_nonzzero_228609) +\n                      sext_i32_i64(local_tid_228612), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228612),\n                                             squot64(segred_group_sizze_217309,\n                                                     segment_sizze_nonzzero_228609))) {\n                float tmp_228647;\n                \n                tmp_228647 = ((__local\n                               float *) red_arr_mem_228616)[(sext_i32_i64(local_tid_228612) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228609 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224232)[squot64(sext_i32_i64(virt_group_id_228624) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228609) +\n                                               sext_i32_i64(local_tid_228612),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                 ",
                   "      (sext_i32_i64(virt_group_id_228624) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228609) +\n                                        sext_i32_i64(local_tid_228612) -\n                                        squot64(sext_i32_i64(virt_group_id_228624) *\n                                                squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228609) +\n                                                sext_i32_i64(local_tid_228612),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228647;\n                \n                float tmp_228648;\n                \n                tmp_228648 = ((__local\n                               float *) red_arr_mem_228618)[(sext_i32_i64(local_tid_228612) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228609 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224236)[squot64(sext_i32_i64(virt_group_id_228624) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228609) +\n                                               sext_i32_i64(local_tid_228612),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228624) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228609) +\n                                        sext_i32_i64(local_tid_228612) -\n                                        squot64(sext_i32_i64(virt_group_id_228624) *\n     ",
                   "                                           squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228609) +\n                                                sext_i32_i64(local_tid_228612),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228648;\n                \n                float tmp_228649;\n                \n                tmp_228649 = ((__local\n                               float *) red_arr_mem_228620)[(sext_i32_i64(local_tid_228612) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228609 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224240)[squot64(sext_i32_i64(virt_group_id_228624) *\n                                               squot64(segred_group_sizze_217309,\n                                                       segment_sizze_nonzzero_228609) +\n                                               sext_i32_i64(local_tid_228612),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228624) *\n                                        squot64(segred_group_sizze_217309,\n                                                segment_sizze_nonzzero_228609) +\n                                        sext_i32_i64(local_tid_228612) -\n                                        squot64(sext_i32_i64(virt_group_id_228624) *\n                                                squot64(segred_group_sizze_217309,\n                                                        segment_sizze_nonzzero_228609) +\n                                                sext_i32_i64(local_tid_228612),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228649;\n   ",
                   "         }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_217309\n}\n__kernel void mainzisegred_small_217390(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228728_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228726_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_217383,\n                                        int64_t segment_sizze_nonzzero_228719,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224214,\n                                        __global unsigned char *mem_224218,\n                                        __global unsigned char *mem_224245,\n                                        __global unsigned char *mem_224249,\n                                        __global unsigned char *mem_224253,\n                                        __global unsigned char *mem_224258,\n                                        __global unsigned char *mem_224262)\n{\n    #define segred_group_sizze_217382 (mainzisegred_group_sizze_216741)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n   ",
                   " __local volatile unsigned char *restrict red_arr_mem_228728_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228728_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228726_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228726_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228721;\n    int32_t local_tid_228722;\n    int64_t group_sizze_228725;\n    int32_t wave_sizze_228724;\n    int32_t group_tid_228723;\n    \n    global_tid_228721 = get_global_id(0);\n    local_tid_228722 = get_local_id(0);\n    group_sizze_228725 = get_local_size(0);\n    wave_sizze_228724 = LOCKSTEP_WIDTH;\n    group_tid_228723 = get_group_id(0);\n    \n    int32_t phys_tid_217390 = global_tid_228721;\n    __local unsigned char *red_arr_mem_228726;\n    \n    red_arr_mem_228726 = (__local unsigned char *) red_arr_mem_228726_backing_0;\n    \n    __local unsigned char *red_arr_mem_228728;\n    \n    red_arr_mem_228728 = (__local unsigned char *) red_arr_mem_228728_backing_1;\n    \n    int32_t phys_group_id_228730;\n    \n    phys_group_id_228730 = get_group_id(0);\n    for (int32_t i_228731 = 0; i_228731 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_217382,\n                                                  segment_sizze_nonzzero_228719))) -\n                   phys_group_id_228730, sext_i64_i32(num_groups_217383));\n         i_228731++) {\n        int32_t virt_group_id_228732 = phys_group_id_228730 + i_228731 *\n                sext_i64_i32(num_groups_217383);\n        int64_t slice_228733 = t_n_m_196759;\n        int64_t slice_228734 = m_196691 * slice_228733;\n        int64_t gtid_217387 = squot64(squot64(sext_i32_i64(local_tid_228722),\n                                              segment_sizze",
                   "_nonzzero_228719) +\n                                      sext_i32_i64(virt_group_id_228732) *\n                                      squot64(segred_group_sizze_217382,\n                                              segment_sizze_nonzzero_228719),\n                                      slice_228733);\n        int64_t remnant_228735 = squot64(sext_i32_i64(local_tid_228722),\n                                         segment_sizze_nonzzero_228719) +\n                sext_i32_i64(virt_group_id_228732) *\n                squot64(segred_group_sizze_217382,\n                        segment_sizze_nonzzero_228719) - gtid_217387 *\n                slice_228733;\n        int64_t gtid_217388 = remnant_228735;\n        int64_t remnant_228736 = remnant_228735 - gtid_217388;\n        int64_t gtid_217389 = srem64(sext_i32_i64(local_tid_228722),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_217387,\n                                                          m_196691) &&\n                                                    slt64(gtid_217388,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_228722),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_217382,\n                                                                 segment_sizze_nonzzero_228719)))) {\n                int64_t x_217398;\n                \n                x_217398 = ((__global int64_t *) ext_mem_222256)[gtid_217387];\n                \n                int64_t x_217407;\n                \n                x_217407 = ((__global int64_t *) ext_mem_222518)[gtid_217387 *\n                                                                 t_n_m_196759 +\n                                                             ",
                   "    gtid_217388];\n                \n                float x_217408;\n                \n                x_217408 = ((__global float *) ext_mem_222517)[gtid_217387 *\n                                                               t_n_m_196759 +\n                                                               gtid_217388];\n                \n                int64_t binop_y_221757 = mul64(jump_t_196702, gtid_217388);\n                int64_t binop_y_221758 = smin64(i_196779, binop_y_221757);\n                int64_t index_primexp_221759 = add64((int64_t) 1,\n                                                     binop_y_221758);\n                float a11_217410;\n                \n                a11_217410 = ((__global float *) mem_224245)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                float b11_217411;\n                \n                b11_217411 = ((__global float *) mem_224249)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                float c11_217412;\n                \n                c11_217412 = ((__global float *) mem_224253)[gtid_217387 *\n                                                             t_n_m_196759 +\n                                                             gtid_217388];\n                \n                bool cond_217414 = sle64(x_217398, gtid_217389);\n                int64_t defunc_0_f_res_217415;\n                \n                if (cond_217414) {\n                    defunc_0_f_res_217415 = (int64_t) 0;\n                } else {\n                    int64_t i_217416 = add64(gtid_217389, x_217407);\n                    int64_t defunc_0_add_arg_217417;\n                    \n                    defunc_0_add_arg_217417 = ((__global\n                                                int6",
                   "4_t *) ext_mem_222257)[gtid_217387 *\n                                                                           n_196692 +\n                                                                           i_217416];\n                    \n                    int64_t defunc_1_add_res_217418 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_217417);\n                    \n                    defunc_0_f_res_217415 = defunc_1_add_res_217418;\n                }\n                \n                float defunc_0_f_res_217419;\n                \n                if (cond_217414) {\n                    defunc_0_f_res_217419 = 0.0F;\n                } else {\n                    int64_t i_217420 = add64(gtid_217389, x_217407);\n                    float defunc_0_add_arg_217421;\n                    \n                    defunc_0_add_arg_217421 = ((__global\n                                                float *) mem_224214)[gtid_217387 *\n                                                                     n_196692 +\n                                                                     i_217420];\n                    defunc_0_f_res_217419 = defunc_0_add_arg_217421;\n                }\n                \n                int64_t binop_p_217422 = sub64(defunc_0_f_res_217415,\n                                               index_primexp_221759);\n                float defunc_0_f_res_217423 = sitofp_i64_f32(binop_p_217422);\n                float abs_res_217424 = (float) fabs(defunc_0_f_res_217423);\n                float tmp1_217425 = abs_res_217424 / x_217408;\n                float x_217426 = tmp1_217425 * tmp1_217425;\n                float y_217427 = tmp1_217425 * x_217426;\n                float tmp2_217428 = 1.0F - y_217427;\n                float x_217429 = tmp2_217428 * tmp2_217428;\n                float tmp3_217430 = tmp2_217428 * x_217429;\n                float tmp4_217431 = defunc_0_f_res_217419 * tmp3_217430;\n                float defunc_1_f_res_217432 = def",
                   "unc_0_f_res_217423 *\n                      tmp4_217431;\n                float defunc_0_f_res_217433;\n                \n                if (cond_217414) {\n                    defunc_0_f_res_217433 = 0.0F;\n                } else {\n                    int64_t i_217434 = add64(gtid_217389, x_217407);\n                    float defunc_0_add_arg_217435;\n                    \n                    defunc_0_add_arg_217435 = ((__global\n                                                float *) mem_224218)[gtid_217387 *\n                                                                     n_196692 +\n                                                                     i_217434];\n                    defunc_0_f_res_217433 = defunc_0_add_arg_217435;\n                }\n                \n                float x_217436 = a11_217410 * tmp4_217431;\n                float y_217437 = b11_217411 * defunc_1_f_res_217432;\n                float x_217438 = x_217436 + y_217437;\n                float defunc_9_fit_fun_res_217439 = defunc_0_f_res_217433 *\n                      x_217438;\n                float x_217440 = b11_217411 * tmp4_217431;\n                float y_217441 = c11_217412 * defunc_1_f_res_217432;\n                float x_217442 = x_217440 + y_217441;\n                float defunc_9_slope_fun_res_217443 = defunc_0_f_res_217433 *\n                      x_217442;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                        defunc_9_fit_fun_res_217439;\n                    ((__local\n                      float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                        defunc_9_slope_fun_res_217443;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                    ",
                   "0.0F;\n                ((__local\n                  float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_217391;\n                float x_217392;\n                float x_217393;\n                float x_217394;\n                float x_228737;\n                float x_228738;\n                float x_228739;\n                float x_228740;\n                bool ltid_in_bounds_228743 =\n                     slt64(sext_i32_i64(local_tid_228722), q_t_196696 *\n                           squot64(segred_group_sizze_217382,\n                                   segment_sizze_nonzzero_228719));\n                int32_t skip_threads_228744;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228743) {\n                        x_217393 = ((volatile __local\n                                     float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)];\n                        x_217394 = ((volatile __local\n                                     float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)];\n                        if ((local_tid_228722 - squot32(local_tid_228722, 32) *\n                             32) == 0) {\n                            x_217391 = x_217393;\n                            x_217392 = x_217394;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228744 = 1;\n                    while (slt32(skip_threads_228744, 32)) {\n                        bool thread_active_228745 = sle32(skip_threads_228744,\n                                                          local_tid_228722 -\n                                                          squot32",
                   "(local_tid_228722,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228743;\n                        \n                        if (thread_active_228745) {\n                            // read operands\n                            {\n                                x_217391 = ((volatile __local\n                                             float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722) -\n                                                                          sext_i32_i64(skip_threads_228744)];\n                                x_217392 = ((volatile __local\n                                             float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722) -\n                                                                          sext_i32_i64(skip_threads_228744)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_228746 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228722),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228722) -\n                                       sext_i32_i64(local_tid_228722 -\n                                       skip_threads_228744));\n                            \n                            if (thread_active_228745 && inactive_228746) {\n                                x_217391 = x_217393;\n                                x_217392 = x_217394;\n                            }\n                            if (thread_active_228745) {\n                                if (!inactive_228746) {\n                                    float defunc_1_op_res_217395 = x_217391 +\n                                          x_217393;\n                                    float defunc_1_op_res_217396 = x_217392 +\n                                          x_217394;\n        ",
                   "                            \n                                    x_217391 = defunc_1_op_res_217395;\n                                    x_217392 = defunc_1_op_res_217396;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228724, skip_threads_228744)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228745) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                                    x_217391;\n                                x_217393 = x_217391;\n                                ((volatile __local\n                                  float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                                    x_217392;\n                                x_217394 = x_217392;\n                            }\n                        }\n                        if (sle32(wave_sizze_228724, skip_threads_228744)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228744 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228722 - squot32(local_tid_228722, 32) *\n                         32) == 31 && ltid_in_bounds_228743) {\n                        ((volatile __local\n                          float *) red_arr_mem_228726)[sext_i32_i64(squot32(local_tid_228722,\n                                                                            32))] =\n                            x_217391;\n                        ((volatile __local\n                          float *) red_arr_mem_228728)[sext_i32_i64(sq",
                   "uot32(local_tid_228722,\n                                                                            32))] =\n                            x_217392;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228747;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228722, 32) == 0 &&\n                            ltid_in_bounds_228743) {\n                            x_228739 = ((volatile __local\n                                         float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)];\n                            x_228740 = ((volatile __local\n                                         float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)];\n                            if ((local_tid_228722 - squot32(local_tid_228722,\n                                                            32) * 32) == 0) {\n                                x_228737 = x_228739;\n                                x_228738 = x_228740;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228747 = 1;\n                        while (slt32(skip_threads_228747, 32)) {\n                            bool thread_active_228748 =\n                                 sle32(skip_threads_228747, local_tid_228722 -\n                                       squot32(local_tid_228722, 32) * 32) &&\n                                 (squot32(local_tid_228722, 32) == 0 &&\n                                  ltid_in_bounds_228743);\n                            \n                            if (thread_active_228748) {\n                                // read operands\n                                {\n            ",
                   "                        x_228737 = ((volatile __local\n                                                 float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722) -\n                                                                              sext_i32_i64(skip_threads_228747)];\n                                    x_228738 = ((volatile __local\n                                                 float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722) -\n                                                                              sext_i32_i64(skip_threads_228747)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228749 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228722 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228722 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228722 -\n                                                         skip_threads_228747) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228748 && inactive_228749) {\n                                    x_228737 = x_228739;\n                                    x_228738 = x_228740;\n                                }\n                                if (thread_active_228748) {\n                                    if (!inactive_228749) {\n                                        float defunc_1_op_res_228741 =\n                                              x_228737 + x_228739;\n                                        float defunc_1_op_res_228742 =\n                                              x_228738 + x_228740;\n                                        \n                             ",
                   "           x_228737 = defunc_1_op_res_228741;\n                                        x_228738 = defunc_1_op_res_228742;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228724, skip_threads_228747)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228748) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                                        x_228737;\n                                    x_228739 = x_228737;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                                        x_228738;\n                                    x_228740 = x_228738;\n                                }\n                            }\n                            if (sle32(wave_sizze_228724, skip_threads_228747)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228747 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228750 = squot32(local_tid_228722, 32) == 0 ||\n                     !ltid_in_bounds_228743;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228750) {\n                            x_217393 = x_217391;\n                            x_217394 = x_217392;\n                            x_217391 = ((__local\n                                         f",
                   "loat *) red_arr_mem_228726)[sext_i32_i64(squot32(local_tid_228722,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_217392 = ((__local\n                                         float *) red_arr_mem_228728)[sext_i32_i64(squot32(local_tid_228722,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228751 =\n                             slt64(srem64(sext_i32_i64(local_tid_228722),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228722) -\n                                   sext_i32_i64(squot32(local_tid_228722, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228750) {\n                            if (inactive_228751) {\n                                x_217391 = x_217393;\n                                x_217392 = x_217394;\n                            }\n                        }\n                        if (!no_carry_in_228750) {\n                            if (!inactive_228751) {\n                                float defunc_1_op_res_217395 = x_217391 +\n                                      x_217393;\n                                float defunc_1_op_res_217396 = x_217392 +\n                                      x_217394;\n                                \n                                x_217391 = defunc_1_op_res_217395;\n                                x_217392 = defunc_1_op_res_217396;\n                            }\n                        }\n                    }\n                    // write final result\n        ",
                   "            {\n                        if (!no_carry_in_228750) {\n                            ((__local\n                              float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                                x_217391;\n                            ((__local\n                              float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                                x_217392;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228722, 32) == 0 &&\n                        ltid_in_bounds_228743) {\n                        ((__local\n                          float *) red_arr_mem_228726)[sext_i32_i64(local_tid_228722)] =\n                            x_217393;\n                        ((__local\n                          float *) red_arr_mem_228728)[sext_i32_i64(local_tid_228722)] =\n                            x_217394;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228732) *\n                      squot64(segred_group_sizze_217382,\n                              segment_sizze_nonzzero_228719) +\n                      sext_i32_i64(local_tid_228722), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228722),\n                                             squot64(segred_group_sizze_217382,\n                                                     segment_sizze_nonzzero_228719))) {\n                float tmp_228752;\n                \n                tmp_228752 = ((__local\n                               float *) red_arr_mem_228726)[(sext_i32_i64(local_tid_228722) +\n                                                             (int64_t) 1) *\n                    ",
                   "                                        segment_sizze_nonzzero_228719 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224258)[squot64(sext_i32_i64(virt_group_id_228732) *\n                                               squot64(segred_group_sizze_217382,\n                                                       segment_sizze_nonzzero_228719) +\n                                               sext_i32_i64(local_tid_228722),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228732) *\n                                        squot64(segred_group_sizze_217382,\n                                                segment_sizze_nonzzero_228719) +\n                                        sext_i32_i64(local_tid_228722) -\n                                        squot64(sext_i32_i64(virt_group_id_228732) *\n                                                squot64(segred_group_sizze_217382,\n                                                        segment_sizze_nonzzero_228719) +\n                                                sext_i32_i64(local_tid_228722),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228752;\n                \n                float tmp_228753;\n                \n                tmp_228753 = ((__local\n                               float *) red_arr_mem_228728)[(sext_i32_i64(local_tid_228722) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228719 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224262)[squot64(sext_i32_i64(virt_group_id_228732) *\n                                               squot64(segred_group_sizze_217382,\n                        ",
                   "                               segment_sizze_nonzzero_228719) +\n                                               sext_i32_i64(local_tid_228722),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228732) *\n                                        squot64(segred_group_sizze_217382,\n                                                segment_sizze_nonzzero_228719) +\n                                        sext_i32_i64(local_tid_228722) -\n                                        squot64(sext_i32_i64(virt_group_id_228732) *\n                                                squot64(segred_group_sizze_217382,\n                                                        segment_sizze_nonzzero_228719) +\n                                                sext_i32_i64(local_tid_228722),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228753;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_217382\n}\n__kernel void mainzisegred_small_218606(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228901_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228899_backing_aligned_1,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228897_backing_aligned_2,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228895_backing_aligned_3,\n                                        __local volatile\n                                        int64_t *red_arr_mem_228893_backing_aligned_4,\n                                     ",
                   "   int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n                                        int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_218596,\n                                        int64_t segment_sizze_nonzzero_228886,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224386,\n                                        __global unsigned char *mem_224404,\n                                        __global unsigned char *mem_224408,\n                                        __global unsigned char *mem_224412,\n                                        __global unsigned char *mem_224416,\n                                        __global unsigned char *mem_224420)\n{\n    #define segred_group_sizze_218595 (mainzisegred_group_sizze_218044)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_228901_backing_4 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228901_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_228899_backing_3 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228899_backing_aligned_1;\n    __local volatile unsigned char *restrict red_arr_mem_228897_backing_2 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228897_backing_aligned_2;\n    __l",
                   "ocal volatile unsigned char *restrict red_arr_mem_228895_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228895_backing_aligned_3;\n    __local volatile unsigned char *restrict red_arr_mem_228893_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_228893_backing_aligned_4;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_228888;\n    int32_t local_tid_228889;\n    int64_t group_sizze_228892;\n    int32_t wave_sizze_228891;\n    int32_t group_tid_228890;\n    \n    global_tid_228888 = get_global_id(0);\n    local_tid_228889 = get_local_id(0);\n    group_sizze_228892 = get_local_size(0);\n    wave_sizze_228891 = LOCKSTEP_WIDTH;\n    group_tid_228890 = get_group_id(0);\n    \n    int32_t phys_tid_218606 = global_tid_228888;\n    __local unsigned char *red_arr_mem_228893;\n    \n    red_arr_mem_228893 = (__local unsigned char *) red_arr_mem_228893_backing_0;\n    \n    __local unsigned char *red_arr_mem_228895;\n    \n    red_arr_mem_228895 = (__local unsigned char *) red_arr_mem_228895_backing_1;\n    \n    __local unsigned char *red_arr_mem_228897;\n    \n    red_arr_mem_228897 = (__local unsigned char *) red_arr_mem_228897_backing_2;\n    \n    __local unsigned char *red_arr_mem_228899;\n    \n    red_arr_mem_228899 = (__local unsigned char *) red_arr_mem_228899_backing_3;\n    \n    __local unsigned char *red_arr_mem_228901;\n    \n    red_arr_mem_228901 = (__local unsigned char *) red_arr_mem_228901_backing_4;\n    \n    int32_t phys_group_id_228903;\n    \n    phys_group_id_228903 = get_group_id(0);\n    for (int32_t i_228904 = 0; i_228904 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_218595,\n                                                  segment_sizze_nonzzero_228886))) -\n                   phys_group_id_228903, sext_i6",
                   "4_i32(num_groups_218596));\n         i_228904++) {\n        int32_t virt_group_id_228905 = phys_group_id_228903 + i_228904 *\n                sext_i64_i32(num_groups_218596);\n        int64_t slice_228906 = t_n_m_196759;\n        int64_t slice_228907 = m_196691 * slice_228906;\n        int64_t gtid_218603 = squot64(squot64(sext_i32_i64(local_tid_228889),\n                                              segment_sizze_nonzzero_228886) +\n                                      sext_i32_i64(virt_group_id_228905) *\n                                      squot64(segred_group_sizze_218595,\n                                              segment_sizze_nonzzero_228886),\n                                      slice_228906);\n        int64_t remnant_228908 = squot64(sext_i32_i64(local_tid_228889),\n                                         segment_sizze_nonzzero_228886) +\n                sext_i32_i64(virt_group_id_228905) *\n                squot64(segred_group_sizze_218595,\n                        segment_sizze_nonzzero_228886) - gtid_218603 *\n                slice_228906;\n        int64_t gtid_218604 = remnant_228908;\n        int64_t remnant_228909 = remnant_228908 - gtid_218604;\n        int64_t gtid_218605 = srem64(sext_i32_i64(local_tid_228889),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_218603,\n                                                          m_196691) &&\n                                                    slt64(gtid_218604,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_228889),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_218595,\n                                                                 segment_sizze_nonzzero_228886)))) {\n        ",
                   "        int64_t x_218623;\n                \n                x_218623 = ((__global int64_t *) ext_mem_222256)[gtid_218603];\n                \n                int64_t x_218628;\n                \n                x_218628 = ((__global int64_t *) ext_mem_222518)[gtid_218603 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_218604];\n                \n                float x_218629;\n                \n                x_218629 = ((__global float *) ext_mem_222517)[gtid_218603 *\n                                                               t_n_m_196759 +\n                                                               gtid_218604];\n                \n                int64_t binop_y_221772 = mul64(jump_t_196702, gtid_218604);\n                int64_t binop_y_221773 = smin64(i_196779, binop_y_221772);\n                int64_t index_primexp_221774 = add64((int64_t) 1,\n                                                     binop_y_221773);\n                bool cond_218632 = sle64(x_218623, gtid_218605);\n                int64_t defunc_0_f_res_218633;\n                \n                if (cond_218632) {\n                    defunc_0_f_res_218633 = (int64_t) 0;\n                } else {\n                    int64_t i_218634 = add64(gtid_218605, x_218628);\n                    int64_t defunc_0_add_arg_218635;\n                    \n                    defunc_0_add_arg_218635 = ((__global\n                                                int64_t *) ext_mem_222257)[gtid_218603 *\n                                                                           n_196692 +\n                                                                           i_218634];\n                    \n                    int64_t defunc_1_add_res_218636 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_218635);\n                    \n                    defunc_0_f_res_218633 = defunc_1_add_res_2",
                   "18636;\n                }\n                \n                float defunc_0_f_res_218637;\n                \n                if (cond_218632) {\n                    defunc_0_f_res_218637 = 0.0F;\n                } else {\n                    int64_t i_218638 = add64(gtid_218605, x_218628);\n                    float defunc_0_add_arg_218639;\n                    \n                    defunc_0_add_arg_218639 = ((__global\n                                                float *) mem_224386)[gtid_218603 *\n                                                                     n_196692 +\n                                                                     i_218638];\n                    defunc_0_f_res_218637 = defunc_0_add_arg_218639;\n                }\n                \n                int64_t binop_p_218640 = sub64(defunc_0_f_res_218633,\n                                               index_primexp_221774);\n                float defunc_0_f_res_218641 = sitofp_i64_f32(binop_p_218640);\n                float abs_res_218642 = (float) fabs(defunc_0_f_res_218641);\n                float tmp1_218643 = abs_res_218642 / x_218629;\n                float x_218644 = tmp1_218643 * tmp1_218643;\n                float y_218645 = tmp1_218643 * x_218644;\n                float tmp2_218646 = 1.0F - y_218645;\n                float x_218647 = tmp2_218646 * tmp2_218646;\n                float tmp3_218648 = tmp2_218646 * x_218647;\n                float w_j_218649 = defunc_0_f_res_218637 * tmp3_218648;\n                float xw_j_218650 = defunc_0_f_res_218641 * w_j_218649;\n                float x2w_j_218651 = defunc_0_f_res_218641 * xw_j_218650;\n                float x3w_j_218652 = defunc_0_f_res_218641 * x2w_j_218651;\n                float x4w_j_218653 = defunc_0_f_res_218641 * x3w_j_218652;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_228893)[sext",
                   "_i32_i64(local_tid_228889)] =\n                        w_j_218649;\n                    ((__local\n                      float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                        xw_j_218650;\n                    ((__local\n                      float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)] =\n                        x2w_j_218651;\n                    ((__local\n                      float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                        x3w_j_218652;\n                    ((__local\n                      float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                        x4w_j_218653;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_218607;\n                float x_218608;\n                float x_218609;\n                float x_218610;\n                float x_218611;\n                float x_218612;\n                float x_218613;\n                float x_218614;\n                float x_218615;\n                float x_218616;\n                float x_228910;\n                float x_228911;\n                float x_228912;\n                float ",
                   "x_228913;\n                float x_228914;\n                float x_228915;\n                float x_228916;\n                float x_228917;\n                float x_228918;\n                float x_228919;\n                bool ltid_in_bounds_228925 =\n                     slt64(sext_i32_i64(local_tid_228889), q_t_196696 *\n                           squot64(segred_group_sizze_218595,\n                                   segment_sizze_nonzzero_228886));\n                int32_t skip_threads_228926;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_228925) {\n                        x_218612 = ((volatile __local\n                                     float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)];\n                        x_218613 = ((volatile __local\n                                     float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)];\n                        x_218614 = ((volatile __local\n                                     float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)];\n                        x_218615 = ((volatile __local\n                                     float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)];\n                        x_218616 = ((volatile __local\n                                     float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)];\n                        if ((local_tid_228889 - squot32(local_tid_228889, 32) *\n                             32) == 0) {\n                            x_218607 = x_218612;\n                            x_218608 = x_218613;\n                            x_218609 = x_218614;\n                            x_218610 = x_218615;\n                            x_218611 = x_218616;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_228926 = 1;\n                    while (slt32(skip_threads_2289",
                   "26, 32)) {\n                        bool thread_active_228927 = sle32(skip_threads_228926,\n                                                          local_tid_228889 -\n                                                          squot32(local_tid_228889,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_228925;\n                        \n                        if (thread_active_228927) {\n                            // read operands\n                            {\n                                x_218607 = ((volatile __local\n                                             float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889) -\n                                                                          sext_i32_i64(skip_threads_228926)];\n                                x_218608 = ((volatile __local\n                                             float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889) -\n                                                                          sext_i32_i64(skip_threads_228926)];\n                                x_218609 = ((volatile __local\n                                             float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889) -\n                                                                          sext_i32_i64(skip_threads_228926)];\n                                x_218610 = ((volatile __local\n                                             float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889) -\n                                                                          sext_i32_i64(skip_threads_228926)];\n                                x_218611 = ((volatile __local\n                                             float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889) -\n                                                                          sext_i32_i64(skip_threads_228926)];\n                            }\n                        }\n               ",
                   "         // perform operation\n                        {\n                            bool inactive_228928 =\n                                 slt64(srem64(sext_i32_i64(local_tid_228889),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_228889) -\n                                       sext_i32_i64(local_tid_228889 -\n                                       skip_threads_228926));\n                            \n                            if (thread_active_228927 && inactive_228928) {\n                                x_218607 = x_218612;\n                                x_218608 = x_218613;\n                                x_218609 = x_218614;\n                                x_218610 = x_218615;\n                                x_218611 = x_218616;\n                            }\n                            if (thread_active_228927) {\n                                if (!inactive_228928) {\n                                    float defunc_1_op_res_218617 = x_218607 +\n                                          x_218612;\n                                    float defunc_1_op_res_218618 = x_218608 +\n                                          x_218613;\n                                    float defunc_1_op_res_218619 = x_218609 +\n                                          x_218614;\n                                    float defunc_1_op_res_218620 = x_218610 +\n                                          x_218615;\n                                    float defunc_1_op_res_218621 = x_218611 +\n                                          x_218616;\n                                    \n                                    x_218607 = defunc_1_op_res_218617;\n                                    x_218608 = defunc_1_op_res_218618;\n                                    x_218609 = defunc_1_op_res_218619;\n                                    x_218610 = defunc_1_op_res_218620;\n                                    x_218611 = defunc_1_op_res_218621",
                   ";\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_228891, skip_threads_228926)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_228927) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)] =\n                                    x_218607;\n                                x_218612 = x_218607;\n                                ((volatile __local\n                                  float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                                    x_218608;\n                                x_218613 = x_218608;\n                                ((volatile __local\n                                  float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)] =\n                                    x_218609;\n                                x_218614 = x_218609;\n                                ((volatile __local\n                                  float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                                    x_218610;\n                                x_218615 = x_218610;\n                                ((volatile __local\n                                  float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                                    x_218611;\n                                x_218616 = x_218611;\n                            }\n                        }\n                        if (sle32(wave_sizze_228891, skip_threads_228926)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_228926 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of",
                   " block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_228889 - squot32(local_tid_228889, 32) *\n                         32) == 31 && ltid_in_bounds_228925) {\n                        ((volatile __local\n                          float *) red_arr_mem_228893)[sext_i32_i64(squot32(local_tid_228889,\n                                                                            32))] =\n                            x_218607;\n                        ((volatile __local\n                          float *) red_arr_mem_228895)[sext_i32_i64(squot32(local_tid_228889,\n                                                                            32))] =\n                            x_218608;\n                        ((volatile __local\n                          float *) red_arr_mem_228897)[sext_i32_i64(squot32(local_tid_228889,\n                                                                            32))] =\n                            x_218609;\n                        ((volatile __local\n                          float *) red_arr_mem_228899)[sext_i32_i64(squot32(local_tid_228889,\n                                                                            32))] =\n                            x_218610;\n                        ((volatile __local\n                          float *) red_arr_mem_228901)[sext_i32_i64(squot32(local_tid_228889,\n                                                                            32))] =\n                            x_218611;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_228929;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_228889, 32) == 0 &&\n                            ltid_in_bounds_228925) {\n                            x_228915 = (",
                   "(volatile __local\n                                         float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)];\n                            x_228916 = ((volatile __local\n                                         float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)];\n                            x_228917 = ((volatile __local\n                                         float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)];\n                            x_228918 = ((volatile __local\n                                         float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)];\n                            x_228919 = ((volatile __local\n                                         float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)];\n                            if ((local_tid_228889 - squot32(local_tid_228889,\n                                                            32) * 32) == 0) {\n                                x_228910 = x_228915;\n                                x_228911 = x_228916;\n                                x_228912 = x_228917;\n                                x_228913 = x_228918;\n                                x_228914 = x_228919;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_228929 = 1;\n                        while (slt32(skip_threads_228929, 32)) {\n                            bool thread_active_228930 =\n                                 sle32(skip_threads_228929, local_tid_228889 -\n                                       squot32(local_tid_228889, 32) * 32) &&\n                                 (squot32(local_tid_228889, 32) == 0 &&\n                                  ltid_in_bounds_228925);\n                            \n                            if (thread_active_228930) {\n                                // read operands\n                                {\n                     ",
                   "               x_228910 = ((volatile __local\n                                                 float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889) -\n                                                                              sext_i32_i64(skip_threads_228929)];\n                                    x_228911 = ((volatile __local\n                                                 float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889) -\n                                                                              sext_i32_i64(skip_threads_228929)];\n                                    x_228912 = ((volatile __local\n                                                 float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889) -\n                                                                              sext_i32_i64(skip_threads_228929)];\n                                    x_228913 = ((volatile __local\n                                                 float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889) -\n                                                                              sext_i32_i64(skip_threads_228929)];\n                                    x_228914 = ((volatile __local\n                                                 float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889) -\n                                                                              sext_i32_i64(skip_threads_228929)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_228931 =\n                                     slt64(srem64(sext_i32_i64(local_tid_228889 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_228889 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_228889 -\n",
                   "                                                         skip_threads_228929) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_228930 && inactive_228931) {\n                                    x_228910 = x_228915;\n                                    x_228911 = x_228916;\n                                    x_228912 = x_228917;\n                                    x_228913 = x_228918;\n                                    x_228914 = x_228919;\n                                }\n                                if (thread_active_228930) {\n                                    if (!inactive_228931) {\n                                        float defunc_1_op_res_228920 =\n                                              x_228910 + x_228915;\n                                        float defunc_1_op_res_228921 =\n                                              x_228911 + x_228916;\n                                        float defunc_1_op_res_228922 =\n                                              x_228912 + x_228917;\n                                        float defunc_1_op_res_228923 =\n                                              x_228913 + x_228918;\n                                        float defunc_1_op_res_228924 =\n                                              x_228914 + x_228919;\n                                        \n                                        x_228910 = defunc_1_op_res_228920;\n                                        x_228911 = defunc_1_op_res_228921;\n                                        x_228912 = defunc_1_op_res_228922;\n                                        x_228913 = defunc_1_op_res_228923;\n                                        x_228914 = defunc_1_op_res_228924;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_228891, skip_threads_228929)) {\n                      ",
                   "          barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_228930) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)] =\n                                        x_228910;\n                                    x_228915 = x_228910;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                                        x_228911;\n                                    x_228916 = x_228911;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)] =\n                                        x_228912;\n                                    x_228917 = x_228912;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                                        x_228913;\n                                    x_228918 = x_228913;\n                                    ((volatile __local\n                                      float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                                        x_228914;\n                                    x_228919 = x_228914;\n                                }\n                            }\n                            if (sle32(wave_sizze_228891, skip_threads_228929)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_228929 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_228932 = squot32(local_t",
                   "id_228889, 32) == 0 ||\n                     !ltid_in_bounds_228925;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_228932) {\n                            x_218612 = x_218607;\n                            x_218613 = x_218608;\n                            x_218614 = x_218609;\n                            x_218615 = x_218610;\n                            x_218616 = x_218611;\n                            x_218607 = ((__local\n                                         float *) red_arr_mem_228893)[sext_i32_i64(squot32(local_tid_228889,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218608 = ((__local\n                                         float *) red_arr_mem_228895)[sext_i32_i64(squot32(local_tid_228889,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218609 = ((__local\n                                         float *) red_arr_mem_228897)[sext_i32_i64(squot32(local_tid_228889,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218610 = ((__local\n                                         float *) red_arr_mem_228899)[sext_i32_i64(squot32(local_tid_228889,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218611 = ((__local\n                                         float *) red_arr_mem_228901)[se",
                   "xt_i32_i64(squot32(local_tid_228889,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_228933 =\n                             slt64(srem64(sext_i32_i64(local_tid_228889),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_228889) -\n                                   sext_i32_i64(squot32(local_tid_228889, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_228932) {\n                            if (inactive_228933) {\n                                x_218607 = x_218612;\n                                x_218608 = x_218613;\n                                x_218609 = x_218614;\n                                x_218610 = x_218615;\n                                x_218611 = x_218616;\n                            }\n                        }\n                        if (!no_carry_in_228932) {\n                            if (!inactive_228933) {\n                                float defunc_1_op_res_218617 = x_218607 +\n                                      x_218612;\n                                float defunc_1_op_res_218618 = x_218608 +\n                                      x_218613;\n                                float defunc_1_op_res_218619 = x_218609 +\n                                      x_218614;\n                                float defunc_1_op_res_218620 = x_218610 +\n                                      x_218615;\n                                float defunc_1_op_res_218621 = x_218611 +\n                                      x_218616;\n                                \n                                x_218607 = defunc_1_op_res_218617;\n                                x_218608",
                   " = defunc_1_op_res_218618;\n                                x_218609 = defunc_1_op_res_218619;\n                                x_218610 = defunc_1_op_res_218620;\n                                x_218611 = defunc_1_op_res_218621;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_228932) {\n                            ((__local\n                              float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)] =\n                                x_218607;\n                            ((__local\n                              float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                                x_218608;\n                            ((__local\n                              float *) red_arr_mem_228897)[sext_i32_i64(local_tid_228889)] =\n                                x_218609;\n                            ((__local\n                              float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                                x_218610;\n                            ((__local\n                              float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                                x_218611;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_228889, 32) == 0 &&\n                        ltid_in_bounds_228925) {\n                        ((__local\n                          float *) red_arr_mem_228893)[sext_i32_i64(local_tid_228889)] =\n                            x_218612;\n                        ((__local\n                          float *) red_arr_mem_228895)[sext_i32_i64(local_tid_228889)] =\n                            x_218613;\n                        ((__local\n                          float *) red_arr_mem_228897)[sext",
                   "_i32_i64(local_tid_228889)] =\n                            x_218614;\n                        ((__local\n                          float *) red_arr_mem_228899)[sext_i32_i64(local_tid_228889)] =\n                            x_218615;\n                        ((__local\n                          float *) red_arr_mem_228901)[sext_i32_i64(local_tid_228889)] =\n                            x_218616;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_228905) *\n                      squot64(segred_group_sizze_218595,\n                              segment_sizze_nonzzero_228886) +\n                      sext_i32_i64(local_tid_228889), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_228889),\n                                             squot64(segred_group_sizze_218595,\n                                                     segment_sizze_nonzzero_228886))) {\n                float tmp_228934;\n                \n                tmp_228934 = ((__local\n                               float *) red_arr_mem_228893)[(sext_i32_i64(local_tid_228889) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228886 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224404)[squot64(sext_i32_i64(virt_group_id_228905) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_228886) +\n                                               sext_i32_i64(local_tid_228889),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_",
                   "group_id_228905) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_228886) +\n                                        sext_i32_i64(local_tid_228889) -\n                                        squot64(sext_i32_i64(virt_group_id_228905) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_228886) +\n                                                sext_i32_i64(local_tid_228889),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228934;\n                \n                float tmp_228935;\n                \n                tmp_228935 = ((__local\n                               float *) red_arr_mem_228895)[(sext_i32_i64(local_tid_228889) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228886 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224408)[squot64(sext_i32_i64(virt_group_id_228905) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_228886) +\n                                               sext_i32_i64(local_tid_228889),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228905) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_228886) +\n                                        sext_i32_i64(local_tid_228889) -\n                                        squot64(sext_i32_i64(virt_group_id_228905) *\n                              ",
                   "                  squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_228886) +\n                                                sext_i32_i64(local_tid_228889),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228935;\n                \n                float tmp_228936;\n                \n                tmp_228936 = ((__local\n                               float *) red_arr_mem_228897)[(sext_i32_i64(local_tid_228889) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228886 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224412)[squot64(sext_i32_i64(virt_group_id_228905) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_228886) +\n                                               sext_i32_i64(local_tid_228889),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228905) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_228886) +\n                                        sext_i32_i64(local_tid_228889) -\n                                        squot64(sext_i32_i64(virt_group_id_228905) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_228886) +\n                                                sext_i32_i64(local_tid_228889),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228936;\n                \n           ",
                   "     float tmp_228937;\n                \n                tmp_228937 = ((__local\n                               float *) red_arr_mem_228899)[(sext_i32_i64(local_tid_228889) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228886 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224416)[squot64(sext_i32_i64(virt_group_id_228905) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_228886) +\n                                               sext_i32_i64(local_tid_228889),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228905) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_228886) +\n                                        sext_i32_i64(local_tid_228889) -\n                                        squot64(sext_i32_i64(virt_group_id_228905) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_228886) +\n                                                sext_i32_i64(local_tid_228889),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228937;\n                \n                float tmp_228938;\n                \n                tmp_228938 = ((__local\n                               float *) red_arr_mem_228901)[(sext_i32_i64(local_tid_228889) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_228886 -\n                      ",
                   "                                      (int64_t) 1];\n                ((__global\n                  float *) mem_224420)[squot64(sext_i32_i64(virt_group_id_228905) *\n                                               squot64(segred_group_sizze_218595,\n                                                       segment_sizze_nonzzero_228886) +\n                                               sext_i32_i64(local_tid_228889),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_228905) *\n                                        squot64(segred_group_sizze_218595,\n                                                segment_sizze_nonzzero_228886) +\n                                        sext_i32_i64(local_tid_228889) -\n                                        squot64(sext_i32_i64(virt_group_id_228905) *\n                                                squot64(segred_group_sizze_218595,\n                                                        segment_sizze_nonzzero_228886) +\n                                                sext_i32_i64(local_tid_228889),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_228938;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_218595\n}\n__kernel void mainzisegred_small_218707(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_229033_backing_aligned_0,\n                                        __local volatile\n                                        int64_t *red_arr_mem_229031_backing_aligned_1,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t q_t_196696,\n                                        int64_t jump_t_196702,\n ",
                   "                                       int64_t t_n_m_196759, int64_t i_196779,\n                                        int64_t num_groups_218700,\n                                        int64_t segment_sizze_nonzzero_229024,\n                                        __global unsigned char *ext_mem_222256,\n                                        __global unsigned char *ext_mem_222257,\n                                        __global unsigned char *ext_mem_222517,\n                                        __global unsigned char *ext_mem_222518,\n                                        __global unsigned char *mem_224386,\n                                        __global unsigned char *mem_224390,\n                                        __global unsigned char *mem_224425,\n                                        __global unsigned char *mem_224429,\n                                        __global unsigned char *mem_224433,\n                                        __global unsigned char *mem_224437,\n                                        __global unsigned char *mem_224441,\n                                        __global unsigned char *mem_224446,\n                                        __global unsigned char *mem_224450)\n{\n    #define segred_group_sizze_218699 (mainzisegred_group_sizze_217915)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_229033_backing_1 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229033_backing_aligned_0;\n    __local volatile unsigned char *restrict red_arr_mem_229031_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229031_backing_aligned_1;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229026;\n    int32_t local_tid_229027;\n    int64_t group_sizze_229030;\n    int32_t w",
                   "ave_sizze_229029;\n    int32_t group_tid_229028;\n    \n    global_tid_229026 = get_global_id(0);\n    local_tid_229027 = get_local_id(0);\n    group_sizze_229030 = get_local_size(0);\n    wave_sizze_229029 = LOCKSTEP_WIDTH;\n    group_tid_229028 = get_group_id(0);\n    \n    int32_t phys_tid_218707 = global_tid_229026;\n    __local unsigned char *red_arr_mem_229031;\n    \n    red_arr_mem_229031 = (__local unsigned char *) red_arr_mem_229031_backing_0;\n    \n    __local unsigned char *red_arr_mem_229033;\n    \n    red_arr_mem_229033 = (__local unsigned char *) red_arr_mem_229033_backing_1;\n    \n    int32_t phys_group_id_229035;\n    \n    phys_group_id_229035 = get_group_id(0);\n    for (int32_t i_229036 = 0; i_229036 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691 * t_n_m_196759,\n                                          squot64(segred_group_sizze_218699,\n                                                  segment_sizze_nonzzero_229024))) -\n                   phys_group_id_229035, sext_i64_i32(num_groups_218700));\n         i_229036++) {\n        int32_t virt_group_id_229037 = phys_group_id_229035 + i_229036 *\n                sext_i64_i32(num_groups_218700);\n        int64_t slice_229038 = t_n_m_196759;\n        int64_t slice_229039 = m_196691 * slice_229038;\n        int64_t gtid_218704 = squot64(squot64(sext_i32_i64(local_tid_229027),\n                                              segment_sizze_nonzzero_229024) +\n                                      sext_i32_i64(virt_group_id_229037) *\n                                      squot64(segred_group_sizze_218699,\n                                              segment_sizze_nonzzero_229024),\n                                      slice_229038);\n        int64_t remnant_229040 = squot64(sext_i32_i64(local_tid_229027),\n                                         segment_sizze_nonzzero_229024) +\n                sext_i32_i64(virt_group_id_229037) *\n                squot64(segred_group_sizze_218699,\n                        segment_sizze_nonzzero_22",
                   "9024) - gtid_218704 *\n                slice_229038;\n        int64_t gtid_218705 = remnant_229040;\n        int64_t remnant_229041 = remnant_229040 - gtid_218705;\n        int64_t gtid_218706 = srem64(sext_i32_i64(local_tid_229027),\n                                     q_t_196696);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, q_t_196696) && ((slt64(gtid_218704,\n                                                          m_196691) &&\n                                                    slt64(gtid_218705,\n                                                          t_n_m_196759)) &&\n                                                   slt64(sext_i32_i64(local_tid_229027),\n                                                         q_t_196696 *\n                                                         squot64(segred_group_sizze_218699,\n                                                                 segment_sizze_nonzzero_229024)))) {\n                int64_t x_218715;\n                \n                x_218715 = ((__global int64_t *) ext_mem_222256)[gtid_218704];\n                \n                int64_t x_218726;\n                \n                x_218726 = ((__global int64_t *) ext_mem_222518)[gtid_218704 *\n                                                                 t_n_m_196759 +\n                                                                 gtid_218705];\n                \n                float x_218727;\n                \n                x_218727 = ((__global float *) ext_mem_222517)[gtid_218704 *\n                                                               t_n_m_196759 +\n                                                               gtid_218705];\n                \n                int64_t binop_y_221767 = mul64(jump_t_196702, gtid_218705);\n                int64_t binop_y_221768 = smin64(i_196779, binop_y_221767);\n                int64_t index_primexp_221769 = add64((int64_t) 1,\n                                                 ",
                   "    binop_y_221768);\n                float a12_218729;\n                \n                a12_218729 = ((__global float *) mem_224425)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float b12_218730;\n                \n                b12_218730 = ((__global float *) mem_224429)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float c12_218731;\n                \n                c12_218731 = ((__global float *) mem_224433)[gtid_218704 *\n                                                             t_n_m_196759 +\n                                                             gtid_218705];\n                \n                float b2_218732;\n                \n                b2_218732 = ((__global float *) mem_224437)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705];\n                \n                float c2_218733;\n                \n                c2_218733 = ((__global float *) mem_224441)[gtid_218704 *\n                                                            t_n_m_196759 +\n                                                            gtid_218705];\n                \n                bool cond_218735 = sle64(x_218715, gtid_218706);\n                int64_t defunc_0_f_res_218736;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218736 = (int64_t) 0;\n                } else {\n                    int64_t i_218737 = add64(gtid_218706, x_218726);\n                    int64_t defunc_0_add_arg_218738;\n                    \n                    defunc_0_add_arg_218738 = ((__global\n                                                int64_t *) ext_mem_2222",
                   "57)[gtid_218704 *\n                                                                           n_196692 +\n                                                                           i_218737];\n                    \n                    int64_t defunc_1_add_res_218739 = add64((int64_t) 1,\n                                                            defunc_0_add_arg_218738);\n                    \n                    defunc_0_f_res_218736 = defunc_1_add_res_218739;\n                }\n                \n                float defunc_0_f_res_218740;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218740 = 0.0F;\n                } else {\n                    int64_t i_218741 = add64(gtid_218706, x_218726);\n                    float defunc_0_add_arg_218742;\n                    \n                    defunc_0_add_arg_218742 = ((__global\n                                                float *) mem_224386)[gtid_218704 *\n                                                                     n_196692 +\n                                                                     i_218741];\n                    defunc_0_f_res_218740 = defunc_0_add_arg_218742;\n                }\n                \n                int64_t binop_p_218743 = sub64(defunc_0_f_res_218736,\n                                               index_primexp_221769);\n                float defunc_0_f_res_218744 = sitofp_i64_f32(binop_p_218743);\n                float abs_res_218745 = (float) fabs(defunc_0_f_res_218744);\n                float tmp1_218746 = abs_res_218745 / x_218727;\n                float x_218747 = tmp1_218746 * tmp1_218746;\n                float y_218748 = tmp1_218746 * x_218747;\n                float tmp2_218749 = 1.0F - y_218748;\n                float x_218750 = tmp2_218749 * tmp2_218749;\n                float tmp3_218751 = tmp2_218749 * x_218750;\n                float tmp4_218752 = defunc_0_f_res_218740 * tmp3_218751;\n                float defunc_1_f_res_218753 = defunc_0_f_res_218744 ",
                   "*\n                      tmp4_218752;\n                float defunc_1_f_res_218754 = defunc_0_f_res_218744 *\n                      defunc_1_f_res_218753;\n                float defunc_0_f_res_218755;\n                \n                if (cond_218735) {\n                    defunc_0_f_res_218755 = 0.0F;\n                } else {\n                    int64_t i_218756 = add64(gtid_218706, x_218726);\n                    float defunc_0_add_arg_218757;\n                    \n                    defunc_0_add_arg_218757 = ((__global\n                                                float *) mem_224390)[gtid_218704 *\n                                                                     n_196692 +\n                                                                     i_218756];\n                    defunc_0_f_res_218755 = defunc_0_add_arg_218757;\n                }\n                \n                float x_218758 = a12_218729 * tmp4_218752;\n                float y_218759 = b12_218730 * defunc_1_f_res_218753;\n                float x_218760 = x_218758 + y_218759;\n                float y_218761 = c12_218731 * defunc_1_f_res_218754;\n                float x_218762 = x_218760 + y_218761;\n                float defunc_9_fit_fun_res_218763 = defunc_0_f_res_218755 *\n                      x_218762;\n                float x_218764 = b12_218730 * tmp4_218752;\n                float y_218765 = b2_218732 * defunc_1_f_res_218753;\n                float x_218766 = x_218764 + y_218765;\n                float y_218767 = c2_218733 * defunc_1_f_res_218754;\n                float x_218768 = x_218766 + y_218767;\n                float defunc_9_slope_fun_res_218769 = defunc_0_f_res_218755 *\n                      x_218768;\n                \n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                        defunc_9_fit_fun_res_2187",
                   "63;\n                    ((__local\n                      float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                        defunc_9_slope_fun_res_218769;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                    0.0F;\n                ((__local\n                  float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        if (slt64((int64_t) 0, q_t_196696)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_218708;\n                float x_218709;\n                float x_218710;\n                float x_218711;\n                float x_229042;\n                float x_229043;\n                float x_229044;\n                float x_229045;\n                bool ltid_in_bounds_229048 =\n                     slt64(sext_i32_i64(local_tid_229027), q_t_196696 *\n                           squot64(segred_group_sizze_218699,\n                                   segment_sizze_nonzzero_229024));\n                int32_t skip_threads_229049;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_229048) {\n                        x_218710 = ((volatile __local\n                                     float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)];\n                        x_218711 = ((volatile __local\n                                     float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)];\n                        if ((local_tid_229027 - squot32(local_tid_229027, 32) *\n                             32) == 0) {\n                            x_218708 = x_218710;\n                            x_218709 = x_218711;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n     ",
                   "           {\n                    skip_threads_229049 = 1;\n                    while (slt32(skip_threads_229049, 32)) {\n                        bool thread_active_229050 = sle32(skip_threads_229049,\n                                                          local_tid_229027 -\n                                                          squot32(local_tid_229027,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_229048;\n                        \n                        if (thread_active_229050) {\n                            // read operands\n                            {\n                                x_218708 = ((volatile __local\n                                             float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027) -\n                                                                          sext_i32_i64(skip_threads_229049)];\n                                x_218709 = ((volatile __local\n                                             float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027) -\n                                                                          sext_i32_i64(skip_threads_229049)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229051 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229027),\n                                              q_t_196696),\n                                       sext_i32_i64(local_tid_229027) -\n                                       sext_i32_i64(local_tid_229027 -\n                                       skip_threads_229049));\n                            \n                            if (thread_active_229050 && inactive_229051) {\n                                x_218708 = x_218710;\n                                x_218709 = x_218711;\n                            }\n                            if (thread_a",
                   "ctive_229050) {\n                                if (!inactive_229051) {\n                                    float defunc_1_op_res_218712 = x_218708 +\n                                          x_218710;\n                                    float defunc_1_op_res_218713 = x_218709 +\n                                          x_218711;\n                                    \n                                    x_218708 = defunc_1_op_res_218712;\n                                    x_218709 = defunc_1_op_res_218713;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_229029, skip_threads_229049)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_229050) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                                    x_218708;\n                                x_218710 = x_218708;\n                                ((volatile __local\n                                  float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                                    x_218709;\n                                x_218711 = x_218709;\n                            }\n                        }\n                        if (sle32(wave_sizze_229029, skip_threads_229049)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229049 *= 2;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_229027 - squot32(local_tid_229027, 32) *\n                         32) == 31 && ltid_in_bounds_229048) {\n                        ((volati",
                   "le __local\n                          float *) red_arr_mem_229031)[sext_i32_i64(squot32(local_tid_229027,\n                                                                            32))] =\n                            x_218708;\n                        ((volatile __local\n                          float *) red_arr_mem_229033)[sext_i32_i64(squot32(local_tid_229027,\n                                                                            32))] =\n                            x_218709;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_229052;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_229027, 32) == 0 &&\n                            ltid_in_bounds_229048) {\n                            x_229044 = ((volatile __local\n                                         float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)];\n                            x_229045 = ((volatile __local\n                                         float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)];\n                            if ((local_tid_229027 - squot32(local_tid_229027,\n                                                            32) * 32) == 0) {\n                                x_229042 = x_229044;\n                                x_229043 = x_229045;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_229052 = 1;\n                        while (slt32(skip_threads_229052, 32)) {\n                            bool thread_active_229053 =\n                                 sle32(skip_threads_229052, local_tid_229027 -\n                                       squot32(l",
                   "ocal_tid_229027, 32) * 32) &&\n                                 (squot32(local_tid_229027, 32) == 0 &&\n                                  ltid_in_bounds_229048);\n                            \n                            if (thread_active_229053) {\n                                // read operands\n                                {\n                                    x_229042 = ((volatile __local\n                                                 float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027) -\n                                                                              sext_i32_i64(skip_threads_229052)];\n                                    x_229043 = ((volatile __local\n                                                 float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027) -\n                                                                              sext_i32_i64(skip_threads_229052)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_229054 =\n                                     slt64(srem64(sext_i32_i64(local_tid_229027 *\n                                                  32 + 32 - 1), q_t_196696),\n                                           sext_i32_i64(local_tid_229027 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_229027 -\n                                                         skip_threads_229052) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_229053 && inactive_229054) {\n                                    x_229042 = x_229044;\n                                    x_229043 = x_229045;\n                                }\n                                if (thread_active_229053) {\n                                    if (!inactive_229054) {\n      ",
                   "                                  float defunc_1_op_res_229046 =\n                                              x_229042 + x_229044;\n                                        float defunc_1_op_res_229047 =\n                                              x_229043 + x_229045;\n                                        \n                                        x_229042 = defunc_1_op_res_229046;\n                                        x_229043 = defunc_1_op_res_229047;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_229029, skip_threads_229052)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_229053) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                                        x_229042;\n                                    x_229044 = x_229042;\n                                    ((volatile __local\n                                      float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                                        x_229043;\n                                    x_229045 = x_229043;\n                                }\n                            }\n                            if (sle32(wave_sizze_229029, skip_threads_229052)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_229052 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_229055 = squot32(local_tid_229027, 32) == 0 ||\n                     !ltid_in_bounds_229048;\n                \n                // carry-in for every ",
                   "block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_229055) {\n                            x_218710 = x_218708;\n                            x_218711 = x_218709;\n                            x_218708 = ((__local\n                                         float *) red_arr_mem_229031)[sext_i32_i64(squot32(local_tid_229027,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                            x_218709 = ((__local\n                                         float *) red_arr_mem_229033)[sext_i32_i64(squot32(local_tid_229027,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229056 =\n                             slt64(srem64(sext_i32_i64(local_tid_229027),\n                                          q_t_196696),\n                                   sext_i32_i64(local_tid_229027) -\n                                   sext_i32_i64(squot32(local_tid_229027, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_229055) {\n                            if (inactive_229056) {\n                                x_218708 = x_218710;\n                                x_218709 = x_218711;\n                            }\n                        }\n                        if (!no_carry_in_229055) {\n                            if (!inactive_229056) {\n                                float defunc_1_op_res_218712 = x_218708 +\n                                      x_218710;\n                                float defunc_1_op_res_218713 = x_218709 +\n   ",
                   "                                   x_218711;\n                                \n                                x_218708 = defunc_1_op_res_218712;\n                                x_218709 = defunc_1_op_res_218713;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_229055) {\n                            ((__local\n                              float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                                x_218708;\n                            ((__local\n                              float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                                x_218709;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_229027, 32) == 0 &&\n                        ltid_in_bounds_229048) {\n                        ((__local\n                          float *) red_arr_mem_229031)[sext_i32_i64(local_tid_229027)] =\n                            x_218710;\n                        ((__local\n                          float *) red_arr_mem_229033)[sext_i32_i64(local_tid_229027)] =\n                            x_218711;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_229037) *\n                      squot64(segred_group_sizze_218699,\n                              segment_sizze_nonzzero_229024) +\n                      sext_i32_i64(local_tid_229027), m_196691 *\n                      t_n_m_196759) && slt64(sext_i32_i64(local_tid_229027),\n                                             squot64(segred_group_sizze_218699,\n                            ",
                   "                         segment_sizze_nonzzero_229024))) {\n                float tmp_229057;\n                \n                tmp_229057 = ((__local\n                               float *) red_arr_mem_229031)[(sext_i32_i64(local_tid_229027) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229024 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224446)[squot64(sext_i32_i64(virt_group_id_229037) *\n                                               squot64(segred_group_sizze_218699,\n                                                       segment_sizze_nonzzero_229024) +\n                                               sext_i32_i64(local_tid_229027),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229037) *\n                                        squot64(segred_group_sizze_218699,\n                                                segment_sizze_nonzzero_229024) +\n                                        sext_i32_i64(local_tid_229027) -\n                                        squot64(sext_i32_i64(virt_group_id_229037) *\n                                                squot64(segred_group_sizze_218699,\n                                                        segment_sizze_nonzzero_229024) +\n                                                sext_i32_i64(local_tid_229027),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229057;\n                \n                float tmp_229058;\n                \n                tmp_229058 = ((__local\n                               float *) red_arr_mem_229033)[(sext_i32_i64(local_tid_229027) +\n                                                             (int64_t) 1) *\n                                           ",
                   "                 segment_sizze_nonzzero_229024 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224450)[squot64(sext_i32_i64(virt_group_id_229037) *\n                                               squot64(segred_group_sizze_218699,\n                                                       segment_sizze_nonzzero_229024) +\n                                               sext_i32_i64(local_tid_229027),\n                                               t_n_m_196759) * t_n_m_196759 +\n                                       (sext_i32_i64(virt_group_id_229037) *\n                                        squot64(segred_group_sizze_218699,\n                                                segment_sizze_nonzzero_229024) +\n                                        sext_i32_i64(local_tid_229027) -\n                                        squot64(sext_i32_i64(virt_group_id_229037) *\n                                                squot64(segred_group_sizze_218699,\n                                                        segment_sizze_nonzzero_229024) +\n                                                sext_i32_i64(local_tid_229027),\n                                                t_n_m_196759) * t_n_m_196759)] =\n                    tmp_229058;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_218699\n}\n__kernel void mainzisegred_small_221141(__global int *global_failure,\n                                        __local volatile\n                                        int64_t *red_arr_mem_229552_backing_aligned_0,\n                                        int64_t m_196691, int64_t n_196692,\n                                        int64_t stl_res_196773,\n                                        int64_t j_m_i_197246,\n                                        int64_t num_groups_221136,\n    ",
                   "                                    int64_t segment_sizze_nonzzero_229545,\n                                        __global unsigned char *ext_mem_224882,\n                                        __global unsigned char *mem_224899)\n{\n    #define segred_group_sizze_221135 (mainzisegred_group_sizze_221118)\n    \n    const int block_dim0 = 0;\n    const int block_dim1 = 1;\n    const int block_dim2 = 2;\n    __local volatile unsigned char *restrict red_arr_mem_229552_backing_0 =\n                                   (__local volatile\n                                    unsigned char *) red_arr_mem_229552_backing_aligned_0;\n    \n    if (*global_failure >= 0)\n        return;\n    \n    int32_t global_tid_229547;\n    int32_t local_tid_229548;\n    int64_t group_sizze_229551;\n    int32_t wave_sizze_229550;\n    int32_t group_tid_229549;\n    \n    global_tid_229547 = get_global_id(0);\n    local_tid_229548 = get_local_id(0);\n    group_sizze_229551 = get_local_size(0);\n    wave_sizze_229550 = LOCKSTEP_WIDTH;\n    group_tid_229549 = get_group_id(0);\n    \n    int32_t phys_tid_221141 = global_tid_229547;\n    __local unsigned char *red_arr_mem_229552;\n    \n    red_arr_mem_229552 = (__local unsigned char *) red_arr_mem_229552_backing_0;\n    \n    int32_t phys_group_id_229554;\n    \n    phys_group_id_229554 = get_group_id(0);\n    for (int32_t i_229555 = 0; i_229555 <\n         sdiv_up32(sext_i64_i32(sdiv_up64(m_196691,\n                                          squot64(segred_group_sizze_221135,\n                                                  segment_sizze_nonzzero_229545))) -\n                   phys_group_id_229554, sext_i64_i32(num_groups_221136));\n         i_229555++) {\n        int32_t virt_group_id_229556 = phys_group_id_229554 + i_229555 *\n                sext_i64_i32(num_groups_221136);\n        int64_t slice_229557 = m_196691;\n        int64_t gtid_221139 = squot64(sext_i32_i64(local_tid_229548),\n                                      segment_sizze_nonzzero_229545) +\n                sext_i32_i",
                   "64(virt_group_id_229556) *\n                squot64(segred_group_sizze_221135,\n                        segment_sizze_nonzzero_229545);\n        int64_t remnant_229558 = squot64(sext_i32_i64(local_tid_229548),\n                                         segment_sizze_nonzzero_229545) +\n                sext_i32_i64(virt_group_id_229556) *\n                squot64(segred_group_sizze_221135,\n                        segment_sizze_nonzzero_229545) - gtid_221139;\n        int64_t gtid_221140 = srem64(sext_i32_i64(local_tid_229548),\n                                     j_m_i_197246);\n        \n        // apply map function if in bounds\n        {\n            if (slt64((int64_t) 0, j_m_i_197246) && (slt64(gtid_221139,\n                                                           m_196691) &&\n                                                     slt64(sext_i32_i64(local_tid_229548),\n                                                           j_m_i_197246 *\n                                                           squot64(segred_group_sizze_221135,\n                                                                   segment_sizze_nonzzero_229545)))) {\n                int64_t slice_221317 = stl_res_196773 + gtid_221140;\n                float x_221146;\n                \n                x_221146 = ((__global float *) ext_mem_224882)[gtid_221139 *\n                                                               n_196692 +\n                                                               slice_221317];\n                // save map-out results\n                { }\n                // save results to be reduced\n                {\n                    ((__local\n                      float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                        x_221146;\n                }\n            } else {\n                ((__local\n                  float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                    0.0F;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n  ",
                   "      if (slt64((int64_t) 0, j_m_i_197246)) {\n            // perform segmented scan to imitate reduction\n            {\n                float x_221142;\n                float x_221143;\n                float x_229559;\n                float x_229560;\n                bool ltid_in_bounds_229562 =\n                     slt64(sext_i32_i64(local_tid_229548), j_m_i_197246 *\n                           squot64(segred_group_sizze_221135,\n                                   segment_sizze_nonzzero_229545));\n                int32_t skip_threads_229563;\n                \n                // read input for in-block scan\n                {\n                    if (ltid_in_bounds_229562) {\n                        x_221143 = ((volatile __local\n                                     float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)];\n                        if ((local_tid_229548 - squot32(local_tid_229548, 32) *\n                             32) == 0) {\n                            x_221142 = x_221143;\n                        }\n                    }\n                }\n                // in-block scan (hopefully no barriers needed)\n                {\n                    skip_threads_229563 = 1;\n                    while (slt32(skip_threads_229563, 32)) {\n                        bool thread_active_229564 = sle32(skip_threads_229563,\n                                                          local_tid_229548 -\n                                                          squot32(local_tid_229548,\n                                                                  32) * 32) &&\n                             ltid_in_bounds_229562;\n                        \n                        if (thread_active_229564) {\n                            // read operands\n                            {\n                                x_221142 = ((volatile __local\n                                             float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548) -\n                                                          ",
                   "                sext_i32_i64(skip_threads_229563)];\n                            }\n                        }\n                        // perform operation\n                        {\n                            bool inactive_229565 =\n                                 slt64(srem64(sext_i32_i64(local_tid_229548),\n                                              j_m_i_197246),\n                                       sext_i32_i64(local_tid_229548) -\n                                       sext_i32_i64(local_tid_229548 -\n                                       skip_threads_229563));\n                            \n                            if (thread_active_229564 && inactive_229565) {\n                                x_221142 = x_221143;\n                            }\n                            if (thread_active_229564) {\n                                if (!inactive_229565) {\n                                    float defunc_1_op_res_221144 = x_221142 +\n                                          x_221143;\n                                    \n                                    x_221142 = defunc_1_op_res_221144;\n                                }\n                            }\n                        }\n                        if (sle32(wave_sizze_229550, skip_threads_229563)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        if (thread_active_229564) {\n                            // write result\n                            {\n                                ((volatile __local\n                                  float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                                    x_221142;\n                                x_221143 = x_221142;\n                            }\n                        }\n                        if (sle32(wave_sizze_229550, skip_threads_229563)) {\n                            barrier(CLK_LOCAL_MEM_FENCE);\n                        }\n                        skip_threads_229563 *= 2",
                   ";\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // last thread of block 'i' writes its result to offset 'i'\n                {\n                    if ((local_tid_229548 - squot32(local_tid_229548, 32) *\n                         32) == 31 && ltid_in_bounds_229562) {\n                        ((volatile __local\n                          float *) red_arr_mem_229552)[sext_i32_i64(squot32(local_tid_229548,\n                                                                            32))] =\n                            x_221142;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // scan the first block, after which offset 'i' contains carry-in for block 'i+1'\n                {\n                    int32_t skip_threads_229566;\n                    \n                    // read input for in-block scan\n                    {\n                        if (squot32(local_tid_229548, 32) == 0 &&\n                            ltid_in_bounds_229562) {\n                            x_229560 = ((volatile __local\n                                         float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)];\n                            if ((local_tid_229548 - squot32(local_tid_229548,\n                                                            32) * 32) == 0) {\n                                x_229559 = x_229560;\n                            }\n                        }\n                    }\n                    // in-block scan (hopefully no barriers needed)\n                    {\n                        skip_threads_229566 = 1;\n                        while (slt32(skip_threads_229566, 32)) {\n                            bool thread_active_229567 =\n                                 sle32(skip_threads_229566, local_tid_229548 -\n                                       squot32(local_tid_229548, 32) * 32) &&\n                                 (squot32(local_tid_229548, 32) == 0 &&\n                  ",
                   "                ltid_in_bounds_229562);\n                            \n                            if (thread_active_229567) {\n                                // read operands\n                                {\n                                    x_229559 = ((volatile __local\n                                                 float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548) -\n                                                                              sext_i32_i64(skip_threads_229566)];\n                                }\n                            }\n                            // perform operation\n                            {\n                                bool inactive_229568 =\n                                     slt64(srem64(sext_i32_i64(local_tid_229548 *\n                                                  32 + 32 - 1), j_m_i_197246),\n                                           sext_i32_i64(local_tid_229548 * 32 +\n                                           32 - 1) -\n                                           sext_i32_i64((local_tid_229548 -\n                                                         skip_threads_229566) *\n                                           32 + 32 - 1));\n                                \n                                if (thread_active_229567 && inactive_229568) {\n                                    x_229559 = x_229560;\n                                }\n                                if (thread_active_229567) {\n                                    if (!inactive_229568) {\n                                        float defunc_1_op_res_229561 =\n                                              x_229559 + x_229560;\n                                        \n                                        x_229559 = defunc_1_op_res_229561;\n                                    }\n                                }\n                            }\n                            if (sle32(wave_sizze_229550, skip_threads_229566)) {\n                                bar",
                   "rier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            if (thread_active_229567) {\n                                // write result\n                                {\n                                    ((volatile __local\n                                      float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                                        x_229559;\n                                    x_229560 = x_229559;\n                                }\n                            }\n                            if (sle32(wave_sizze_229550, skip_threads_229566)) {\n                                barrier(CLK_LOCAL_MEM_FENCE);\n                            }\n                            skip_threads_229566 *= 2;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                \n                bool no_carry_in_229569 = squot32(local_tid_229548, 32) == 0 ||\n                     !ltid_in_bounds_229562;\n                \n                // carry-in for every block except the first\n                {\n                    // read operands\n                    {\n                        if (!no_carry_in_229569) {\n                            x_221143 = x_221142;\n                            x_221142 = ((__local\n                                         float *) red_arr_mem_229552)[sext_i32_i64(squot32(local_tid_229548,\n                                                                                           32)) -\n                                                                      (int64_t) 1];\n                        }\n                    }\n                    // perform operation\n                    {\n                        bool inactive_229570 =\n                             slt64(srem64(sext_i32_i64(local_tid_229548),\n                                          j_m_i_197246),\n                                   sext_i32_i64(local_tid_229548) -\n                                   sext_i32_i",
                   "64(squot32(local_tid_229548, 32) *\n                                   32 - 1));\n                        \n                        if (!no_carry_in_229569) {\n                            if (inactive_229570) {\n                                x_221142 = x_221143;\n                            }\n                        }\n                        if (!no_carry_in_229569) {\n                            if (!inactive_229570) {\n                                float defunc_1_op_res_221144 = x_221142 +\n                                      x_221143;\n                                \n                                x_221142 = defunc_1_op_res_221144;\n                            }\n                        }\n                    }\n                    // write final result\n                    {\n                        if (!no_carry_in_229569) {\n                            ((__local\n                              float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                                x_221142;\n                        }\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n                // restore correct values for first block\n                {\n                    if (squot32(local_tid_229548, 32) == 0 &&\n                        ltid_in_bounds_229562) {\n                        ((__local\n                          float *) red_arr_mem_229552)[sext_i32_i64(local_tid_229548)] =\n                            x_221143;\n                    }\n                }\n                barrier(CLK_LOCAL_MEM_FENCE);\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        // save final values of segments\n        {\n            if (slt64(sext_i32_i64(virt_group_id_229556) *\n                      squot64(segred_group_sizze_221135,\n                              segment_sizze_nonzzero_229545) +\n                      sext_i32_i64(local_tid_229548), m_196691) &&\n                slt64(sext_i32_i64(local_tid_229548),\n                      squot64(segr",
                   "ed_group_sizze_221135,\n                              segment_sizze_nonzzero_229545))) {\n                float tmp_229571;\n                \n                tmp_229571 = ((__local\n                               float *) red_arr_mem_229552)[(sext_i32_i64(local_tid_229548) +\n                                                             (int64_t) 1) *\n                                                            segment_sizze_nonzzero_229545 -\n                                                            (int64_t) 1];\n                ((__global\n                  float *) mem_224899)[sext_i32_i64(virt_group_id_229556) *\n                                       squot64(segred_group_sizze_221135,\n                                               segment_sizze_nonzzero_229545) +\n                                       sext_i32_i64(local_tid_229548)] =\n                    tmp_229571;\n            }\n        }\n        barrier(CLK_LOCAL_MEM_FENCE);\n        barrier(CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE);\n    }\n    \n  error_1:\n    return;\n    #undef segred_group_sizze_221135\n}\n",
                   NULL};
static const char *tuning_param_names[] =
                  {"builtin#replicate_f32.group_size_225808",
                   "builtin#replicate_i64.group_size_225391",
                   "main.group_size_225409", "main.group_size_225568",
                   "main.group_size_227491", "main.group_size_227690",
                   "main.group_size_227940", "main.group_size_228318",
                   "main.group_size_228540", "main.group_size_228813",
                   "main.segmap_group_size_200008",
                   "main.segmap_group_size_200165",
                   "main.segmap_group_size_200433",
                   "main.segmap_group_size_201288",
                   "main.segmap_group_size_201527",
                   "main.segmap_group_size_201558",
                   "main.segmap_group_size_202290",
                   "main.segmap_group_size_202494",
                   "main.segmap_group_size_202520",
                   "main.segmap_group_size_202916",
                   "main.segmap_group_size_203120",
                   "main.segmap_group_size_203146",
                   "main.segmap_group_size_203319",
                   "main.segmap_group_size_203382",
                   "main.segmap_group_size_203524",
                   "main.segmap_group_size_203719",
                   "main.segmap_group_size_204054",
                   "main.segmap_group_size_204229",
                   "main.segmap_group_size_204315",
                   "main.segmap_group_size_205216",
                   "main.segmap_group_size_205472",
                   "main.segmap_group_size_205905",
                   "main.segmap_group_size_206137",
                   "main.segmap_group_size_206240",
                   "main.segmap_group_size_207389",
                   "main.segmap_group_size_207709",
                   "main.segmap_group_size_208250",
                   "main.segmap_group_size_208537",
                   "main.segmap_group_size_208667",
                   "main.segmap_group_size_211198",
                   "main.segmap_group_size_211594",
                   "main.segmap_group_size_211665",
                   "main.segmap_group_size_211796",
                   "main.segmap_group_size_211927",
                   "main.segmap_group_size_212058",
                   "main.segmap_group_size_212199",
                   "main.segmap_group_size_212330",
                   "main.segmap_group_size_212691",
                   "main.segmap_group_size_212891",
                   "main.segmap_group_size_213073",
                   "main.segmap_group_size_213556",
                   "main.segmap_group_size_213820",
                   "main.segmap_group_size_214051",
                   "main.segmap_group_size_215309",
                   "main.segmap_group_size_215496",
                   "main.segmap_group_size_215537",
                   "main.segmap_group_size_215726",
                   "main.segmap_group_size_215864",
                   "main.segmap_group_size_216063",
                   "main.segmap_group_size_216119",
                   "main.segmap_group_size_216379",
                   "main.segmap_group_size_216627",
                   "main.segmap_group_size_216816",
                   "main.segmap_group_size_217069",
                   "main.segmap_group_size_217125",
                   "main.segmap_group_size_217453",
                   "main.segmap_group_size_217765",
                   "main.segmap_group_size_218003",
                   "main.segmap_group_size_218323",
                   "main.segmap_group_size_218379",
                   "main.segmap_group_size_218869",
                   "main.segmap_group_size_218925",
                   "main.segmap_group_size_219181",
                   "main.segmap_group_size_219237",
                   "main.segmap_group_size_219585",
                   "main.segmap_group_size_219641",
                   "main.segmap_group_size_219854",
                   "main.segmap_group_size_220110",
                   "main.segmap_group_size_220153",
                   "main.segmap_group_size_220241",
                   "main.segmap_group_size_220642",
                   "main.segmap_group_size_221071",
                   "main.segmap_group_size_221106",
                   "main.segmap_group_size_221175",
                   "main.segmap_group_size_221275",
                   "main.segmap_num_groups_203526",
                   "main.segmap_num_groups_203721",
                   "main.segmap_num_groups_205218",
                   "main.segmap_num_groups_205474",
                   "main.segmap_num_groups_207391",
                   "main.segmap_num_groups_207711",
                   "main.segmap_num_groups_212060",
                   "main.segmap_num_groups_212693",
                   "main.segmap_num_groups_213558",
                   "main.segmap_num_groups_215539",
                   "main.segmap_num_groups_216381",
                   "main.segmap_num_groups_217455",
                   "main.segmap_num_groups_220243",
                   "main.segred_group_size_204157",
                   "main.segred_group_size_204259",
                   "main.segred_group_size_206043",
                   "main.segred_group_size_206176",
                   "main.segred_group_size_208426",
                   "main.segred_group_size_208595",
                   "main.segred_group_size_211691",
                   "main.segred_group_size_211822",
                   "main.segred_group_size_211953",
                   "main.segred_group_size_212276",
                   "main.segred_group_size_212343",
                   "main.segred_group_size_213001",
                   "main.segred_group_size_213095",
                   "main.segred_group_size_213966",
                   "main.segred_group_size_214092",
                   "main.segred_group_size_215807",
                   "main.segred_group_size_215877",
                   "main.segred_group_size_216741",
                   "main.segred_group_size_216838",
                   "main.segred_group_size_217915",
                   "main.segred_group_size_218044",
                   "main.segred_group_size_221118",
                   "main.segred_num_groups_204159",
                   "main.segred_num_groups_204261",
                   "main.segred_num_groups_206045",
                   "main.segred_num_groups_206178",
                   "main.segred_num_groups_208428",
                   "main.segred_num_groups_208597",
                   "main.segred_num_groups_211693",
                   "main.segred_num_groups_211824",
                   "main.segred_num_groups_211955",
                   "main.segred_num_groups_212278",
                   "main.segred_num_groups_212345",
                   "main.segred_num_groups_213003",
                   "main.segred_num_groups_213097",
                   "main.segred_num_groups_213968",
                   "main.segred_num_groups_214094",
                   "main.segred_num_groups_215809",
                   "main.segred_num_groups_215879",
                   "main.segred_num_groups_216743",
                   "main.segred_num_groups_216840",
                   "main.segred_num_groups_217917",
                   "main.segred_num_groups_218046",
                   "main.segred_num_groups_221120",
                   "main.segscan_group_size_200064",
                   "main.segscan_group_size_200502",
                   "main.segscan_group_size_211724",
                   "main.segscan_group_size_211855",
                   "main.segscan_group_size_211986",
                   "main.segscan_group_size_220690",
                   "main.segscan_num_groups_200066",
                   "main.segscan_num_groups_200504",
                   "main.segscan_num_groups_211726",
                   "main.segscan_num_groups_211857",
                   "main.segscan_num_groups_211988",
                   "main.segscan_num_groups_220692", "main.suff_intra_par_0",
                   "main.suff_intra_par_1", "main.suff_intra_par_13",
                   "main.suff_intra_par_17", "main.suff_intra_par_2",
                   "main.suff_intra_par_3", "main.suff_intra_par_34",
                   "main.suff_intra_par_36", "main.suff_intra_par_37",
                   "main.suff_intra_par_4", "main.suff_intra_par_5",
                   "main.suff_intra_par_6", "main.suff_intra_par_9",
                   "main.suff_outer_par_10", "main.suff_outer_par_11",
                   "main.suff_outer_par_12", "main.suff_outer_par_14",
                   "main.suff_outer_par_15", "main.suff_outer_par_16",
                   "main.suff_outer_par_18", "main.suff_outer_par_19",
                   "main.suff_outer_par_20", "main.suff_outer_par_21",
                   "main.suff_outer_par_22", "main.suff_outer_par_23",
                   "main.suff_outer_par_24", "main.suff_outer_par_25",
                   "main.suff_outer_par_26", "main.suff_outer_par_27",
                   "main.suff_outer_par_28", "main.suff_outer_par_29",
                   "main.suff_outer_par_30", "main.suff_outer_par_31",
                   "main.suff_outer_par_32", "main.suff_outer_par_33",
                   "main.suff_outer_par_35", "main.suff_outer_par_38",
                   "main.suff_outer_par_7", "main.suff_outer_par_8"};
static const char *tuning_param_vars[] =
                  {"builtinzhreplicate_f32zigroup_sizze_225808",
                   "builtinzhreplicate_i64zigroup_sizze_225391",
                   "mainzigroup_sizze_225409", "mainzigroup_sizze_225568",
                   "mainzigroup_sizze_227491", "mainzigroup_sizze_227690",
                   "mainzigroup_sizze_227940", "mainzigroup_sizze_228318",
                   "mainzigroup_sizze_228540", "mainzigroup_sizze_228813",
                   "mainzisegmap_group_sizze_200008",
                   "mainzisegmap_group_sizze_200165",
                   "mainzisegmap_group_sizze_200433",
                   "mainzisegmap_group_sizze_201288",
                   "mainzisegmap_group_sizze_201527",
                   "mainzisegmap_group_sizze_201558",
                   "mainzisegmap_group_sizze_202290",
                   "mainzisegmap_group_sizze_202494",
                   "mainzisegmap_group_sizze_202520",
                   "mainzisegmap_group_sizze_202916",
                   "mainzisegmap_group_sizze_203120",
                   "mainzisegmap_group_sizze_203146",
                   "mainzisegmap_group_sizze_203319",
                   "mainzisegmap_group_sizze_203382",
                   "mainzisegmap_group_sizze_203524",
                   "mainzisegmap_group_sizze_203719",
                   "mainzisegmap_group_sizze_204054",
                   "mainzisegmap_group_sizze_204229",
                   "mainzisegmap_group_sizze_204315",
                   "mainzisegmap_group_sizze_205216",
                   "mainzisegmap_group_sizze_205472",
                   "mainzisegmap_group_sizze_205905",
                   "mainzisegmap_group_sizze_206137",
                   "mainzisegmap_group_sizze_206240",
                   "mainzisegmap_group_sizze_207389",
                   "mainzisegmap_group_sizze_207709",
                   "mainzisegmap_group_sizze_208250",
                   "mainzisegmap_group_sizze_208537",
                   "mainzisegmap_group_sizze_208667",
                   "mainzisegmap_group_sizze_211198",
                   "mainzisegmap_group_sizze_211594",
                   "mainzisegmap_group_sizze_211665",
                   "mainzisegmap_group_sizze_211796",
                   "mainzisegmap_group_sizze_211927",
                   "mainzisegmap_group_sizze_212058",
                   "mainzisegmap_group_sizze_212199",
                   "mainzisegmap_group_sizze_212330",
                   "mainzisegmap_group_sizze_212691",
                   "mainzisegmap_group_sizze_212891",
                   "mainzisegmap_group_sizze_213073",
                   "mainzisegmap_group_sizze_213556",
                   "mainzisegmap_group_sizze_213820",
                   "mainzisegmap_group_sizze_214051",
                   "mainzisegmap_group_sizze_215309",
                   "mainzisegmap_group_sizze_215496",
                   "mainzisegmap_group_sizze_215537",
                   "mainzisegmap_group_sizze_215726",
                   "mainzisegmap_group_sizze_215864",
                   "mainzisegmap_group_sizze_216063",
                   "mainzisegmap_group_sizze_216119",
                   "mainzisegmap_group_sizze_216379",
                   "mainzisegmap_group_sizze_216627",
                   "mainzisegmap_group_sizze_216816",
                   "mainzisegmap_group_sizze_217069",
                   "mainzisegmap_group_sizze_217125",
                   "mainzisegmap_group_sizze_217453",
                   "mainzisegmap_group_sizze_217765",
                   "mainzisegmap_group_sizze_218003",
                   "mainzisegmap_group_sizze_218323",
                   "mainzisegmap_group_sizze_218379",
                   "mainzisegmap_group_sizze_218869",
                   "mainzisegmap_group_sizze_218925",
                   "mainzisegmap_group_sizze_219181",
                   "mainzisegmap_group_sizze_219237",
                   "mainzisegmap_group_sizze_219585",
                   "mainzisegmap_group_sizze_219641",
                   "mainzisegmap_group_sizze_219854",
                   "mainzisegmap_group_sizze_220110",
                   "mainzisegmap_group_sizze_220153",
                   "mainzisegmap_group_sizze_220241",
                   "mainzisegmap_group_sizze_220642",
                   "mainzisegmap_group_sizze_221071",
                   "mainzisegmap_group_sizze_221106",
                   "mainzisegmap_group_sizze_221175",
                   "mainzisegmap_group_sizze_221275",
                   "mainzisegmap_num_groups_203526",
                   "mainzisegmap_num_groups_203721",
                   "mainzisegmap_num_groups_205218",
                   "mainzisegmap_num_groups_205474",
                   "mainzisegmap_num_groups_207391",
                   "mainzisegmap_num_groups_207711",
                   "mainzisegmap_num_groups_212060",
                   "mainzisegmap_num_groups_212693",
                   "mainzisegmap_num_groups_213558",
                   "mainzisegmap_num_groups_215539",
                   "mainzisegmap_num_groups_216381",
                   "mainzisegmap_num_groups_217455",
                   "mainzisegmap_num_groups_220243",
                   "mainzisegred_group_sizze_204157",
                   "mainzisegred_group_sizze_204259",
                   "mainzisegred_group_sizze_206043",
                   "mainzisegred_group_sizze_206176",
                   "mainzisegred_group_sizze_208426",
                   "mainzisegred_group_sizze_208595",
                   "mainzisegred_group_sizze_211691",
                   "mainzisegred_group_sizze_211822",
                   "mainzisegred_group_sizze_211953",
                   "mainzisegred_group_sizze_212276",
                   "mainzisegred_group_sizze_212343",
                   "mainzisegred_group_sizze_213001",
                   "mainzisegred_group_sizze_213095",
                   "mainzisegred_group_sizze_213966",
                   "mainzisegred_group_sizze_214092",
                   "mainzisegred_group_sizze_215807",
                   "mainzisegred_group_sizze_215877",
                   "mainzisegred_group_sizze_216741",
                   "mainzisegred_group_sizze_216838",
                   "mainzisegred_group_sizze_217915",
                   "mainzisegred_group_sizze_218044",
                   "mainzisegred_group_sizze_221118",
                   "mainzisegred_num_groups_204159",
                   "mainzisegred_num_groups_204261",
                   "mainzisegred_num_groups_206045",
                   "mainzisegred_num_groups_206178",
                   "mainzisegred_num_groups_208428",
                   "mainzisegred_num_groups_208597",
                   "mainzisegred_num_groups_211693",
                   "mainzisegred_num_groups_211824",
                   "mainzisegred_num_groups_211955",
                   "mainzisegred_num_groups_212278",
                   "mainzisegred_num_groups_212345",
                   "mainzisegred_num_groups_213003",
                   "mainzisegred_num_groups_213097",
                   "mainzisegred_num_groups_213968",
                   "mainzisegred_num_groups_214094",
                   "mainzisegred_num_groups_215809",
                   "mainzisegred_num_groups_215879",
                   "mainzisegred_num_groups_216743",
                   "mainzisegred_num_groups_216840",
                   "mainzisegred_num_groups_217917",
                   "mainzisegred_num_groups_218046",
                   "mainzisegred_num_groups_221120",
                   "mainzisegscan_group_sizze_200064",
                   "mainzisegscan_group_sizze_200502",
                   "mainzisegscan_group_sizze_211724",
                   "mainzisegscan_group_sizze_211855",
                   "mainzisegscan_group_sizze_211986",
                   "mainzisegscan_group_sizze_220690",
                   "mainzisegscan_num_groups_200066",
                   "mainzisegscan_num_groups_200504",
                   "mainzisegscan_num_groups_211726",
                   "mainzisegscan_num_groups_211857",
                   "mainzisegscan_num_groups_211988",
                   "mainzisegscan_num_groups_220692", "mainzisuff_intra_par_0",
                   "mainzisuff_intra_par_1", "mainzisuff_intra_par_13",
                   "mainzisuff_intra_par_17", "mainzisuff_intra_par_2",
                   "mainzisuff_intra_par_3", "mainzisuff_intra_par_34",
                   "mainzisuff_intra_par_36", "mainzisuff_intra_par_37",
                   "mainzisuff_intra_par_4", "mainzisuff_intra_par_5",
                   "mainzisuff_intra_par_6", "mainzisuff_intra_par_9",
                   "mainzisuff_outer_par_10", "mainzisuff_outer_par_11",
                   "mainzisuff_outer_par_12", "mainzisuff_outer_par_14",
                   "mainzisuff_outer_par_15", "mainzisuff_outer_par_16",
                   "mainzisuff_outer_par_18", "mainzisuff_outer_par_19",
                   "mainzisuff_outer_par_20", "mainzisuff_outer_par_21",
                   "mainzisuff_outer_par_22", "mainzisuff_outer_par_23",
                   "mainzisuff_outer_par_24", "mainzisuff_outer_par_25",
                   "mainzisuff_outer_par_26", "mainzisuff_outer_par_27",
                   "mainzisuff_outer_par_28", "mainzisuff_outer_par_29",
                   "mainzisuff_outer_par_30", "mainzisuff_outer_par_31",
                   "mainzisuff_outer_par_32", "mainzisuff_outer_par_33",
                   "mainzisuff_outer_par_35", "mainzisuff_outer_par_38",
                   "mainzisuff_outer_par_7", "mainzisuff_outer_par_8"};
static const char *tuning_param_classes[] = {"group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "group_size", "group_size",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "num_groups", "num_groups",
                                             "threshold(32,)", "threshold(32,)",
                                             "threshold(32, !main.suff_outer_par_12 !main.suff_outer_par_11)",
                                             "threshold(32, !main.suff_outer_par_16 !main.suff_outer_par_15)",
                                             "threshold(32, !main.suff_intra_par_1)",
                                             "threshold(32,)", "threshold(32,)",
                                             "threshold(32, !main.suff_outer_par_35)",
                                             "threshold(32, !main.suff_outer_par_35 !main.suff_intra_par_36)",
                                             "threshold(32, !main.suff_intra_par_3)",
                                             "threshold(32,)", "threshold(32,)",
                                             "threshold(32, !main.suff_outer_par_8 !main.suff_outer_par_7)",
                                             "threshold(def, !main.suff_outer_par_8 !main.suff_intra_par_9 !main.suff_outer_par_7)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_11)",
                                             "threshold(def, !main.suff_outer_par_12 !main.suff_intra_par_13 !main.suff_outer_par_11)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_15)",
                                             "threshold(def, !main.suff_outer_par_16 !main.suff_intra_par_17 !main.suff_outer_par_15)",
                                             "threshold(def,)",
                                             "threshold(def,)",
                                             "threshold(def,)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_22)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_24)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_26)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_28)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_30)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_32)",
                                             "threshold(def,)",
                                             "threshold(def,)",
                                             "threshold(def,)",
                                             "threshold(def, !main.suff_outer_par_7)"};
struct tuning_params {
    int64_t *builtinzhreplicate_f32zigroup_sizze_225808;
    int64_t *builtinzhreplicate_i64zigroup_sizze_225391;
    int64_t *mainzigroup_sizze_225409;
    int64_t *mainzigroup_sizze_225568;
    int64_t *mainzigroup_sizze_227491;
    int64_t *mainzigroup_sizze_227690;
    int64_t *mainzigroup_sizze_227940;
    int64_t *mainzigroup_sizze_228318;
    int64_t *mainzigroup_sizze_228540;
    int64_t *mainzigroup_sizze_228813;
    int64_t *mainzisegmap_group_sizze_200008;
    int64_t *mainzisegmap_group_sizze_200165;
    int64_t *mainzisegmap_group_sizze_200433;
    int64_t *mainzisegmap_group_sizze_201288;
    int64_t *mainzisegmap_group_sizze_201527;
    int64_t *mainzisegmap_group_sizze_201558;
    int64_t *mainzisegmap_group_sizze_202290;
    int64_t *mainzisegmap_group_sizze_202494;
    int64_t *mainzisegmap_group_sizze_202520;
    int64_t *mainzisegmap_group_sizze_202916;
    int64_t *mainzisegmap_group_sizze_203120;
    int64_t *mainzisegmap_group_sizze_203146;
    int64_t *mainzisegmap_group_sizze_203319;
    int64_t *mainzisegmap_group_sizze_203382;
    int64_t *mainzisegmap_group_sizze_203524;
    int64_t *mainzisegmap_group_sizze_203719;
    int64_t *mainzisegmap_group_sizze_204054;
    int64_t *mainzisegmap_group_sizze_204229;
    int64_t *mainzisegmap_group_sizze_204315;
    int64_t *mainzisegmap_group_sizze_205216;
    int64_t *mainzisegmap_group_sizze_205472;
    int64_t *mainzisegmap_group_sizze_205905;
    int64_t *mainzisegmap_group_sizze_206137;
    int64_t *mainzisegmap_group_sizze_206240;
    int64_t *mainzisegmap_group_sizze_207389;
    int64_t *mainzisegmap_group_sizze_207709;
    int64_t *mainzisegmap_group_sizze_208250;
    int64_t *mainzisegmap_group_sizze_208537;
    int64_t *mainzisegmap_group_sizze_208667;
    int64_t *mainzisegmap_group_sizze_211198;
    int64_t *mainzisegmap_group_sizze_211594;
    int64_t *mainzisegmap_group_sizze_211665;
    int64_t *mainzisegmap_group_sizze_211796;
    int64_t *mainzisegmap_group_sizze_211927;
    int64_t *mainzisegmap_group_sizze_212058;
    int64_t *mainzisegmap_group_sizze_212199;
    int64_t *mainzisegmap_group_sizze_212330;
    int64_t *mainzisegmap_group_sizze_212691;
    int64_t *mainzisegmap_group_sizze_212891;
    int64_t *mainzisegmap_group_sizze_213073;
    int64_t *mainzisegmap_group_sizze_213556;
    int64_t *mainzisegmap_group_sizze_213820;
    int64_t *mainzisegmap_group_sizze_214051;
    int64_t *mainzisegmap_group_sizze_215309;
    int64_t *mainzisegmap_group_sizze_215496;
    int64_t *mainzisegmap_group_sizze_215537;
    int64_t *mainzisegmap_group_sizze_215726;
    int64_t *mainzisegmap_group_sizze_215864;
    int64_t *mainzisegmap_group_sizze_216063;
    int64_t *mainzisegmap_group_sizze_216119;
    int64_t *mainzisegmap_group_sizze_216379;
    int64_t *mainzisegmap_group_sizze_216627;
    int64_t *mainzisegmap_group_sizze_216816;
    int64_t *mainzisegmap_group_sizze_217069;
    int64_t *mainzisegmap_group_sizze_217125;
    int64_t *mainzisegmap_group_sizze_217453;
    int64_t *mainzisegmap_group_sizze_217765;
    int64_t *mainzisegmap_group_sizze_218003;
    int64_t *mainzisegmap_group_sizze_218323;
    int64_t *mainzisegmap_group_sizze_218379;
    int64_t *mainzisegmap_group_sizze_218869;
    int64_t *mainzisegmap_group_sizze_218925;
    int64_t *mainzisegmap_group_sizze_219181;
    int64_t *mainzisegmap_group_sizze_219237;
    int64_t *mainzisegmap_group_sizze_219585;
    int64_t *mainzisegmap_group_sizze_219641;
    int64_t *mainzisegmap_group_sizze_219854;
    int64_t *mainzisegmap_group_sizze_220110;
    int64_t *mainzisegmap_group_sizze_220153;
    int64_t *mainzisegmap_group_sizze_220241;
    int64_t *mainzisegmap_group_sizze_220642;
    int64_t *mainzisegmap_group_sizze_221071;
    int64_t *mainzisegmap_group_sizze_221106;
    int64_t *mainzisegmap_group_sizze_221175;
    int64_t *mainzisegmap_group_sizze_221275;
    int64_t *mainzisegmap_num_groups_203526;
    int64_t *mainzisegmap_num_groups_203721;
    int64_t *mainzisegmap_num_groups_205218;
    int64_t *mainzisegmap_num_groups_205474;
    int64_t *mainzisegmap_num_groups_207391;
    int64_t *mainzisegmap_num_groups_207711;
    int64_t *mainzisegmap_num_groups_212060;
    int64_t *mainzisegmap_num_groups_212693;
    int64_t *mainzisegmap_num_groups_213558;
    int64_t *mainzisegmap_num_groups_215539;
    int64_t *mainzisegmap_num_groups_216381;
    int64_t *mainzisegmap_num_groups_217455;
    int64_t *mainzisegmap_num_groups_220243;
    int64_t *mainzisegred_group_sizze_204157;
    int64_t *mainzisegred_group_sizze_204259;
    int64_t *mainzisegred_group_sizze_206043;
    int64_t *mainzisegred_group_sizze_206176;
    int64_t *mainzisegred_group_sizze_208426;
    int64_t *mainzisegred_group_sizze_208595;
    int64_t *mainzisegred_group_sizze_211691;
    int64_t *mainzisegred_group_sizze_211822;
    int64_t *mainzisegred_group_sizze_211953;
    int64_t *mainzisegred_group_sizze_212276;
    int64_t *mainzisegred_group_sizze_212343;
    int64_t *mainzisegred_group_sizze_213001;
    int64_t *mainzisegred_group_sizze_213095;
    int64_t *mainzisegred_group_sizze_213966;
    int64_t *mainzisegred_group_sizze_214092;
    int64_t *mainzisegred_group_sizze_215807;
    int64_t *mainzisegred_group_sizze_215877;
    int64_t *mainzisegred_group_sizze_216741;
    int64_t *mainzisegred_group_sizze_216838;
    int64_t *mainzisegred_group_sizze_217915;
    int64_t *mainzisegred_group_sizze_218044;
    int64_t *mainzisegred_group_sizze_221118;
    int64_t *mainzisegred_num_groups_204159;
    int64_t *mainzisegred_num_groups_204261;
    int64_t *mainzisegred_num_groups_206045;
    int64_t *mainzisegred_num_groups_206178;
    int64_t *mainzisegred_num_groups_208428;
    int64_t *mainzisegred_num_groups_208597;
    int64_t *mainzisegred_num_groups_211693;
    int64_t *mainzisegred_num_groups_211824;
    int64_t *mainzisegred_num_groups_211955;
    int64_t *mainzisegred_num_groups_212278;
    int64_t *mainzisegred_num_groups_212345;
    int64_t *mainzisegred_num_groups_213003;
    int64_t *mainzisegred_num_groups_213097;
    int64_t *mainzisegred_num_groups_213968;
    int64_t *mainzisegred_num_groups_214094;
    int64_t *mainzisegred_num_groups_215809;
    int64_t *mainzisegred_num_groups_215879;
    int64_t *mainzisegred_num_groups_216743;
    int64_t *mainzisegred_num_groups_216840;
    int64_t *mainzisegred_num_groups_217917;
    int64_t *mainzisegred_num_groups_218046;
    int64_t *mainzisegred_num_groups_221120;
    int64_t *mainzisegscan_group_sizze_200064;
    int64_t *mainzisegscan_group_sizze_200502;
    int64_t *mainzisegscan_group_sizze_211724;
    int64_t *mainzisegscan_group_sizze_211855;
    int64_t *mainzisegscan_group_sizze_211986;
    int64_t *mainzisegscan_group_sizze_220690;
    int64_t *mainzisegscan_num_groups_200066;
    int64_t *mainzisegscan_num_groups_200504;
    int64_t *mainzisegscan_num_groups_211726;
    int64_t *mainzisegscan_num_groups_211857;
    int64_t *mainzisegscan_num_groups_211988;
    int64_t *mainzisegscan_num_groups_220692;
    int64_t *mainzisuff_intra_par_0;
    int64_t *mainzisuff_intra_par_1;
    int64_t *mainzisuff_intra_par_13;
    int64_t *mainzisuff_intra_par_17;
    int64_t *mainzisuff_intra_par_2;
    int64_t *mainzisuff_intra_par_3;
    int64_t *mainzisuff_intra_par_34;
    int64_t *mainzisuff_intra_par_36;
    int64_t *mainzisuff_intra_par_37;
    int64_t *mainzisuff_intra_par_4;
    int64_t *mainzisuff_intra_par_5;
    int64_t *mainzisuff_intra_par_6;
    int64_t *mainzisuff_intra_par_9;
    int64_t *mainzisuff_outer_par_10;
    int64_t *mainzisuff_outer_par_11;
    int64_t *mainzisuff_outer_par_12;
    int64_t *mainzisuff_outer_par_14;
    int64_t *mainzisuff_outer_par_15;
    int64_t *mainzisuff_outer_par_16;
    int64_t *mainzisuff_outer_par_18;
    int64_t *mainzisuff_outer_par_19;
    int64_t *mainzisuff_outer_par_20;
    int64_t *mainzisuff_outer_par_21;
    int64_t *mainzisuff_outer_par_22;
    int64_t *mainzisuff_outer_par_23;
    int64_t *mainzisuff_outer_par_24;
    int64_t *mainzisuff_outer_par_25;
    int64_t *mainzisuff_outer_par_26;
    int64_t *mainzisuff_outer_par_27;
    int64_t *mainzisuff_outer_par_28;
    int64_t *mainzisuff_outer_par_29;
    int64_t *mainzisuff_outer_par_30;
    int64_t *mainzisuff_outer_par_31;
    int64_t *mainzisuff_outer_par_32;
    int64_t *mainzisuff_outer_par_33;
    int64_t *mainzisuff_outer_par_35;
    int64_t *mainzisuff_outer_par_38;
    int64_t *mainzisuff_outer_par_7;
    int64_t *mainzisuff_outer_par_8;
};
struct futhark_context_config {
    int in_use;
    struct opencl_config opencl;
    int64_t tuning_params[193];
    int num_build_opts;
    const char **build_opts;
};
struct futhark_context_config *futhark_context_config_new(void)
{
    struct futhark_context_config *cfg =
                                  (struct futhark_context_config *) malloc(sizeof(struct futhark_context_config));
    
    if (cfg == NULL)
        return NULL;
    cfg->in_use = 0;
    cfg->num_build_opts = 0;
    cfg->build_opts = (const char **) malloc(sizeof(const char *));
    cfg->build_opts[0] = NULL;
    cfg->tuning_params[0] = 0;
    cfg->tuning_params[1] = 0;
    cfg->tuning_params[2] = 0;
    cfg->tuning_params[3] = 0;
    cfg->tuning_params[4] = 0;
    cfg->tuning_params[5] = 0;
    cfg->tuning_params[6] = 0;
    cfg->tuning_params[7] = 0;
    cfg->tuning_params[8] = 0;
    cfg->tuning_params[9] = 0;
    cfg->tuning_params[10] = 0;
    cfg->tuning_params[11] = 0;
    cfg->tuning_params[12] = 0;
    cfg->tuning_params[13] = 0;
    cfg->tuning_params[14] = 0;
    cfg->tuning_params[15] = 0;
    cfg->tuning_params[16] = 0;
    cfg->tuning_params[17] = 0;
    cfg->tuning_params[18] = 0;
    cfg->tuning_params[19] = 0;
    cfg->tuning_params[20] = 0;
    cfg->tuning_params[21] = 0;
    cfg->tuning_params[22] = 0;
    cfg->tuning_params[23] = 0;
    cfg->tuning_params[24] = 0;
    cfg->tuning_params[25] = 0;
    cfg->tuning_params[26] = 0;
    cfg->tuning_params[27] = 0;
    cfg->tuning_params[28] = 0;
    cfg->tuning_params[29] = 0;
    cfg->tuning_params[30] = 0;
    cfg->tuning_params[31] = 0;
    cfg->tuning_params[32] = 0;
    cfg->tuning_params[33] = 0;
    cfg->tuning_params[34] = 0;
    cfg->tuning_params[35] = 0;
    cfg->tuning_params[36] = 0;
    cfg->tuning_params[37] = 0;
    cfg->tuning_params[38] = 0;
    cfg->tuning_params[39] = 0;
    cfg->tuning_params[40] = 0;
    cfg->tuning_params[41] = 0;
    cfg->tuning_params[42] = 0;
    cfg->tuning_params[43] = 0;
    cfg->tuning_params[44] = 0;
    cfg->tuning_params[45] = 0;
    cfg->tuning_params[46] = 0;
    cfg->tuning_params[47] = 0;
    cfg->tuning_params[48] = 0;
    cfg->tuning_params[49] = 0;
    cfg->tuning_params[50] = 0;
    cfg->tuning_params[51] = 0;
    cfg->tuning_params[52] = 0;
    cfg->tuning_params[53] = 0;
    cfg->tuning_params[54] = 0;
    cfg->tuning_params[55] = 0;
    cfg->tuning_params[56] = 0;
    cfg->tuning_params[57] = 0;
    cfg->tuning_params[58] = 0;
    cfg->tuning_params[59] = 0;
    cfg->tuning_params[60] = 0;
    cfg->tuning_params[61] = 0;
    cfg->tuning_params[62] = 0;
    cfg->tuning_params[63] = 0;
    cfg->tuning_params[64] = 0;
    cfg->tuning_params[65] = 0;
    cfg->tuning_params[66] = 0;
    cfg->tuning_params[67] = 0;
    cfg->tuning_params[68] = 0;
    cfg->tuning_params[69] = 0;
    cfg->tuning_params[70] = 0;
    cfg->tuning_params[71] = 0;
    cfg->tuning_params[72] = 0;
    cfg->tuning_params[73] = 0;
    cfg->tuning_params[74] = 0;
    cfg->tuning_params[75] = 0;
    cfg->tuning_params[76] = 0;
    cfg->tuning_params[77] = 0;
    cfg->tuning_params[78] = 0;
    cfg->tuning_params[79] = 0;
    cfg->tuning_params[80] = 0;
    cfg->tuning_params[81] = 0;
    cfg->tuning_params[82] = 0;
    cfg->tuning_params[83] = 0;
    cfg->tuning_params[84] = 0;
    cfg->tuning_params[85] = 0;
    cfg->tuning_params[86] = 0;
    cfg->tuning_params[87] = 0;
    cfg->tuning_params[88] = 0;
    cfg->tuning_params[89] = 0;
    cfg->tuning_params[90] = 0;
    cfg->tuning_params[91] = 0;
    cfg->tuning_params[92] = 0;
    cfg->tuning_params[93] = 0;
    cfg->tuning_params[94] = 0;
    cfg->tuning_params[95] = 0;
    cfg->tuning_params[96] = 0;
    cfg->tuning_params[97] = 0;
    cfg->tuning_params[98] = 0;
    cfg->tuning_params[99] = 0;
    cfg->tuning_params[100] = 0;
    cfg->tuning_params[101] = 0;
    cfg->tuning_params[102] = 0;
    cfg->tuning_params[103] = 0;
    cfg->tuning_params[104] = 0;
    cfg->tuning_params[105] = 0;
    cfg->tuning_params[106] = 0;
    cfg->tuning_params[107] = 0;
    cfg->tuning_params[108] = 0;
    cfg->tuning_params[109] = 0;
    cfg->tuning_params[110] = 0;
    cfg->tuning_params[111] = 0;
    cfg->tuning_params[112] = 0;
    cfg->tuning_params[113] = 0;
    cfg->tuning_params[114] = 0;
    cfg->tuning_params[115] = 0;
    cfg->tuning_params[116] = 0;
    cfg->tuning_params[117] = 0;
    cfg->tuning_params[118] = 0;
    cfg->tuning_params[119] = 0;
    cfg->tuning_params[120] = 0;
    cfg->tuning_params[121] = 0;
    cfg->tuning_params[122] = 0;
    cfg->tuning_params[123] = 0;
    cfg->tuning_params[124] = 0;
    cfg->tuning_params[125] = 0;
    cfg->tuning_params[126] = 0;
    cfg->tuning_params[127] = 0;
    cfg->tuning_params[128] = 0;
    cfg->tuning_params[129] = 0;
    cfg->tuning_params[130] = 0;
    cfg->tuning_params[131] = 0;
    cfg->tuning_params[132] = 0;
    cfg->tuning_params[133] = 0;
    cfg->tuning_params[134] = 0;
    cfg->tuning_params[135] = 0;
    cfg->tuning_params[136] = 0;
    cfg->tuning_params[137] = 0;
    cfg->tuning_params[138] = 0;
    cfg->tuning_params[139] = 0;
    cfg->tuning_params[140] = 0;
    cfg->tuning_params[141] = 0;
    cfg->tuning_params[142] = 0;
    cfg->tuning_params[143] = 0;
    cfg->tuning_params[144] = 0;
    cfg->tuning_params[145] = 0;
    cfg->tuning_params[146] = 0;
    cfg->tuning_params[147] = 0;
    cfg->tuning_params[148] = 0;
    cfg->tuning_params[149] = 0;
    cfg->tuning_params[150] = 0;
    cfg->tuning_params[151] = 0;
    cfg->tuning_params[152] = 0;
    cfg->tuning_params[153] = 0;
    cfg->tuning_params[154] = 32;
    cfg->tuning_params[155] = 32;
    cfg->tuning_params[156] = 32;
    cfg->tuning_params[157] = 32;
    cfg->tuning_params[158] = 32;
    cfg->tuning_params[159] = 32;
    cfg->tuning_params[160] = 32;
    cfg->tuning_params[161] = 32;
    cfg->tuning_params[162] = 32;
    cfg->tuning_params[163] = 32;
    cfg->tuning_params[164] = 32;
    cfg->tuning_params[165] = 32;
    cfg->tuning_params[166] = 32;
    cfg->tuning_params[167] = 0;
    cfg->tuning_params[168] = 0;
    cfg->tuning_params[169] = 0;
    cfg->tuning_params[170] = 0;
    cfg->tuning_params[171] = 0;
    cfg->tuning_params[172] = 0;
    cfg->tuning_params[173] = 0;
    cfg->tuning_params[174] = 0;
    cfg->tuning_params[175] = 0;
    cfg->tuning_params[176] = 0;
    cfg->tuning_params[177] = 0;
    cfg->tuning_params[178] = 0;
    cfg->tuning_params[179] = 0;
    cfg->tuning_params[180] = 0;
    cfg->tuning_params[181] = 0;
    cfg->tuning_params[182] = 0;
    cfg->tuning_params[183] = 0;
    cfg->tuning_params[184] = 0;
    cfg->tuning_params[185] = 0;
    cfg->tuning_params[186] = 0;
    cfg->tuning_params[187] = 0;
    cfg->tuning_params[188] = 0;
    cfg->tuning_params[189] = 0;
    cfg->tuning_params[190] = 0;
    cfg->tuning_params[191] = 0;
    cfg->tuning_params[192] = 0;
    opencl_config_init(&cfg->opencl, 193, tuning_param_names, tuning_param_vars,
                       cfg->tuning_params, tuning_param_classes);
    return cfg;
}
void futhark_context_config_free(struct futhark_context_config *cfg)
{
    assert(!cfg->in_use);
    free(cfg->build_opts);
    free(cfg);
}
void futhark_context_config_add_build_option(struct futhark_context_config *cfg,
                                             const char *opt)
{
    cfg->build_opts[cfg->num_build_opts] = opt;
    cfg->num_build_opts++;
    cfg->build_opts = (const char **) realloc(cfg->build_opts,
                                              (cfg->num_build_opts + 1) *
                                              sizeof(const char *));
    cfg->build_opts[cfg->num_build_opts] = NULL;
}
void futhark_context_config_set_debugging(struct futhark_context_config *cfg,
                                          int flag)
{
    cfg->opencl.profiling = cfg->opencl.logging = cfg->opencl.debugging = flag;
}
void futhark_context_config_set_profiling(struct futhark_context_config *cfg,
                                          int flag)
{
    cfg->opencl.profiling = flag;
}
void futhark_context_config_set_logging(struct futhark_context_config *cfg,
                                        int flag)
{
    cfg->opencl.logging = flag;
}
void futhark_context_config_set_device(struct futhark_context_config *cfg, const
                                       char *s)
{
    set_preferred_device(&cfg->opencl, s);
}
void futhark_context_config_set_platform(struct futhark_context_config *cfg,
                                         const char *s)
{
    set_preferred_platform(&cfg->opencl, s);
}
void futhark_context_config_select_device_interactively(struct futhark_context_config *cfg)
{
    select_device_interactively(&cfg->opencl);
}
void futhark_context_config_list_devices(struct futhark_context_config *cfg)
{
    (void) cfg;
    list_devices();
}
void futhark_context_config_dump_program_to(struct futhark_context_config *cfg,
                                            const char *path)
{
    cfg->opencl.dump_program_to = path;
}
void futhark_context_config_load_program_from(struct futhark_context_config *cfg,
                                              const char *path)
{
    cfg->opencl.load_program_from = path;
}
void futhark_context_config_dump_binary_to(struct futhark_context_config *cfg,
                                           const char *path)
{
    cfg->opencl.dump_binary_to = path;
}
void futhark_context_config_load_binary_from(struct futhark_context_config *cfg,
                                             const char *path)
{
    cfg->opencl.load_binary_from = path;
}
void futhark_context_config_set_default_group_size(struct futhark_context_config *cfg,
                                                   int size)
{
    cfg->opencl.default_group_size = size;
    cfg->opencl.default_group_size_changed = 1;
}
void futhark_context_config_set_default_num_groups(struct futhark_context_config *cfg,
                                                   int num)
{
    cfg->opencl.default_num_groups = num;
}
void futhark_context_config_set_default_tile_size(struct futhark_context_config *cfg,
                                                  int size)
{
    cfg->opencl.default_tile_size = size;
    cfg->opencl.default_tile_size_changed = 1;
}
void futhark_context_config_set_default_reg_tile_size(struct futhark_context_config *cfg,
                                                      int size)
{
    cfg->opencl.default_reg_tile_size = size;
}
void futhark_context_config_set_default_threshold(struct futhark_context_config *cfg,
                                                  int size)
{
    cfg->opencl.default_threshold = size;
}
int futhark_context_config_set_tuning_param(struct futhark_context_config *cfg,
                                            const char *param_name,
                                            size_t new_value)
{
    for (int i = 0; i < 193; i++) {
        if (strcmp(param_name, tuning_param_names[i]) == 0) {
            cfg->tuning_params[i] = new_value;
            return 0;
        }
    }
    if (strcmp(param_name, "default_group_size") == 0) {
        cfg->opencl.default_group_size = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_num_groups") == 0) {
        cfg->opencl.default_num_groups = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_threshold") == 0) {
        cfg->opencl.default_threshold = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_tile_size") == 0) {
        cfg->opencl.default_tile_size = new_value;
        return 0;
    }
    if (strcmp(param_name, "default_reg_tile_size") == 0) {
        cfg->opencl.default_reg_tile_size = new_value;
        return 0;
    }
    return 1;
}
struct futhark_context {
    struct futhark_context_config *cfg;
    int detail_memory;
    int debugging;
    int profiling;
    int profiling_paused;
    int logging;
    lock_t lock;
    char *error;
    FILE *log;
    int64_t peak_mem_usage_device;
    int64_t cur_mem_usage_device;
    int64_t peak_mem_usage_default;
    int64_t cur_mem_usage_default;
    struct {
        int dummy;
    } constants;
    struct memblock_device mainzicounter_mem_226022;
    struct memblock_device mainzicounter_mem_226110;
    struct memblock_device mainzicounter_mem_226371;
    struct memblock_device mainzicounter_mem_226479;
    struct memblock_device mainzicounter_mem_226784;
    struct memblock_device mainzicounter_mem_226904;
    struct memblock_device mainzicounter_mem_227099;
    struct memblock_device mainzicounter_mem_227242;
    struct memblock_device mainzicounter_mem_227385;
    struct memblock_device mainzicounter_mem_227564;
    struct memblock_device mainzicounter_mem_227646;
    struct memblock_device mainzicounter_mem_227788;
    struct memblock_device mainzicounter_mem_227890;
    struct memblock_device mainzicounter_mem_228058;
    struct memblock_device mainzicounter_mem_228172;
    struct memblock_device mainzicounter_mem_228414;
    struct memblock_device mainzicounter_mem_228496;
    struct memblock_device mainzicounter_mem_228661;
    struct memblock_device mainzicounter_mem_228763;
    struct memblock_device mainzicounter_mem_228954;
    struct memblock_device mainzicounter_mem_229068;
    struct memblock_device mainzicounter_mem_229579;
    int total_runs;
    long total_runtime;
    cl_kernel builtinzhreplicate_f32zireplicate_225805;
    cl_kernel builtinzhreplicate_i64zireplicate_225388;
    cl_kernel gpu_map_transpose_f32;
    cl_kernel gpu_map_transpose_f32_low_height;
    cl_kernel gpu_map_transpose_f32_low_width;
    cl_kernel gpu_map_transpose_f32_small;
    cl_kernel gpu_map_transpose_i64;
    cl_kernel gpu_map_transpose_i64_low_height;
    cl_kernel gpu_map_transpose_i64_low_width;
    cl_kernel gpu_map_transpose_i64_small;
    cl_kernel mainzicopy_225406;
    cl_kernel mainzicopy_225565;
    cl_kernel mainzicopy_227488;
    cl_kernel mainzicopy_227687;
    cl_kernel mainzicopy_227937;
    cl_kernel mainzicopy_228315;
    cl_kernel mainzicopy_228537;
    cl_kernel mainzicopy_228810;
    cl_kernel mainziscan_stage1_200090;
    cl_kernel mainziscan_stage1_200642;
    cl_kernel mainziscan_stage1_211766;
    cl_kernel mainziscan_stage1_211897;
    cl_kernel mainziscan_stage1_212028;
    cl_kernel mainziscan_stage1_220969;
    cl_kernel mainziscan_stage2_200090;
    cl_kernel mainziscan_stage2_200642;
    cl_kernel mainziscan_stage2_211766;
    cl_kernel mainziscan_stage2_211897;
    cl_kernel mainziscan_stage2_212028;
    cl_kernel mainziscan_stage2_220969;
    cl_kernel mainziscan_stage3_200090;
    cl_kernel mainziscan_stage3_200642;
    cl_kernel mainziscan_stage3_211766;
    cl_kernel mainziscan_stage3_211897;
    cl_kernel mainziscan_stage3_212028;
    cl_kernel mainziscan_stage3_220969;
    cl_kernel mainzisegmap_200128;
    cl_kernel mainzisegmap_200253;
    cl_kernel mainzisegmap_200688;
    cl_kernel mainzisegmap_201901;
    cl_kernel mainzisegmap_201915;
    cl_kernel mainzisegmap_201939;
    cl_kernel mainzisegmap_202549;
    cl_kernel mainzisegmap_202561;
    cl_kernel mainzisegmap_202582;
    cl_kernel mainzisegmap_203175;
    cl_kernel mainzisegmap_203187;
    cl_kernel mainzisegmap_203208;
    cl_kernel mainzisegmap_203350;
    cl_kernel mainzisegmap_203495;
    cl_kernel mainzisegmap_203625;
    cl_kernel mainzisegmap_204765;
    cl_kernel mainzisegmap_204973;
    cl_kernel mainzisegmap_205062;
    cl_kernel mainzisegmap_205134;
    cl_kernel mainzisegmap_205348;
    cl_kernel mainzisegmap_206802;
    cl_kernel mainzisegmap_207077;
    cl_kernel mainzisegmap_207194;
    cl_kernel mainzisegmap_207278;
    cl_kernel mainzisegmap_207553;
    cl_kernel mainzisegmap_209345;
    cl_kernel mainzisegmap_209690;
    cl_kernel mainzisegmap_209839;
    cl_kernel mainzisegmap_209935;
    cl_kernel mainzisegmap_211496;
    cl_kernel mainzisegmap_211645;
    cl_kernel mainzisegmap_211681;
    cl_kernel mainzisegmap_211812;
    cl_kernel mainzisegmap_211943;
    cl_kernel mainzisegmap_212132;
    cl_kernel mainzisegmap_212517;
    cl_kernel mainzisegmap_212634;
    cl_kernel mainzisegmap_212795;
    cl_kernel mainzisegmap_213316;
    cl_kernel mainzisegmap_213473;
    cl_kernel mainzisegmap_213692;
    cl_kernel mainzisegmap_214361;
    cl_kernel mainzisegmap_214562;
    cl_kernel mainzisegmap_215432;
    cl_kernel mainzisegmap_215527;
    cl_kernel mainzisegmap_215634;
    cl_kernel mainzisegmap_216150;
    cl_kernel mainzisegmap_216167;
    cl_kernel mainzisegmap_216195;
    cl_kernel mainzisegmap_216319;
    cl_kernel mainzisegmap_216506;
    cl_kernel mainzisegmap_217156;
    cl_kernel mainzisegmap_217173;
    cl_kernel mainzisegmap_217203;
    cl_kernel mainzisegmap_217367;
    cl_kernel mainzisegmap_217612;
    cl_kernel mainzisegmap_218410;
    cl_kernel mainzisegmap_218427;
    cl_kernel mainzisegmap_218457;
    cl_kernel mainzisegmap_218665;
    cl_kernel mainzisegmap_218956;
    cl_kernel mainzisegmap_218973;
    cl_kernel mainzisegmap_219268;
    cl_kernel mainzisegmap_219285;
    cl_kernel mainzisegmap_219672;
    cl_kernel mainzisegmap_219689;
    cl_kernel mainzisegmap_219977;
    cl_kernel mainzisegmap_220194;
    cl_kernel mainzisegmap_220215;
    cl_kernel mainzisegmap_220339;
    cl_kernel mainzisegmap_221037;
    cl_kernel mainzisegmap_221092;
    cl_kernel mainzisegmap_221154;
    cl_kernel mainzisegmap_221240;
    cl_kernel mainzisegmap_221310;
    cl_kernel mainzisegmap_intragroup_199976;
    cl_kernel mainzisegmap_intragroup_200331;
    cl_kernel mainzisegmap_intragroup_200607;
    cl_kernel mainzisegmap_intragroup_200860;
    cl_kernel mainzisegmap_intragroup_201764;
    cl_kernel mainzisegmap_intragroup_202165;
    cl_kernel mainzisegmap_intragroup_202791;
    cl_kernel mainzisegmap_intragroup_204851;
    cl_kernel mainzisegmap_intragroup_206919;
    cl_kernel mainzisegmap_intragroup_209494;
    cl_kernel mainzisegmap_intragroup_210266;
    cl_kernel mainzisegmap_intragroup_210587;
    cl_kernel mainzisegmap_intragroup_211038;
    cl_kernel mainzisegmap_intragroup_214752;
    cl_kernel mainzisegmap_intragroup_214919;
    cl_kernel mainzisegmap_intragroup_215176;
    cl_kernel mainzisegmap_intragroup_219000;
    cl_kernel mainzisegmap_intragroup_219313;
    cl_kernel mainzisegmap_intragroup_219717;
    cl_kernel mainzisegmap_intragroup_220067;
    cl_kernel mainzisegmap_intragroup_220432;
    cl_kernel mainzisegmap_intragroup_220872;
    cl_kernel mainzisegred_large_205086;
    cl_kernel mainzisegred_large_205160;
    cl_kernel mainzisegred_large_207220;
    cl_kernel mainzisegred_large_207314;
    cl_kernel mainzisegred_large_209867;
    cl_kernel mainzisegred_large_209990;
    cl_kernel mainzisegred_large_211714;
    cl_kernel mainzisegred_large_211845;
    cl_kernel mainzisegred_large_211976;
    cl_kernel mainzisegred_large_212598;
    cl_kernel mainzisegred_large_212647;
    cl_kernel mainzisegred_large_213427;
    cl_kernel mainzisegred_large_213496;
    cl_kernel mainzisegred_large_214506;
    cl_kernel mainzisegred_large_214604;
    cl_kernel mainzisegred_large_216280;
    cl_kernel mainzisegred_large_216332;
    cl_kernel mainzisegred_large_217318;
    cl_kernel mainzisegred_large_217390;
    cl_kernel mainzisegred_large_218606;
    cl_kernel mainzisegred_large_218707;
    cl_kernel mainzisegred_large_221141;
    cl_kernel mainzisegred_small_205086;
    cl_kernel mainzisegred_small_205160;
    cl_kernel mainzisegred_small_207220;
    cl_kernel mainzisegred_small_207314;
    cl_kernel mainzisegred_small_209867;
    cl_kernel mainzisegred_small_209990;
    cl_kernel mainzisegred_small_211714;
    cl_kernel mainzisegred_small_211845;
    cl_kernel mainzisegred_small_211976;
    cl_kernel mainzisegred_small_212598;
    cl_kernel mainzisegred_small_212647;
    cl_kernel mainzisegred_small_213427;
    cl_kernel mainzisegred_small_213496;
    cl_kernel mainzisegred_small_214506;
    cl_kernel mainzisegred_small_214604;
    cl_kernel mainzisegred_small_216280;
    cl_kernel mainzisegred_small_216332;
    cl_kernel mainzisegred_small_217318;
    cl_kernel mainzisegred_small_217390;
    cl_kernel mainzisegred_small_218606;
    cl_kernel mainzisegred_small_218707;
    cl_kernel mainzisegred_small_221141;
    int64_t copy_dev_to_dev_total_runtime;
    int copy_dev_to_dev_runs;
    int64_t copy_dev_to_host_total_runtime;
    int copy_dev_to_host_runs;
    int64_t copy_host_to_dev_total_runtime;
    int copy_host_to_dev_runs;
    int64_t copy_scalar_to_dev_total_runtime;
    int copy_scalar_to_dev_runs;
    int64_t copy_scalar_from_dev_total_runtime;
    int copy_scalar_from_dev_runs;
    int64_t builtinzhreplicate_f32zireplicate_225805_total_runtime;
    int builtinzhreplicate_f32zireplicate_225805_runs;
    int64_t builtinzhreplicate_i64zireplicate_225388_total_runtime;
    int builtinzhreplicate_i64zireplicate_225388_runs;
    int64_t gpu_map_transpose_f32_total_runtime;
    int gpu_map_transpose_f32_runs;
    int64_t gpu_map_transpose_f32_low_height_total_runtime;
    int gpu_map_transpose_f32_low_height_runs;
    int64_t gpu_map_transpose_f32_low_width_total_runtime;
    int gpu_map_transpose_f32_low_width_runs;
    int64_t gpu_map_transpose_f32_small_total_runtime;
    int gpu_map_transpose_f32_small_runs;
    int64_t gpu_map_transpose_i64_total_runtime;
    int gpu_map_transpose_i64_runs;
    int64_t gpu_map_transpose_i64_low_height_total_runtime;
    int gpu_map_transpose_i64_low_height_runs;
    int64_t gpu_map_transpose_i64_low_width_total_runtime;
    int gpu_map_transpose_i64_low_width_runs;
    int64_t gpu_map_transpose_i64_small_total_runtime;
    int gpu_map_transpose_i64_small_runs;
    int64_t mainzicopy_225406_total_runtime;
    int mainzicopy_225406_runs;
    int64_t mainzicopy_225565_total_runtime;
    int mainzicopy_225565_runs;
    int64_t mainzicopy_227488_total_runtime;
    int mainzicopy_227488_runs;
    int64_t mainzicopy_227687_total_runtime;
    int mainzicopy_227687_runs;
    int64_t mainzicopy_227937_total_runtime;
    int mainzicopy_227937_runs;
    int64_t mainzicopy_228315_total_runtime;
    int mainzicopy_228315_runs;
    int64_t mainzicopy_228537_total_runtime;
    int mainzicopy_228537_runs;
    int64_t mainzicopy_228810_total_runtime;
    int mainzicopy_228810_runs;
    int64_t mainziscan_stage1_200090_total_runtime;
    int mainziscan_stage1_200090_runs;
    int64_t mainziscan_stage1_200642_total_runtime;
    int mainziscan_stage1_200642_runs;
    int64_t mainziscan_stage1_211766_total_runtime;
    int mainziscan_stage1_211766_runs;
    int64_t mainziscan_stage1_211897_total_runtime;
    int mainziscan_stage1_211897_runs;
    int64_t mainziscan_stage1_212028_total_runtime;
    int mainziscan_stage1_212028_runs;
    int64_t mainziscan_stage1_220969_total_runtime;
    int mainziscan_stage1_220969_runs;
    int64_t mainziscan_stage2_200090_total_runtime;
    int mainziscan_stage2_200090_runs;
    int64_t mainziscan_stage2_200642_total_runtime;
    int mainziscan_stage2_200642_runs;
    int64_t mainziscan_stage2_211766_total_runtime;
    int mainziscan_stage2_211766_runs;
    int64_t mainziscan_stage2_211897_total_runtime;
    int mainziscan_stage2_211897_runs;
    int64_t mainziscan_stage2_212028_total_runtime;
    int mainziscan_stage2_212028_runs;
    int64_t mainziscan_stage2_220969_total_runtime;
    int mainziscan_stage2_220969_runs;
    int64_t mainziscan_stage3_200090_total_runtime;
    int mainziscan_stage3_200090_runs;
    int64_t mainziscan_stage3_200642_total_runtime;
    int mainziscan_stage3_200642_runs;
    int64_t mainziscan_stage3_211766_total_runtime;
    int mainziscan_stage3_211766_runs;
    int64_t mainziscan_stage3_211897_total_runtime;
    int mainziscan_stage3_211897_runs;
    int64_t mainziscan_stage3_212028_total_runtime;
    int mainziscan_stage3_212028_runs;
    int64_t mainziscan_stage3_220969_total_runtime;
    int mainziscan_stage3_220969_runs;
    int64_t mainzisegmap_200128_total_runtime;
    int mainzisegmap_200128_runs;
    int64_t mainzisegmap_200253_total_runtime;
    int mainzisegmap_200253_runs;
    int64_t mainzisegmap_200688_total_runtime;
    int mainzisegmap_200688_runs;
    int64_t mainzisegmap_201901_total_runtime;
    int mainzisegmap_201901_runs;
    int64_t mainzisegmap_201915_total_runtime;
    int mainzisegmap_201915_runs;
    int64_t mainzisegmap_201939_total_runtime;
    int mainzisegmap_201939_runs;
    int64_t mainzisegmap_202549_total_runtime;
    int mainzisegmap_202549_runs;
    int64_t mainzisegmap_202561_total_runtime;
    int mainzisegmap_202561_runs;
    int64_t mainzisegmap_202582_total_runtime;
    int mainzisegmap_202582_runs;
    int64_t mainzisegmap_203175_total_runtime;
    int mainzisegmap_203175_runs;
    int64_t mainzisegmap_203187_total_runtime;
    int mainzisegmap_203187_runs;
    int64_t mainzisegmap_203208_total_runtime;
    int mainzisegmap_203208_runs;
    int64_t mainzisegmap_203350_total_runtime;
    int mainzisegmap_203350_runs;
    int64_t mainzisegmap_203495_total_runtime;
    int mainzisegmap_203495_runs;
    int64_t mainzisegmap_203625_total_runtime;
    int mainzisegmap_203625_runs;
    int64_t mainzisegmap_204765_total_runtime;
    int mainzisegmap_204765_runs;
    int64_t mainzisegmap_204973_total_runtime;
    int mainzisegmap_204973_runs;
    int64_t mainzisegmap_205062_total_runtime;
    int mainzisegmap_205062_runs;
    int64_t mainzisegmap_205134_total_runtime;
    int mainzisegmap_205134_runs;
    int64_t mainzisegmap_205348_total_runtime;
    int mainzisegmap_205348_runs;
    int64_t mainzisegmap_206802_total_runtime;
    int mainzisegmap_206802_runs;
    int64_t mainzisegmap_207077_total_runtime;
    int mainzisegmap_207077_runs;
    int64_t mainzisegmap_207194_total_runtime;
    int mainzisegmap_207194_runs;
    int64_t mainzisegmap_207278_total_runtime;
    int mainzisegmap_207278_runs;
    int64_t mainzisegmap_207553_total_runtime;
    int mainzisegmap_207553_runs;
    int64_t mainzisegmap_209345_total_runtime;
    int mainzisegmap_209345_runs;
    int64_t mainzisegmap_209690_total_runtime;
    int mainzisegmap_209690_runs;
    int64_t mainzisegmap_209839_total_runtime;
    int mainzisegmap_209839_runs;
    int64_t mainzisegmap_209935_total_runtime;
    int mainzisegmap_209935_runs;
    int64_t mainzisegmap_211496_total_runtime;
    int mainzisegmap_211496_runs;
    int64_t mainzisegmap_211645_total_runtime;
    int mainzisegmap_211645_runs;
    int64_t mainzisegmap_211681_total_runtime;
    int mainzisegmap_211681_runs;
    int64_t mainzisegmap_211812_total_runtime;
    int mainzisegmap_211812_runs;
    int64_t mainzisegmap_211943_total_runtime;
    int mainzisegmap_211943_runs;
    int64_t mainzisegmap_212132_total_runtime;
    int mainzisegmap_212132_runs;
    int64_t mainzisegmap_212517_total_runtime;
    int mainzisegmap_212517_runs;
    int64_t mainzisegmap_212634_total_runtime;
    int mainzisegmap_212634_runs;
    int64_t mainzisegmap_212795_total_runtime;
    int mainzisegmap_212795_runs;
    int64_t mainzisegmap_213316_total_runtime;
    int mainzisegmap_213316_runs;
    int64_t mainzisegmap_213473_total_runtime;
    int mainzisegmap_213473_runs;
    int64_t mainzisegmap_213692_total_runtime;
    int mainzisegmap_213692_runs;
    int64_t mainzisegmap_214361_total_runtime;
    int mainzisegmap_214361_runs;
    int64_t mainzisegmap_214562_total_runtime;
    int mainzisegmap_214562_runs;
    int64_t mainzisegmap_215432_total_runtime;
    int mainzisegmap_215432_runs;
    int64_t mainzisegmap_215527_total_runtime;
    int mainzisegmap_215527_runs;
    int64_t mainzisegmap_215634_total_runtime;
    int mainzisegmap_215634_runs;
    int64_t mainzisegmap_216150_total_runtime;
    int mainzisegmap_216150_runs;
    int64_t mainzisegmap_216167_total_runtime;
    int mainzisegmap_216167_runs;
    int64_t mainzisegmap_216195_total_runtime;
    int mainzisegmap_216195_runs;
    int64_t mainzisegmap_216319_total_runtime;
    int mainzisegmap_216319_runs;
    int64_t mainzisegmap_216506_total_runtime;
    int mainzisegmap_216506_runs;
    int64_t mainzisegmap_217156_total_runtime;
    int mainzisegmap_217156_runs;
    int64_t mainzisegmap_217173_total_runtime;
    int mainzisegmap_217173_runs;
    int64_t mainzisegmap_217203_total_runtime;
    int mainzisegmap_217203_runs;
    int64_t mainzisegmap_217367_total_runtime;
    int mainzisegmap_217367_runs;
    int64_t mainzisegmap_217612_total_runtime;
    int mainzisegmap_217612_runs;
    int64_t mainzisegmap_218410_total_runtime;
    int mainzisegmap_218410_runs;
    int64_t mainzisegmap_218427_total_runtime;
    int mainzisegmap_218427_runs;
    int64_t mainzisegmap_218457_total_runtime;
    int mainzisegmap_218457_runs;
    int64_t mainzisegmap_218665_total_runtime;
    int mainzisegmap_218665_runs;
    int64_t mainzisegmap_218956_total_runtime;
    int mainzisegmap_218956_runs;
    int64_t mainzisegmap_218973_total_runtime;
    int mainzisegmap_218973_runs;
    int64_t mainzisegmap_219268_total_runtime;
    int mainzisegmap_219268_runs;
    int64_t mainzisegmap_219285_total_runtime;
    int mainzisegmap_219285_runs;
    int64_t mainzisegmap_219672_total_runtime;
    int mainzisegmap_219672_runs;
    int64_t mainzisegmap_219689_total_runtime;
    int mainzisegmap_219689_runs;
    int64_t mainzisegmap_219977_total_runtime;
    int mainzisegmap_219977_runs;
    int64_t mainzisegmap_220194_total_runtime;
    int mainzisegmap_220194_runs;
    int64_t mainzisegmap_220215_total_runtime;
    int mainzisegmap_220215_runs;
    int64_t mainzisegmap_220339_total_runtime;
    int mainzisegmap_220339_runs;
    int64_t mainzisegmap_221037_total_runtime;
    int mainzisegmap_221037_runs;
    int64_t mainzisegmap_221092_total_runtime;
    int mainzisegmap_221092_runs;
    int64_t mainzisegmap_221154_total_runtime;
    int mainzisegmap_221154_runs;
    int64_t mainzisegmap_221240_total_runtime;
    int mainzisegmap_221240_runs;
    int64_t mainzisegmap_221310_total_runtime;
    int mainzisegmap_221310_runs;
    int64_t mainzisegmap_intragroup_199976_total_runtime;
    int mainzisegmap_intragroup_199976_runs;
    int64_t mainzisegmap_intragroup_200331_total_runtime;
    int mainzisegmap_intragroup_200331_runs;
    int64_t mainzisegmap_intragroup_200607_total_runtime;
    int mainzisegmap_intragroup_200607_runs;
    int64_t mainzisegmap_intragroup_200860_total_runtime;
    int mainzisegmap_intragroup_200860_runs;
    int64_t mainzisegmap_intragroup_201764_total_runtime;
    int mainzisegmap_intragroup_201764_runs;
    int64_t mainzisegmap_intragroup_202165_total_runtime;
    int mainzisegmap_intragroup_202165_runs;
    int64_t mainzisegmap_intragroup_202791_total_runtime;
    int mainzisegmap_intragroup_202791_runs;
    int64_t mainzisegmap_intragroup_204851_total_runtime;
    int mainzisegmap_intragroup_204851_runs;
    int64_t mainzisegmap_intragroup_206919_total_runtime;
    int mainzisegmap_intragroup_206919_runs;
    int64_t mainzisegmap_intragroup_209494_total_runtime;
    int mainzisegmap_intragroup_209494_runs;
    int64_t mainzisegmap_intragroup_210266_total_runtime;
    int mainzisegmap_intragroup_210266_runs;
    int64_t mainzisegmap_intragroup_210587_total_runtime;
    int mainzisegmap_intragroup_210587_runs;
    int64_t mainzisegmap_intragroup_211038_total_runtime;
    int mainzisegmap_intragroup_211038_runs;
    int64_t mainzisegmap_intragroup_214752_total_runtime;
    int mainzisegmap_intragroup_214752_runs;
    int64_t mainzisegmap_intragroup_214919_total_runtime;
    int mainzisegmap_intragroup_214919_runs;
    int64_t mainzisegmap_intragroup_215176_total_runtime;
    int mainzisegmap_intragroup_215176_runs;
    int64_t mainzisegmap_intragroup_219000_total_runtime;
    int mainzisegmap_intragroup_219000_runs;
    int64_t mainzisegmap_intragroup_219313_total_runtime;
    int mainzisegmap_intragroup_219313_runs;
    int64_t mainzisegmap_intragroup_219717_total_runtime;
    int mainzisegmap_intragroup_219717_runs;
    int64_t mainzisegmap_intragroup_220067_total_runtime;
    int mainzisegmap_intragroup_220067_runs;
    int64_t mainzisegmap_intragroup_220432_total_runtime;
    int mainzisegmap_intragroup_220432_runs;
    int64_t mainzisegmap_intragroup_220872_total_runtime;
    int mainzisegmap_intragroup_220872_runs;
    int64_t mainzisegred_large_205086_total_runtime;
    int mainzisegred_large_205086_runs;
    int64_t mainzisegred_large_205160_total_runtime;
    int mainzisegred_large_205160_runs;
    int64_t mainzisegred_large_207220_total_runtime;
    int mainzisegred_large_207220_runs;
    int64_t mainzisegred_large_207314_total_runtime;
    int mainzisegred_large_207314_runs;
    int64_t mainzisegred_large_209867_total_runtime;
    int mainzisegred_large_209867_runs;
    int64_t mainzisegred_large_209990_total_runtime;
    int mainzisegred_large_209990_runs;
    int64_t mainzisegred_large_211714_total_runtime;
    int mainzisegred_large_211714_runs;
    int64_t mainzisegred_large_211845_total_runtime;
    int mainzisegred_large_211845_runs;
    int64_t mainzisegred_large_211976_total_runtime;
    int mainzisegred_large_211976_runs;
    int64_t mainzisegred_large_212598_total_runtime;
    int mainzisegred_large_212598_runs;
    int64_t mainzisegred_large_212647_total_runtime;
    int mainzisegred_large_212647_runs;
    int64_t mainzisegred_large_213427_total_runtime;
    int mainzisegred_large_213427_runs;
    int64_t mainzisegred_large_213496_total_runtime;
    int mainzisegred_large_213496_runs;
    int64_t mainzisegred_large_214506_total_runtime;
    int mainzisegred_large_214506_runs;
    int64_t mainzisegred_large_214604_total_runtime;
    int mainzisegred_large_214604_runs;
    int64_t mainzisegred_large_216280_total_runtime;
    int mainzisegred_large_216280_runs;
    int64_t mainzisegred_large_216332_total_runtime;
    int mainzisegred_large_216332_runs;
    int64_t mainzisegred_large_217318_total_runtime;
    int mainzisegred_large_217318_runs;
    int64_t mainzisegred_large_217390_total_runtime;
    int mainzisegred_large_217390_runs;
    int64_t mainzisegred_large_218606_total_runtime;
    int mainzisegred_large_218606_runs;
    int64_t mainzisegred_large_218707_total_runtime;
    int mainzisegred_large_218707_runs;
    int64_t mainzisegred_large_221141_total_runtime;
    int mainzisegred_large_221141_runs;
    int64_t mainzisegred_small_205086_total_runtime;
    int mainzisegred_small_205086_runs;
    int64_t mainzisegred_small_205160_total_runtime;
    int mainzisegred_small_205160_runs;
    int64_t mainzisegred_small_207220_total_runtime;
    int mainzisegred_small_207220_runs;
    int64_t mainzisegred_small_207314_total_runtime;
    int mainzisegred_small_207314_runs;
    int64_t mainzisegred_small_209867_total_runtime;
    int mainzisegred_small_209867_runs;
    int64_t mainzisegred_small_209990_total_runtime;
    int mainzisegred_small_209990_runs;
    int64_t mainzisegred_small_211714_total_runtime;
    int mainzisegred_small_211714_runs;
    int64_t mainzisegred_small_211845_total_runtime;
    int mainzisegred_small_211845_runs;
    int64_t mainzisegred_small_211976_total_runtime;
    int mainzisegred_small_211976_runs;
    int64_t mainzisegred_small_212598_total_runtime;
    int mainzisegred_small_212598_runs;
    int64_t mainzisegred_small_212647_total_runtime;
    int mainzisegred_small_212647_runs;
    int64_t mainzisegred_small_213427_total_runtime;
    int mainzisegred_small_213427_runs;
    int64_t mainzisegred_small_213496_total_runtime;
    int mainzisegred_small_213496_runs;
    int64_t mainzisegred_small_214506_total_runtime;
    int mainzisegred_small_214506_runs;
    int64_t mainzisegred_small_214604_total_runtime;
    int mainzisegred_small_214604_runs;
    int64_t mainzisegred_small_216280_total_runtime;
    int mainzisegred_small_216280_runs;
    int64_t mainzisegred_small_216332_total_runtime;
    int mainzisegred_small_216332_runs;
    int64_t mainzisegred_small_217318_total_runtime;
    int mainzisegred_small_217318_runs;
    int64_t mainzisegred_small_217390_total_runtime;
    int mainzisegred_small_217390_runs;
    int64_t mainzisegred_small_218606_total_runtime;
    int mainzisegred_small_218606_runs;
    int64_t mainzisegred_small_218707_total_runtime;
    int mainzisegred_small_218707_runs;
    int64_t mainzisegred_small_221141_total_runtime;
    int mainzisegred_small_221141_runs;
    cl_mem global_failure;
    cl_mem global_failure_args;
    struct opencl_context opencl;
    struct tuning_params tuning_params;
    cl_int failure_is_an_option;
};
void post_opencl_setup(struct opencl_context *ctx,
                       struct opencl_device_option *option)
{
    if ((ctx->lockstep_width == 0 && strstr(option->platform_name,
                                            "NVIDIA CUDA") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_GPU) == CL_DEVICE_TYPE_GPU) {
        ctx->lockstep_width = 32;
    }
    if ((ctx->lockstep_width == 0 && strstr(option->platform_name,
                                            "AMD Accelerated Parallel Processing") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_GPU) ==
        CL_DEVICE_TYPE_GPU) {
        ctx->lockstep_width = 32;
    }
    if ((ctx->lockstep_width == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_GPU) ==
        CL_DEVICE_TYPE_GPU) {
        ctx->lockstep_width = 1;
    }
    if ((ctx->cfg.default_num_groups == 0 && strstr(option->platform_name,
                                                    "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_GPU) == CL_DEVICE_TYPE_GPU) {
        size_t MAX_COMPUTE_UNITS_val = 0;
        
        clGetDeviceInfo(ctx->device, CL_DEVICE_MAX_COMPUTE_UNITS,
                        sizeof(MAX_COMPUTE_UNITS_val), &MAX_COMPUTE_UNITS_val,
                        NULL);
        ctx->cfg.default_num_groups = 4 * MAX_COMPUTE_UNITS_val;
    }
    if ((ctx->cfg.default_group_size == 0 && strstr(option->platform_name,
                                                    "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_GPU) == CL_DEVICE_TYPE_GPU) {
        ctx->cfg.default_group_size = 256;
    }
    if ((ctx->cfg.default_tile_size == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_GPU) ==
        CL_DEVICE_TYPE_GPU) {
        ctx->cfg.default_tile_size = 32;
    }
    if ((ctx->cfg.default_reg_tile_size == 0 && strstr(option->platform_name,
                                                       "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_GPU) == CL_DEVICE_TYPE_GPU) {
        ctx->cfg.default_reg_tile_size = 2;
    }
    if ((ctx->cfg.default_threshold == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_GPU) ==
        CL_DEVICE_TYPE_GPU) {
        ctx->cfg.default_threshold = 32768;
    }
    if ((ctx->lockstep_width == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_CPU) ==
        CL_DEVICE_TYPE_CPU) {
        ctx->lockstep_width = 1;
    }
    if ((ctx->cfg.default_num_groups == 0 && strstr(option->platform_name,
                                                    "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_CPU) == CL_DEVICE_TYPE_CPU) {
        size_t MAX_COMPUTE_UNITS_val = 0;
        
        clGetDeviceInfo(ctx->device, CL_DEVICE_MAX_COMPUTE_UNITS,
                        sizeof(MAX_COMPUTE_UNITS_val), &MAX_COMPUTE_UNITS_val,
                        NULL);
        ctx->cfg.default_num_groups = MAX_COMPUTE_UNITS_val;
    }
    if ((ctx->cfg.default_group_size == 0 && strstr(option->platform_name,
                                                    "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_CPU) == CL_DEVICE_TYPE_CPU) {
        ctx->cfg.default_group_size = 32;
    }
    if ((ctx->cfg.default_tile_size == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_CPU) ==
        CL_DEVICE_TYPE_CPU) {
        ctx->cfg.default_tile_size = 4;
    }
    if ((ctx->cfg.default_reg_tile_size == 0 && strstr(option->platform_name,
                                                       "") != NULL) &&
        (option->device_type & CL_DEVICE_TYPE_CPU) == CL_DEVICE_TYPE_CPU) {
        ctx->cfg.default_reg_tile_size = 1;
    }
    if ((ctx->cfg.default_threshold == 0 && strstr(option->platform_name, "") !=
         NULL) && (option->device_type & CL_DEVICE_TYPE_CPU) ==
        CL_DEVICE_TYPE_CPU) {
        size_t MAX_COMPUTE_UNITS_val = 0;
        
        clGetDeviceInfo(ctx->device, CL_DEVICE_MAX_COMPUTE_UNITS,
                        sizeof(MAX_COMPUTE_UNITS_val), &MAX_COMPUTE_UNITS_val,
                        NULL);
        ctx->cfg.default_threshold = MAX_COMPUTE_UNITS_val;
    }
}
static void init_context_early(struct futhark_context_config *cfg,
                               struct futhark_context *ctx)
{
    ctx->opencl.cfg = cfg->opencl;
    ctx->detail_memory = cfg->opencl.debugging;
    ctx->debugging = cfg->opencl.debugging;
    ctx->profiling = cfg->opencl.profiling;
    ctx->profiling_paused = 0;
    ctx->logging = cfg->opencl.logging;
    ctx->error = NULL;
    ctx->log = stderr;
    ctx->opencl.profiling_records_capacity = 200;
    ctx->opencl.profiling_records_used = 0;
    ctx->opencl.profiling_records =
        malloc(ctx->opencl.profiling_records_capacity *
        sizeof(struct profiling_record));
    create_lock(&ctx->lock);
    ctx->failure_is_an_option = 0;
    ctx->peak_mem_usage_device = 0;
    ctx->cur_mem_usage_device = 0;
    ctx->peak_mem_usage_default = 0;
    ctx->cur_mem_usage_default = 0;
    ctx->total_runs = 0;
    ctx->total_runtime = 0;
    ctx->copy_dev_to_dev_total_runtime = 0;
    ctx->copy_dev_to_dev_runs = 0;
    ctx->copy_dev_to_host_total_runtime = 0;
    ctx->copy_dev_to_host_runs = 0;
    ctx->copy_host_to_dev_total_runtime = 0;
    ctx->copy_host_to_dev_runs = 0;
    ctx->copy_scalar_to_dev_total_runtime = 0;
    ctx->copy_scalar_to_dev_runs = 0;
    ctx->copy_scalar_from_dev_total_runtime = 0;
    ctx->copy_scalar_from_dev_runs = 0;
    ctx->builtinzhreplicate_f32zireplicate_225805_total_runtime = 0;
    ctx->builtinzhreplicate_f32zireplicate_225805_runs = 0;
    ctx->builtinzhreplicate_i64zireplicate_225388_total_runtime = 0;
    ctx->builtinzhreplicate_i64zireplicate_225388_runs = 0;
    ctx->gpu_map_transpose_f32_total_runtime = 0;
    ctx->gpu_map_transpose_f32_runs = 0;
    ctx->gpu_map_transpose_f32_low_height_total_runtime = 0;
    ctx->gpu_map_transpose_f32_low_height_runs = 0;
    ctx->gpu_map_transpose_f32_low_width_total_runtime = 0;
    ctx->gpu_map_transpose_f32_low_width_runs = 0;
    ctx->gpu_map_transpose_f32_small_total_runtime = 0;
    ctx->gpu_map_transpose_f32_small_runs = 0;
    ctx->gpu_map_transpose_i64_total_runtime = 0;
    ctx->gpu_map_transpose_i64_runs = 0;
    ctx->gpu_map_transpose_i64_low_height_total_runtime = 0;
    ctx->gpu_map_transpose_i64_low_height_runs = 0;
    ctx->gpu_map_transpose_i64_low_width_total_runtime = 0;
    ctx->gpu_map_transpose_i64_low_width_runs = 0;
    ctx->gpu_map_transpose_i64_small_total_runtime = 0;
    ctx->gpu_map_transpose_i64_small_runs = 0;
    ctx->mainzicopy_225406_total_runtime = 0;
    ctx->mainzicopy_225406_runs = 0;
    ctx->mainzicopy_225565_total_runtime = 0;
    ctx->mainzicopy_225565_runs = 0;
    ctx->mainzicopy_227488_total_runtime = 0;
    ctx->mainzicopy_227488_runs = 0;
    ctx->mainzicopy_227687_total_runtime = 0;
    ctx->mainzicopy_227687_runs = 0;
    ctx->mainzicopy_227937_total_runtime = 0;
    ctx->mainzicopy_227937_runs = 0;
    ctx->mainzicopy_228315_total_runtime = 0;
    ctx->mainzicopy_228315_runs = 0;
    ctx->mainzicopy_228537_total_runtime = 0;
    ctx->mainzicopy_228537_runs = 0;
    ctx->mainzicopy_228810_total_runtime = 0;
    ctx->mainzicopy_228810_runs = 0;
    ctx->mainziscan_stage1_200090_total_runtime = 0;
    ctx->mainziscan_stage1_200090_runs = 0;
    ctx->mainziscan_stage1_200642_total_runtime = 0;
    ctx->mainziscan_stage1_200642_runs = 0;
    ctx->mainziscan_stage1_211766_total_runtime = 0;
    ctx->mainziscan_stage1_211766_runs = 0;
    ctx->mainziscan_stage1_211897_total_runtime = 0;
    ctx->mainziscan_stage1_211897_runs = 0;
    ctx->mainziscan_stage1_212028_total_runtime = 0;
    ctx->mainziscan_stage1_212028_runs = 0;
    ctx->mainziscan_stage1_220969_total_runtime = 0;
    ctx->mainziscan_stage1_220969_runs = 0;
    ctx->mainziscan_stage2_200090_total_runtime = 0;
    ctx->mainziscan_stage2_200090_runs = 0;
    ctx->mainziscan_stage2_200642_total_runtime = 0;
    ctx->mainziscan_stage2_200642_runs = 0;
    ctx->mainziscan_stage2_211766_total_runtime = 0;
    ctx->mainziscan_stage2_211766_runs = 0;
    ctx->mainziscan_stage2_211897_total_runtime = 0;
    ctx->mainziscan_stage2_211897_runs = 0;
    ctx->mainziscan_stage2_212028_total_runtime = 0;
    ctx->mainziscan_stage2_212028_runs = 0;
    ctx->mainziscan_stage2_220969_total_runtime = 0;
    ctx->mainziscan_stage2_220969_runs = 0;
    ctx->mainziscan_stage3_200090_total_runtime = 0;
    ctx->mainziscan_stage3_200090_runs = 0;
    ctx->mainziscan_stage3_200642_total_runtime = 0;
    ctx->mainziscan_stage3_200642_runs = 0;
    ctx->mainziscan_stage3_211766_total_runtime = 0;
    ctx->mainziscan_stage3_211766_runs = 0;
    ctx->mainziscan_stage3_211897_total_runtime = 0;
    ctx->mainziscan_stage3_211897_runs = 0;
    ctx->mainziscan_stage3_212028_total_runtime = 0;
    ctx->mainziscan_stage3_212028_runs = 0;
    ctx->mainziscan_stage3_220969_total_runtime = 0;
    ctx->mainziscan_stage3_220969_runs = 0;
    ctx->mainzisegmap_200128_total_runtime = 0;
    ctx->mainzisegmap_200128_runs = 0;
    ctx->mainzisegmap_200253_total_runtime = 0;
    ctx->mainzisegmap_200253_runs = 0;
    ctx->mainzisegmap_200688_total_runtime = 0;
    ctx->mainzisegmap_200688_runs = 0;
    ctx->mainzisegmap_201901_total_runtime = 0;
    ctx->mainzisegmap_201901_runs = 0;
    ctx->mainzisegmap_201915_total_runtime = 0;
    ctx->mainzisegmap_201915_runs = 0;
    ctx->mainzisegmap_201939_total_runtime = 0;
    ctx->mainzisegmap_201939_runs = 0;
    ctx->mainzisegmap_202549_total_runtime = 0;
    ctx->mainzisegmap_202549_runs = 0;
    ctx->mainzisegmap_202561_total_runtime = 0;
    ctx->mainzisegmap_202561_runs = 0;
    ctx->mainzisegmap_202582_total_runtime = 0;
    ctx->mainzisegmap_202582_runs = 0;
    ctx->mainzisegmap_203175_total_runtime = 0;
    ctx->mainzisegmap_203175_runs = 0;
    ctx->mainzisegmap_203187_total_runtime = 0;
    ctx->mainzisegmap_203187_runs = 0;
    ctx->mainzisegmap_203208_total_runtime = 0;
    ctx->mainzisegmap_203208_runs = 0;
    ctx->mainzisegmap_203350_total_runtime = 0;
    ctx->mainzisegmap_203350_runs = 0;
    ctx->mainzisegmap_203495_total_runtime = 0;
    ctx->mainzisegmap_203495_runs = 0;
    ctx->mainzisegmap_203625_total_runtime = 0;
    ctx->mainzisegmap_203625_runs = 0;
    ctx->mainzisegmap_204765_total_runtime = 0;
    ctx->mainzisegmap_204765_runs = 0;
    ctx->mainzisegmap_204973_total_runtime = 0;
    ctx->mainzisegmap_204973_runs = 0;
    ctx->mainzisegmap_205062_total_runtime = 0;
    ctx->mainzisegmap_205062_runs = 0;
    ctx->mainzisegmap_205134_total_runtime = 0;
    ctx->mainzisegmap_205134_runs = 0;
    ctx->mainzisegmap_205348_total_runtime = 0;
    ctx->mainzisegmap_205348_runs = 0;
    ctx->mainzisegmap_206802_total_runtime = 0;
    ctx->mainzisegmap_206802_runs = 0;
    ctx->mainzisegmap_207077_total_runtime = 0;
    ctx->mainzisegmap_207077_runs = 0;
    ctx->mainzisegmap_207194_total_runtime = 0;
    ctx->mainzisegmap_207194_runs = 0;
    ctx->mainzisegmap_207278_total_runtime = 0;
    ctx->mainzisegmap_207278_runs = 0;
    ctx->mainzisegmap_207553_total_runtime = 0;
    ctx->mainzisegmap_207553_runs = 0;
    ctx->mainzisegmap_209345_total_runtime = 0;
    ctx->mainzisegmap_209345_runs = 0;
    ctx->mainzisegmap_209690_total_runtime = 0;
    ctx->mainzisegmap_209690_runs = 0;
    ctx->mainzisegmap_209839_total_runtime = 0;
    ctx->mainzisegmap_209839_runs = 0;
    ctx->mainzisegmap_209935_total_runtime = 0;
    ctx->mainzisegmap_209935_runs = 0;
    ctx->mainzisegmap_211496_total_runtime = 0;
    ctx->mainzisegmap_211496_runs = 0;
    ctx->mainzisegmap_211645_total_runtime = 0;
    ctx->mainzisegmap_211645_runs = 0;
    ctx->mainzisegmap_211681_total_runtime = 0;
    ctx->mainzisegmap_211681_runs = 0;
    ctx->mainzisegmap_211812_total_runtime = 0;
    ctx->mainzisegmap_211812_runs = 0;
    ctx->mainzisegmap_211943_total_runtime = 0;
    ctx->mainzisegmap_211943_runs = 0;
    ctx->mainzisegmap_212132_total_runtime = 0;
    ctx->mainzisegmap_212132_runs = 0;
    ctx->mainzisegmap_212517_total_runtime = 0;
    ctx->mainzisegmap_212517_runs = 0;
    ctx->mainzisegmap_212634_total_runtime = 0;
    ctx->mainzisegmap_212634_runs = 0;
    ctx->mainzisegmap_212795_total_runtime = 0;
    ctx->mainzisegmap_212795_runs = 0;
    ctx->mainzisegmap_213316_total_runtime = 0;
    ctx->mainzisegmap_213316_runs = 0;
    ctx->mainzisegmap_213473_total_runtime = 0;
    ctx->mainzisegmap_213473_runs = 0;
    ctx->mainzisegmap_213692_total_runtime = 0;
    ctx->mainzisegmap_213692_runs = 0;
    ctx->mainzisegmap_214361_total_runtime = 0;
    ctx->mainzisegmap_214361_runs = 0;
    ctx->mainzisegmap_214562_total_runtime = 0;
    ctx->mainzisegmap_214562_runs = 0;
    ctx->mainzisegmap_215432_total_runtime = 0;
    ctx->mainzisegmap_215432_runs = 0;
    ctx->mainzisegmap_215527_total_runtime = 0;
    ctx->mainzisegmap_215527_runs = 0;
    ctx->mainzisegmap_215634_total_runtime = 0;
    ctx->mainzisegmap_215634_runs = 0;
    ctx->mainzisegmap_216150_total_runtime = 0;
    ctx->mainzisegmap_216150_runs = 0;
    ctx->mainzisegmap_216167_total_runtime = 0;
    ctx->mainzisegmap_216167_runs = 0;
    ctx->mainzisegmap_216195_total_runtime = 0;
    ctx->mainzisegmap_216195_runs = 0;
    ctx->mainzisegmap_216319_total_runtime = 0;
    ctx->mainzisegmap_216319_runs = 0;
    ctx->mainzisegmap_216506_total_runtime = 0;
    ctx->mainzisegmap_216506_runs = 0;
    ctx->mainzisegmap_217156_total_runtime = 0;
    ctx->mainzisegmap_217156_runs = 0;
    ctx->mainzisegmap_217173_total_runtime = 0;
    ctx->mainzisegmap_217173_runs = 0;
    ctx->mainzisegmap_217203_total_runtime = 0;
    ctx->mainzisegmap_217203_runs = 0;
    ctx->mainzisegmap_217367_total_runtime = 0;
    ctx->mainzisegmap_217367_runs = 0;
    ctx->mainzisegmap_217612_total_runtime = 0;
    ctx->mainzisegmap_217612_runs = 0;
    ctx->mainzisegmap_218410_total_runtime = 0;
    ctx->mainzisegmap_218410_runs = 0;
    ctx->mainzisegmap_218427_total_runtime = 0;
    ctx->mainzisegmap_218427_runs = 0;
    ctx->mainzisegmap_218457_total_runtime = 0;
    ctx->mainzisegmap_218457_runs = 0;
    ctx->mainzisegmap_218665_total_runtime = 0;
    ctx->mainzisegmap_218665_runs = 0;
    ctx->mainzisegmap_218956_total_runtime = 0;
    ctx->mainzisegmap_218956_runs = 0;
    ctx->mainzisegmap_218973_total_runtime = 0;
    ctx->mainzisegmap_218973_runs = 0;
    ctx->mainzisegmap_219268_total_runtime = 0;
    ctx->mainzisegmap_219268_runs = 0;
    ctx->mainzisegmap_219285_total_runtime = 0;
    ctx->mainzisegmap_219285_runs = 0;
    ctx->mainzisegmap_219672_total_runtime = 0;
    ctx->mainzisegmap_219672_runs = 0;
    ctx->mainzisegmap_219689_total_runtime = 0;
    ctx->mainzisegmap_219689_runs = 0;
    ctx->mainzisegmap_219977_total_runtime = 0;
    ctx->mainzisegmap_219977_runs = 0;
    ctx->mainzisegmap_220194_total_runtime = 0;
    ctx->mainzisegmap_220194_runs = 0;
    ctx->mainzisegmap_220215_total_runtime = 0;
    ctx->mainzisegmap_220215_runs = 0;
    ctx->mainzisegmap_220339_total_runtime = 0;
    ctx->mainzisegmap_220339_runs = 0;
    ctx->mainzisegmap_221037_total_runtime = 0;
    ctx->mainzisegmap_221037_runs = 0;
    ctx->mainzisegmap_221092_total_runtime = 0;
    ctx->mainzisegmap_221092_runs = 0;
    ctx->mainzisegmap_221154_total_runtime = 0;
    ctx->mainzisegmap_221154_runs = 0;
    ctx->mainzisegmap_221240_total_runtime = 0;
    ctx->mainzisegmap_221240_runs = 0;
    ctx->mainzisegmap_221310_total_runtime = 0;
    ctx->mainzisegmap_221310_runs = 0;
    ctx->mainzisegmap_intragroup_199976_total_runtime = 0;
    ctx->mainzisegmap_intragroup_199976_runs = 0;
    ctx->mainzisegmap_intragroup_200331_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200331_runs = 0;
    ctx->mainzisegmap_intragroup_200607_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200607_runs = 0;
    ctx->mainzisegmap_intragroup_200860_total_runtime = 0;
    ctx->mainzisegmap_intragroup_200860_runs = 0;
    ctx->mainzisegmap_intragroup_201764_total_runtime = 0;
    ctx->mainzisegmap_intragroup_201764_runs = 0;
    ctx->mainzisegmap_intragroup_202165_total_runtime = 0;
    ctx->mainzisegmap_intragroup_202165_runs = 0;
    ctx->mainzisegmap_intragroup_202791_total_runtime = 0;
    ctx->mainzisegmap_intragroup_202791_runs = 0;
    ctx->mainzisegmap_intragroup_204851_total_runtime = 0;
    ctx->mainzisegmap_intragroup_204851_runs = 0;
    ctx->mainzisegmap_intragroup_206919_total_runtime = 0;
    ctx->mainzisegmap_intragroup_206919_runs = 0;
    ctx->mainzisegmap_intragroup_209494_total_runtime = 0;
    ctx->mainzisegmap_intragroup_209494_runs = 0;
    ctx->mainzisegmap_intragroup_210266_total_runtime = 0;
    ctx->mainzisegmap_intragroup_210266_runs = 0;
    ctx->mainzisegmap_intragroup_210587_total_runtime = 0;
    ctx->mainzisegmap_intragroup_210587_runs = 0;
    ctx->mainzisegmap_intragroup_211038_total_runtime = 0;
    ctx->mainzisegmap_intragroup_211038_runs = 0;
    ctx->mainzisegmap_intragroup_214752_total_runtime = 0;
    ctx->mainzisegmap_intragroup_214752_runs = 0;
    ctx->mainzisegmap_intragroup_214919_total_runtime = 0;
    ctx->mainzisegmap_intragroup_214919_runs = 0;
    ctx->mainzisegmap_intragroup_215176_total_runtime = 0;
    ctx->mainzisegmap_intragroup_215176_runs = 0;
    ctx->mainzisegmap_intragroup_219000_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219000_runs = 0;
    ctx->mainzisegmap_intragroup_219313_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219313_runs = 0;
    ctx->mainzisegmap_intragroup_219717_total_runtime = 0;
    ctx->mainzisegmap_intragroup_219717_runs = 0;
    ctx->mainzisegmap_intragroup_220067_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220067_runs = 0;
    ctx->mainzisegmap_intragroup_220432_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220432_runs = 0;
    ctx->mainzisegmap_intragroup_220872_total_runtime = 0;
    ctx->mainzisegmap_intragroup_220872_runs = 0;
    ctx->mainzisegred_large_205086_total_runtime = 0;
    ctx->mainzisegred_large_205086_runs = 0;
    ctx->mainzisegred_large_205160_total_runtime = 0;
    ctx->mainzisegred_large_205160_runs = 0;
    ctx->mainzisegred_large_207220_total_runtime = 0;
    ctx->mainzisegred_large_207220_runs = 0;
    ctx->mainzisegred_large_207314_total_runtime = 0;
    ctx->mainzisegred_large_207314_runs = 0;
    ctx->mainzisegred_large_209867_total_runtime = 0;
    ctx->mainzisegred_large_209867_runs = 0;
    ctx->mainzisegred_large_209990_total_runtime = 0;
    ctx->mainzisegred_large_209990_runs = 0;
    ctx->mainzisegred_large_211714_total_runtime = 0;
    ctx->mainzisegred_large_211714_runs = 0;
    ctx->mainzisegred_large_211845_total_runtime = 0;
    ctx->mainzisegred_large_211845_runs = 0;
    ctx->mainzisegred_large_211976_total_runtime = 0;
    ctx->mainzisegred_large_211976_runs = 0;
    ctx->mainzisegred_large_212598_total_runtime = 0;
    ctx->mainzisegred_large_212598_runs = 0;
    ctx->mainzisegred_large_212647_total_runtime = 0;
    ctx->mainzisegred_large_212647_runs = 0;
    ctx->mainzisegred_large_213427_total_runtime = 0;
    ctx->mainzisegred_large_213427_runs = 0;
    ctx->mainzisegred_large_213496_total_runtime = 0;
    ctx->mainzisegred_large_213496_runs = 0;
    ctx->mainzisegred_large_214506_total_runtime = 0;
    ctx->mainzisegred_large_214506_runs = 0;
    ctx->mainzisegred_large_214604_total_runtime = 0;
    ctx->mainzisegred_large_214604_runs = 0;
    ctx->mainzisegred_large_216280_total_runtime = 0;
    ctx->mainzisegred_large_216280_runs = 0;
    ctx->mainzisegred_large_216332_total_runtime = 0;
    ctx->mainzisegred_large_216332_runs = 0;
    ctx->mainzisegred_large_217318_total_runtime = 0;
    ctx->mainzisegred_large_217318_runs = 0;
    ctx->mainzisegred_large_217390_total_runtime = 0;
    ctx->mainzisegred_large_217390_runs = 0;
    ctx->mainzisegred_large_218606_total_runtime = 0;
    ctx->mainzisegred_large_218606_runs = 0;
    ctx->mainzisegred_large_218707_total_runtime = 0;
    ctx->mainzisegred_large_218707_runs = 0;
    ctx->mainzisegred_large_221141_total_runtime = 0;
    ctx->mainzisegred_large_221141_runs = 0;
    ctx->mainzisegred_small_205086_total_runtime = 0;
    ctx->mainzisegred_small_205086_runs = 0;
    ctx->mainzisegred_small_205160_total_runtime = 0;
    ctx->mainzisegred_small_205160_runs = 0;
    ctx->mainzisegred_small_207220_total_runtime = 0;
    ctx->mainzisegred_small_207220_runs = 0;
    ctx->mainzisegred_small_207314_total_runtime = 0;
    ctx->mainzisegred_small_207314_runs = 0;
    ctx->mainzisegred_small_209867_total_runtime = 0;
    ctx->mainzisegred_small_209867_runs = 0;
    ctx->mainzisegred_small_209990_total_runtime = 0;
    ctx->mainzisegred_small_209990_runs = 0;
    ctx->mainzisegred_small_211714_total_runtime = 0;
    ctx->mainzisegred_small_211714_runs = 0;
    ctx->mainzisegred_small_211845_total_runtime = 0;
    ctx->mainzisegred_small_211845_runs = 0;
    ctx->mainzisegred_small_211976_total_runtime = 0;
    ctx->mainzisegred_small_211976_runs = 0;
    ctx->mainzisegred_small_212598_total_runtime = 0;
    ctx->mainzisegred_small_212598_runs = 0;
    ctx->mainzisegred_small_212647_total_runtime = 0;
    ctx->mainzisegred_small_212647_runs = 0;
    ctx->mainzisegred_small_213427_total_runtime = 0;
    ctx->mainzisegred_small_213427_runs = 0;
    ctx->mainzisegred_small_213496_total_runtime = 0;
    ctx->mainzisegred_small_213496_runs = 0;
    ctx->mainzisegred_small_214506_total_runtime = 0;
    ctx->mainzisegred_small_214506_runs = 0;
    ctx->mainzisegred_small_214604_total_runtime = 0;
    ctx->mainzisegred_small_214604_runs = 0;
    ctx->mainzisegred_small_216280_total_runtime = 0;
    ctx->mainzisegred_small_216280_runs = 0;
    ctx->mainzisegred_small_216332_total_runtime = 0;
    ctx->mainzisegred_small_216332_runs = 0;
    ctx->mainzisegred_small_217318_total_runtime = 0;
    ctx->mainzisegred_small_217318_runs = 0;
    ctx->mainzisegred_small_217390_total_runtime = 0;
    ctx->mainzisegred_small_217390_runs = 0;
    ctx->mainzisegred_small_218606_total_runtime = 0;
    ctx->mainzisegred_small_218606_runs = 0;
    ctx->mainzisegred_small_218707_total_runtime = 0;
    ctx->mainzisegred_small_218707_runs = 0;
    ctx->mainzisegred_small_221141_total_runtime = 0;
    ctx->mainzisegred_small_221141_runs = 0;
}
static int init_context_late(struct futhark_context_config *cfg,
                             struct futhark_context *ctx, cl_program prog)
{
    cl_int error;
    cl_int no_error = -1;
    
    ctx->global_failure = clCreateBuffer(ctx->opencl.ctx, CL_MEM_READ_WRITE |
                                         CL_MEM_COPY_HOST_PTR, sizeof(cl_int),
                                         &no_error, &error);
    OPENCL_SUCCEED_OR_RETURN(error);
    // The +1 is to avoid zero-byte allocations.
    ctx->global_failure_args = clCreateBuffer(ctx->opencl.ctx,
                                              CL_MEM_READ_WRITE,
                                              sizeof(int64_t) * (4 + 1), NULL,
                                              &error);
    OPENCL_SUCCEED_OR_RETURN(error);
    {
        ctx->builtinzhreplicate_f32zireplicate_225805 = clCreateKernel(prog,
                                                                       "builtinzhreplicate_f32zireplicate_225805",
                                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "builtin#replicate_f32.replicate_225805");
    }
    {
        ctx->builtinzhreplicate_i64zireplicate_225388 = clCreateKernel(prog,
                                                                       "builtinzhreplicate_i64zireplicate_225388",
                                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "builtin#replicate_i64.replicate_225388");
    }
    {
        ctx->gpu_map_transpose_f32 = clCreateKernel(prog,
                                                    "gpu_map_transpose_f32",
                                                    &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "gpu_map_transpose_f32");
    }
    {
        ctx->gpu_map_transpose_f32_low_height = clCreateKernel(prog,
                                                               "gpu_map_transpose_f32_low_height",
                                                               &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_f32_low_height");
    }
    {
        ctx->gpu_map_transpose_f32_low_width = clCreateKernel(prog,
                                                              "gpu_map_transpose_f32_low_width",
                                                              &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_f32_low_width");
    }
    {
        ctx->gpu_map_transpose_f32_small = clCreateKernel(prog,
                                                          "gpu_map_transpose_f32_small",
                                                          &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_f32_small");
    }
    {
        ctx->gpu_map_transpose_i64 = clCreateKernel(prog,
                                                    "gpu_map_transpose_i64",
                                                    &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "gpu_map_transpose_i64");
    }
    {
        ctx->gpu_map_transpose_i64_low_height = clCreateKernel(prog,
                                                               "gpu_map_transpose_i64_low_height",
                                                               &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_i64_low_height");
    }
    {
        ctx->gpu_map_transpose_i64_low_width = clCreateKernel(prog,
                                                              "gpu_map_transpose_i64_low_width",
                                                              &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_i64_low_width");
    }
    {
        ctx->gpu_map_transpose_i64_small = clCreateKernel(prog,
                                                          "gpu_map_transpose_i64_small",
                                                          &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "gpu_map_transpose_i64_small");
    }
    {
        ctx->mainzicopy_225406 = clCreateKernel(prog, "mainzicopy_225406",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_225406");
    }
    {
        ctx->mainzicopy_225565 = clCreateKernel(prog, "mainzicopy_225565",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_225565");
    }
    {
        ctx->mainzicopy_227488 = clCreateKernel(prog, "mainzicopy_227488",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_227488");
    }
    {
        ctx->mainzicopy_227687 = clCreateKernel(prog, "mainzicopy_227687",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_227687");
    }
    {
        ctx->mainzicopy_227937 = clCreateKernel(prog, "mainzicopy_227937",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_227937");
    }
    {
        ctx->mainzicopy_228315 = clCreateKernel(prog, "mainzicopy_228315",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_228315");
    }
    {
        ctx->mainzicopy_228537 = clCreateKernel(prog, "mainzicopy_228537",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_228537");
    }
    {
        ctx->mainzicopy_228810 = clCreateKernel(prog, "mainzicopy_228810",
                                                &error);
        OPENCL_SUCCEED_FATAL(error);
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.copy_228810");
    }
    {
        ctx->mainziscan_stage1_200090 = clCreateKernel(prog,
                                                       "mainziscan_stage1_200090",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_200090, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_200090");
    }
    {
        ctx->mainziscan_stage1_200642 = clCreateKernel(prog,
                                                       "mainziscan_stage1_200642",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_200642, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_200642");
    }
    {
        ctx->mainziscan_stage1_211766 = clCreateKernel(prog,
                                                       "mainziscan_stage1_211766",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_211766, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_211766, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_211766");
    }
    {
        ctx->mainziscan_stage1_211897 = clCreateKernel(prog,
                                                       "mainziscan_stage1_211897",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_211897, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_211897, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_211897");
    }
    {
        ctx->mainziscan_stage1_212028 = clCreateKernel(prog,
                                                       "mainziscan_stage1_212028",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_212028, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_212028, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_212028");
    }
    {
        ctx->mainziscan_stage1_220969 = clCreateKernel(prog,
                                                       "mainziscan_stage1_220969",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage1_220969, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage1_220969");
    }
    {
        ctx->mainziscan_stage2_200090 = clCreateKernel(prog,
                                                       "mainziscan_stage2_200090",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_200090, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_200090");
    }
    {
        ctx->mainziscan_stage2_200642 = clCreateKernel(prog,
                                                       "mainziscan_stage2_200642",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_200642, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_200642");
    }
    {
        ctx->mainziscan_stage2_211766 = clCreateKernel(prog,
                                                       "mainziscan_stage2_211766",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_211766, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_211766");
    }
    {
        ctx->mainziscan_stage2_211897 = clCreateKernel(prog,
                                                       "mainziscan_stage2_211897",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_211897, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_211897");
    }
    {
        ctx->mainziscan_stage2_212028 = clCreateKernel(prog,
                                                       "mainziscan_stage2_212028",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_212028, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_212028");
    }
    {
        ctx->mainziscan_stage2_220969 = clCreateKernel(prog,
                                                       "mainziscan_stage2_220969",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage2_220969, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage2_220969");
    }
    {
        ctx->mainziscan_stage3_200090 = clCreateKernel(prog,
                                                       "mainziscan_stage3_200090",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_200090, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_200090");
    }
    {
        ctx->mainziscan_stage3_200642 = clCreateKernel(prog,
                                                       "mainziscan_stage3_200642",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_200642, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_200642");
    }
    {
        ctx->mainziscan_stage3_211766 = clCreateKernel(prog,
                                                       "mainziscan_stage3_211766",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_211766, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_211766");
    }
    {
        ctx->mainziscan_stage3_211897 = clCreateKernel(prog,
                                                       "mainziscan_stage3_211897",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_211897, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_211897");
    }
    {
        ctx->mainziscan_stage3_212028 = clCreateKernel(prog,
                                                       "mainziscan_stage3_212028",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_212028, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_212028");
    }
    {
        ctx->mainziscan_stage3_220969 = clCreateKernel(prog,
                                                       "mainziscan_stage3_220969",
                                                       &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainziscan_stage3_220969, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.scan_stage3_220969");
    }
    {
        ctx->mainzisegmap_200128 = clCreateKernel(prog, "mainzisegmap_200128",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_200128, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_200128");
    }
    {
        ctx->mainzisegmap_200253 = clCreateKernel(prog, "mainzisegmap_200253",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_200253, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_200253, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_200253");
    }
    {
        ctx->mainzisegmap_200688 = clCreateKernel(prog, "mainzisegmap_200688",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_200688, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_200688");
    }
    {
        ctx->mainzisegmap_201901 = clCreateKernel(prog, "mainzisegmap_201901",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_201901, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_201901");
    }
    {
        ctx->mainzisegmap_201915 = clCreateKernel(prog, "mainzisegmap_201915",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_201915, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_201915");
    }
    {
        ctx->mainzisegmap_201939 = clCreateKernel(prog, "mainzisegmap_201939",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_201939, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_201939, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_201939");
    }
    {
        ctx->mainzisegmap_202549 = clCreateKernel(prog, "mainzisegmap_202549",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_202549, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_202549");
    }
    {
        ctx->mainzisegmap_202561 = clCreateKernel(prog, "mainzisegmap_202561",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_202561, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_202561");
    }
    {
        ctx->mainzisegmap_202582 = clCreateKernel(prog, "mainzisegmap_202582",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_202582, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_202582, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_202582");
    }
    {
        ctx->mainzisegmap_203175 = clCreateKernel(prog, "mainzisegmap_203175",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203175, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203175");
    }
    {
        ctx->mainzisegmap_203187 = clCreateKernel(prog, "mainzisegmap_203187",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203187, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203187");
    }
    {
        ctx->mainzisegmap_203208 = clCreateKernel(prog, "mainzisegmap_203208",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203208, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203208, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203208");
    }
    {
        ctx->mainzisegmap_203350 = clCreateKernel(prog, "mainzisegmap_203350",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203350, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203350");
    }
    {
        ctx->mainzisegmap_203495 = clCreateKernel(prog, "mainzisegmap_203495",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203495, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203495, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203495");
    }
    {
        ctx->mainzisegmap_203625 = clCreateKernel(prog, "mainzisegmap_203625",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_203625, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_203625");
    }
    {
        ctx->mainzisegmap_204765 = clCreateKernel(prog, "mainzisegmap_204765",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_204765, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_204765");
    }
    {
        ctx->mainzisegmap_204973 = clCreateKernel(prog, "mainzisegmap_204973",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_204973, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_204973");
    }
    {
        ctx->mainzisegmap_205062 = clCreateKernel(prog, "mainzisegmap_205062",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_205062, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_205062");
    }
    {
        ctx->mainzisegmap_205134 = clCreateKernel(prog, "mainzisegmap_205134",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_205134, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_205134");
    }
    {
        ctx->mainzisegmap_205348 = clCreateKernel(prog, "mainzisegmap_205348",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_205348, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_205348");
    }
    {
        ctx->mainzisegmap_206802 = clCreateKernel(prog, "mainzisegmap_206802",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_206802, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_206802");
    }
    {
        ctx->mainzisegmap_207077 = clCreateKernel(prog, "mainzisegmap_207077",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_207077, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_207077");
    }
    {
        ctx->mainzisegmap_207194 = clCreateKernel(prog, "mainzisegmap_207194",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_207194, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_207194");
    }
    {
        ctx->mainzisegmap_207278 = clCreateKernel(prog, "mainzisegmap_207278",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_207278, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_207278");
    }
    {
        ctx->mainzisegmap_207553 = clCreateKernel(prog, "mainzisegmap_207553",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_207553, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_207553");
    }
    {
        ctx->mainzisegmap_209345 = clCreateKernel(prog, "mainzisegmap_209345",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_209345, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_209345");
    }
    {
        ctx->mainzisegmap_209690 = clCreateKernel(prog, "mainzisegmap_209690",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_209690, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_209690");
    }
    {
        ctx->mainzisegmap_209839 = clCreateKernel(prog, "mainzisegmap_209839",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_209839, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_209839");
    }
    {
        ctx->mainzisegmap_209935 = clCreateKernel(prog, "mainzisegmap_209935",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_209935, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_209935");
    }
    {
        ctx->mainzisegmap_211496 = clCreateKernel(prog, "mainzisegmap_211496",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211496, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211496, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_211496");
    }
    {
        ctx->mainzisegmap_211645 = clCreateKernel(prog, "mainzisegmap_211645",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211645, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211645, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_211645");
    }
    {
        ctx->mainzisegmap_211681 = clCreateKernel(prog, "mainzisegmap_211681",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211681, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_211681");
    }
    {
        ctx->mainzisegmap_211812 = clCreateKernel(prog, "mainzisegmap_211812",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211812, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_211812");
    }
    {
        ctx->mainzisegmap_211943 = clCreateKernel(prog, "mainzisegmap_211943",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_211943, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_211943");
    }
    {
        ctx->mainzisegmap_212132 = clCreateKernel(prog, "mainzisegmap_212132",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_212132, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_212132");
    }
    {
        ctx->mainzisegmap_212517 = clCreateKernel(prog, "mainzisegmap_212517",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_212517, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_212517");
    }
    {
        ctx->mainzisegmap_212634 = clCreateKernel(prog, "mainzisegmap_212634",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_212634, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_212634");
    }
    {
        ctx->mainzisegmap_212795 = clCreateKernel(prog, "mainzisegmap_212795",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_212795, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_212795");
    }
    {
        ctx->mainzisegmap_213316 = clCreateKernel(prog, "mainzisegmap_213316",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_213316, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_213316");
    }
    {
        ctx->mainzisegmap_213473 = clCreateKernel(prog, "mainzisegmap_213473",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_213473, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_213473");
    }
    {
        ctx->mainzisegmap_213692 = clCreateKernel(prog, "mainzisegmap_213692",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_213692, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_213692");
    }
    {
        ctx->mainzisegmap_214361 = clCreateKernel(prog, "mainzisegmap_214361",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_214361, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_214361");
    }
    {
        ctx->mainzisegmap_214562 = clCreateKernel(prog, "mainzisegmap_214562",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_214562, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_214562");
    }
    {
        ctx->mainzisegmap_215432 = clCreateKernel(prog, "mainzisegmap_215432",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_215432, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_215432, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_215432");
    }
    {
        ctx->mainzisegmap_215527 = clCreateKernel(prog, "mainzisegmap_215527",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_215527, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_215527");
    }
    {
        ctx->mainzisegmap_215634 = clCreateKernel(prog, "mainzisegmap_215634",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_215634, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_215634, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_215634");
    }
    {
        ctx->mainzisegmap_216150 = clCreateKernel(prog, "mainzisegmap_216150",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216150, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_216150");
    }
    {
        ctx->mainzisegmap_216167 = clCreateKernel(prog, "mainzisegmap_216167",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216167, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216167, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_216167");
    }
    {
        ctx->mainzisegmap_216195 = clCreateKernel(prog, "mainzisegmap_216195",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216195, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_216195");
    }
    {
        ctx->mainzisegmap_216319 = clCreateKernel(prog, "mainzisegmap_216319",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216319, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_216319");
    }
    {
        ctx->mainzisegmap_216506 = clCreateKernel(prog, "mainzisegmap_216506",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216506, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_216506, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_216506");
    }
    {
        ctx->mainzisegmap_217156 = clCreateKernel(prog, "mainzisegmap_217156",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217156, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_217156");
    }
    {
        ctx->mainzisegmap_217173 = clCreateKernel(prog, "mainzisegmap_217173",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217173, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217173, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_217173");
    }
    {
        ctx->mainzisegmap_217203 = clCreateKernel(prog, "mainzisegmap_217203",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217203, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_217203");
    }
    {
        ctx->mainzisegmap_217367 = clCreateKernel(prog, "mainzisegmap_217367",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217367, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_217367");
    }
    {
        ctx->mainzisegmap_217612 = clCreateKernel(prog, "mainzisegmap_217612",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217612, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_217612, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_217612");
    }
    {
        ctx->mainzisegmap_218410 = clCreateKernel(prog, "mainzisegmap_218410",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218410, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218410");
    }
    {
        ctx->mainzisegmap_218427 = clCreateKernel(prog, "mainzisegmap_218427",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218427, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218427, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218427");
    }
    {
        ctx->mainzisegmap_218457 = clCreateKernel(prog, "mainzisegmap_218457",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218457, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218457");
    }
    {
        ctx->mainzisegmap_218665 = clCreateKernel(prog, "mainzisegmap_218665",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218665, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218665");
    }
    {
        ctx->mainzisegmap_218956 = clCreateKernel(prog, "mainzisegmap_218956",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218956, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218956");
    }
    {
        ctx->mainzisegmap_218973 = clCreateKernel(prog, "mainzisegmap_218973",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218973, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_218973, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_218973");
    }
    {
        ctx->mainzisegmap_219268 = clCreateKernel(prog, "mainzisegmap_219268",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219268, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_219268");
    }
    {
        ctx->mainzisegmap_219285 = clCreateKernel(prog, "mainzisegmap_219285",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219285, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219285, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_219285");
    }
    {
        ctx->mainzisegmap_219672 = clCreateKernel(prog, "mainzisegmap_219672",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219672, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_219672");
    }
    {
        ctx->mainzisegmap_219689 = clCreateKernel(prog, "mainzisegmap_219689",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219689, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219689, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_219689");
    }
    {
        ctx->mainzisegmap_219977 = clCreateKernel(prog, "mainzisegmap_219977",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219977, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_219977, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_219977");
    }
    {
        ctx->mainzisegmap_220194 = clCreateKernel(prog, "mainzisegmap_220194",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_220194, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_220194");
    }
    {
        ctx->mainzisegmap_220215 = clCreateKernel(prog, "mainzisegmap_220215",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_220215, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_220215, 2,
                                            sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_220215");
    }
    {
        ctx->mainzisegmap_220339 = clCreateKernel(prog, "mainzisegmap_220339",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_220339, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_220339");
    }
    {
        ctx->mainzisegmap_221037 = clCreateKernel(prog, "mainzisegmap_221037",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_221037, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_221037");
    }
    {
        ctx->mainzisegmap_221092 = clCreateKernel(prog, "mainzisegmap_221092",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_221092, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_221092");
    }
    {
        ctx->mainzisegmap_221154 = clCreateKernel(prog, "mainzisegmap_221154",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_221154, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_221154");
    }
    {
        ctx->mainzisegmap_221240 = clCreateKernel(prog, "mainzisegmap_221240",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_221240, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_221240");
    }
    {
        ctx->mainzisegmap_221310 = clCreateKernel(prog, "mainzisegmap_221310",
                                                  &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_221310, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n", "main.segmap_221310");
    }
    {
        ctx->mainzisegmap_intragroup_199976 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_199976",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_199976");
    }
    {
        ctx->mainzisegmap_intragroup_200331 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_200331",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_200331");
    }
    {
        ctx->mainzisegmap_intragroup_200607 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_200607",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_200607");
    }
    {
        ctx->mainzisegmap_intragroup_200860 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_200860",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                            2, sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_200860");
    }
    {
        ctx->mainzisegmap_intragroup_201764 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_201764",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                            2, sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_201764");
    }
    {
        ctx->mainzisegmap_intragroup_202165 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_202165",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                            2, sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_202165");
    }
    {
        ctx->mainzisegmap_intragroup_202791 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_202791",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                            2, sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_202791");
    }
    {
        ctx->mainzisegmap_intragroup_204851 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_204851",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_204851");
    }
    {
        ctx->mainzisegmap_intragroup_206919 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_206919",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_206919");
    }
    {
        ctx->mainzisegmap_intragroup_209494 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_209494",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_209494");
    }
    {
        ctx->mainzisegmap_intragroup_210266 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_210266",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_210266");
    }
    {
        ctx->mainzisegmap_intragroup_210587 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_210587",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_210587");
    }
    {
        ctx->mainzisegmap_intragroup_211038 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_211038",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_211038");
    }
    {
        ctx->mainzisegmap_intragroup_214752 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_214752",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_214752");
    }
    {
        ctx->mainzisegmap_intragroup_214919 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_214919",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_214919");
    }
    {
        ctx->mainzisegmap_intragroup_215176 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_215176",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_215176");
    }
    {
        ctx->mainzisegmap_intragroup_219000 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_219000",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_219000");
    }
    {
        ctx->mainzisegmap_intragroup_219313 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_219313",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_219313");
    }
    {
        ctx->mainzisegmap_intragroup_219717 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_219717",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_219717");
    }
    {
        ctx->mainzisegmap_intragroup_220067 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_220067",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                            2, sizeof(cl_mem),
                                            &ctx->global_failure_args));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_220067");
    }
    {
        ctx->mainzisegmap_intragroup_220432 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_220432",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_220432");
    }
    {
        ctx->mainzisegmap_intragroup_220872 = clCreateKernel(prog,
                                                             "mainzisegmap_intragroup_220872",
                                                             &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                            0, sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segmap_intragroup_220872");
    }
    {
        ctx->mainzisegred_large_205086 = clCreateKernel(prog,
                                                        "mainzisegred_large_205086",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_205086, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_205086");
    }
    {
        ctx->mainzisegred_large_205160 = clCreateKernel(prog,
                                                        "mainzisegred_large_205160",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_205160, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_205160");
    }
    {
        ctx->mainzisegred_large_207220 = clCreateKernel(prog,
                                                        "mainzisegred_large_207220",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_207220, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_207220");
    }
    {
        ctx->mainzisegred_large_207314 = clCreateKernel(prog,
                                                        "mainzisegred_large_207314",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_207314, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_207314");
    }
    {
        ctx->mainzisegred_large_209867 = clCreateKernel(prog,
                                                        "mainzisegred_large_209867",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_209867, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_209867");
    }
    {
        ctx->mainzisegred_large_209990 = clCreateKernel(prog,
                                                        "mainzisegred_large_209990",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_209990, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_209990");
    }
    {
        ctx->mainzisegred_large_211714 = clCreateKernel(prog,
                                                        "mainzisegred_large_211714",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_211714, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_211714");
    }
    {
        ctx->mainzisegred_large_211845 = clCreateKernel(prog,
                                                        "mainzisegred_large_211845",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_211845, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_211845");
    }
    {
        ctx->mainzisegred_large_211976 = clCreateKernel(prog,
                                                        "mainzisegred_large_211976",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_211976, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_211976");
    }
    {
        ctx->mainzisegred_large_212598 = clCreateKernel(prog,
                                                        "mainzisegred_large_212598",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_212598, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_212598");
    }
    {
        ctx->mainzisegred_large_212647 = clCreateKernel(prog,
                                                        "mainzisegred_large_212647",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_212647, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_212647");
    }
    {
        ctx->mainzisegred_large_213427 = clCreateKernel(prog,
                                                        "mainzisegred_large_213427",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_213427, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_213427");
    }
    {
        ctx->mainzisegred_large_213496 = clCreateKernel(prog,
                                                        "mainzisegred_large_213496",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_213496, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_213496");
    }
    {
        ctx->mainzisegred_large_214506 = clCreateKernel(prog,
                                                        "mainzisegred_large_214506",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_214506, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_214506");
    }
    {
        ctx->mainzisegred_large_214604 = clCreateKernel(prog,
                                                        "mainzisegred_large_214604",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_214604, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_214604");
    }
    {
        ctx->mainzisegred_large_216280 = clCreateKernel(prog,
                                                        "mainzisegred_large_216280",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_216280, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_216280");
    }
    {
        ctx->mainzisegred_large_216332 = clCreateKernel(prog,
                                                        "mainzisegred_large_216332",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_216332, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_216332");
    }
    {
        ctx->mainzisegred_large_217318 = clCreateKernel(prog,
                                                        "mainzisegred_large_217318",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_217318, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_217318");
    }
    {
        ctx->mainzisegred_large_217390 = clCreateKernel(prog,
                                                        "mainzisegred_large_217390",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_217390, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_217390");
    }
    {
        ctx->mainzisegred_large_218606 = clCreateKernel(prog,
                                                        "mainzisegred_large_218606",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_218606, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_218606");
    }
    {
        ctx->mainzisegred_large_218707 = clCreateKernel(prog,
                                                        "mainzisegred_large_218707",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_218707, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_218707");
    }
    {
        ctx->mainzisegred_large_221141 = clCreateKernel(prog,
                                                        "mainzisegred_large_221141",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_large_221141, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_large_221141");
    }
    {
        ctx->mainzisegred_small_205086 = clCreateKernel(prog,
                                                        "mainzisegred_small_205086",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_205086, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_205086");
    }
    {
        ctx->mainzisegred_small_205160 = clCreateKernel(prog,
                                                        "mainzisegred_small_205160",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_205160, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_205160");
    }
    {
        ctx->mainzisegred_small_207220 = clCreateKernel(prog,
                                                        "mainzisegred_small_207220",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_207220, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_207220");
    }
    {
        ctx->mainzisegred_small_207314 = clCreateKernel(prog,
                                                        "mainzisegred_small_207314",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_207314, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_207314");
    }
    {
        ctx->mainzisegred_small_209867 = clCreateKernel(prog,
                                                        "mainzisegred_small_209867",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_209867, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_209867");
    }
    {
        ctx->mainzisegred_small_209990 = clCreateKernel(prog,
                                                        "mainzisegred_small_209990",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_209990, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_209990");
    }
    {
        ctx->mainzisegred_small_211714 = clCreateKernel(prog,
                                                        "mainzisegred_small_211714",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_211714, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_211714");
    }
    {
        ctx->mainzisegred_small_211845 = clCreateKernel(prog,
                                                        "mainzisegred_small_211845",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_211845, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_211845");
    }
    {
        ctx->mainzisegred_small_211976 = clCreateKernel(prog,
                                                        "mainzisegred_small_211976",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_211976, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_211976");
    }
    {
        ctx->mainzisegred_small_212598 = clCreateKernel(prog,
                                                        "mainzisegred_small_212598",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_212598, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_212598");
    }
    {
        ctx->mainzisegred_small_212647 = clCreateKernel(prog,
                                                        "mainzisegred_small_212647",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_212647, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_212647");
    }
    {
        ctx->mainzisegred_small_213427 = clCreateKernel(prog,
                                                        "mainzisegred_small_213427",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_213427, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_213427");
    }
    {
        ctx->mainzisegred_small_213496 = clCreateKernel(prog,
                                                        "mainzisegred_small_213496",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_213496, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_213496");
    }
    {
        ctx->mainzisegred_small_214506 = clCreateKernel(prog,
                                                        "mainzisegred_small_214506",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_214506, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_214506");
    }
    {
        ctx->mainzisegred_small_214604 = clCreateKernel(prog,
                                                        "mainzisegred_small_214604",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_214604, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_214604");
    }
    {
        ctx->mainzisegred_small_216280 = clCreateKernel(prog,
                                                        "mainzisegred_small_216280",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_216280, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_216280");
    }
    {
        ctx->mainzisegred_small_216332 = clCreateKernel(prog,
                                                        "mainzisegred_small_216332",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_216332, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_216332");
    }
    {
        ctx->mainzisegred_small_217318 = clCreateKernel(prog,
                                                        "mainzisegred_small_217318",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_217318, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_217318");
    }
    {
        ctx->mainzisegred_small_217390 = clCreateKernel(prog,
                                                        "mainzisegred_small_217390",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_217390, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_217390");
    }
    {
        ctx->mainzisegred_small_218606 = clCreateKernel(prog,
                                                        "mainzisegred_small_218606",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_218606, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_218606");
    }
    {
        ctx->mainzisegred_small_218707 = clCreateKernel(prog,
                                                        "mainzisegred_small_218707",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_218707, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_218707");
    }
    {
        ctx->mainzisegred_small_221141 = clCreateKernel(prog,
                                                        "mainzisegred_small_221141",
                                                        &error);
        OPENCL_SUCCEED_FATAL(error);
        OPENCL_SUCCEED_FATAL(clSetKernelArg(ctx->mainzisegred_small_221141, 0,
                                            sizeof(cl_mem),
                                            &ctx->global_failure));
        if (ctx->debugging)
            fprintf(ctx->log, "Created kernel %s.\n",
                    "main.segred_small_221141");
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226022.references = NULL;
        ctx->mainzicounter_mem_226022.size = 0;
        ctx->mainzicounter_mem_226022.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226022.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229870,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226110.references = NULL;
        ctx->mainzicounter_mem_226110.size = 0;
        ctx->mainzicounter_mem_226110.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226110.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229886,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226371.references = NULL;
        ctx->mainzicounter_mem_226371.size = 0;
        ctx->mainzicounter_mem_226371.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226371.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229922,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226479.references = NULL;
        ctx->mainzicounter_mem_226479.size = 0;
        ctx->mainzicounter_mem_226479.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226479.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229938,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226784.references = NULL;
        ctx->mainzicounter_mem_226784.size = 0;
        ctx->mainzicounter_mem_226784.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226784.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229974,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_226904.references = NULL;
        ctx->mainzicounter_mem_226904.size = 0;
        ctx->mainzicounter_mem_226904.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_226904.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_229990,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227099.references = NULL;
        ctx->mainzicounter_mem_227099.size = 0;
        ctx->mainzicounter_mem_227099.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227099.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230031,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227242.references = NULL;
        ctx->mainzicounter_mem_227242.size = 0;
        ctx->mainzicounter_mem_227242.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227242.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230062,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227385.references = NULL;
        ctx->mainzicounter_mem_227385.size = 0;
        ctx->mainzicounter_mem_227385.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227385.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230093,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227564.references = NULL;
        ctx->mainzicounter_mem_227564.size = 0;
        ctx->mainzicounter_mem_227564.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227564.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230134,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227646.references = NULL;
        ctx->mainzicounter_mem_227646.size = 0;
        ctx->mainzicounter_mem_227646.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227646.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230150,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227788.references = NULL;
        ctx->mainzicounter_mem_227788.size = 0;
        ctx->mainzicounter_mem_227788.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227788.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230176,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_227890.references = NULL;
        ctx->mainzicounter_mem_227890.size = 0;
        ctx->mainzicounter_mem_227890.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_227890.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230192,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228058.references = NULL;
        ctx->mainzicounter_mem_228058.size = 0;
        ctx->mainzicounter_mem_228058.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228058.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230218,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228172.references = NULL;
        ctx->mainzicounter_mem_228172.size = 0;
        ctx->mainzicounter_mem_228172.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228172.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230234,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228414.references = NULL;
        ctx->mainzicounter_mem_228414.size = 0;
        ctx->mainzicounter_mem_228414.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228414.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230295,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228496.references = NULL;
        ctx->mainzicounter_mem_228496.size = 0;
        ctx->mainzicounter_mem_228496.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228496.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230311,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228661.references = NULL;
        ctx->mainzicounter_mem_228661.size = 0;
        ctx->mainzicounter_mem_228661.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228661.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230347,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228763.references = NULL;
        ctx->mainzicounter_mem_228763.size = 0;
        ctx->mainzicounter_mem_228763.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228763.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230363,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_228954.references = NULL;
        ctx->mainzicounter_mem_228954.size = 0;
        ctx->mainzicounter_mem_228954.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_228954.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230399,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_229068.references = NULL;
        ctx->mainzicounter_mem_229068.size = 0;
        ctx->mainzicounter_mem_229068.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_229068.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230415,
                                                          0, NULL, NULL));
    }
    {
        cl_int success;
        
        ctx->mainzicounter_mem_229579.references = NULL;
        ctx->mainzicounter_mem_229579.size = 0;
        ctx->mainzicounter_mem_229579.mem = clCreateBuffer(ctx->opencl.ctx,
                                                           CL_MEM_READ_WRITE,
                                                           (10240 >
                                                            0 ? 10240 : 1) *
                                                           sizeof(int32_t),
                                                           NULL, &success);
        OPENCL_SUCCEED_OR_RETURN(success);
        if (10240 > 0)
            OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                          ctx->mainzicounter_mem_229579.mem,
                                                          CL_TRUE, 0, 10240 *
                                                          sizeof(int32_t),
                                                          mainzicounter_mem_realtype_230531,
                                                          0, NULL, NULL));
    }
    ctx->tuning_params.builtinzhreplicate_f32zigroup_sizze_225808 =
        &cfg->tuning_params[0];
    ctx->tuning_params.builtinzhreplicate_i64zigroup_sizze_225391 =
        &cfg->tuning_params[1];
    ctx->tuning_params.mainzigroup_sizze_225409 = &cfg->tuning_params[2];
    ctx->tuning_params.mainzigroup_sizze_225568 = &cfg->tuning_params[3];
    ctx->tuning_params.mainzigroup_sizze_227491 = &cfg->tuning_params[4];
    ctx->tuning_params.mainzigroup_sizze_227690 = &cfg->tuning_params[5];
    ctx->tuning_params.mainzigroup_sizze_227940 = &cfg->tuning_params[6];
    ctx->tuning_params.mainzigroup_sizze_228318 = &cfg->tuning_params[7];
    ctx->tuning_params.mainzigroup_sizze_228540 = &cfg->tuning_params[8];
    ctx->tuning_params.mainzigroup_sizze_228813 = &cfg->tuning_params[9];
    ctx->tuning_params.mainzisegmap_group_sizze_200008 =
        &cfg->tuning_params[10];
    ctx->tuning_params.mainzisegmap_group_sizze_200165 =
        &cfg->tuning_params[11];
    ctx->tuning_params.mainzisegmap_group_sizze_200433 =
        &cfg->tuning_params[12];
    ctx->tuning_params.mainzisegmap_group_sizze_201288 =
        &cfg->tuning_params[13];
    ctx->tuning_params.mainzisegmap_group_sizze_201527 =
        &cfg->tuning_params[14];
    ctx->tuning_params.mainzisegmap_group_sizze_201558 =
        &cfg->tuning_params[15];
    ctx->tuning_params.mainzisegmap_group_sizze_202290 =
        &cfg->tuning_params[16];
    ctx->tuning_params.mainzisegmap_group_sizze_202494 =
        &cfg->tuning_params[17];
    ctx->tuning_params.mainzisegmap_group_sizze_202520 =
        &cfg->tuning_params[18];
    ctx->tuning_params.mainzisegmap_group_sizze_202916 =
        &cfg->tuning_params[19];
    ctx->tuning_params.mainzisegmap_group_sizze_203120 =
        &cfg->tuning_params[20];
    ctx->tuning_params.mainzisegmap_group_sizze_203146 =
        &cfg->tuning_params[21];
    ctx->tuning_params.mainzisegmap_group_sizze_203319 =
        &cfg->tuning_params[22];
    ctx->tuning_params.mainzisegmap_group_sizze_203382 =
        &cfg->tuning_params[23];
    ctx->tuning_params.mainzisegmap_group_sizze_203524 =
        &cfg->tuning_params[24];
    ctx->tuning_params.mainzisegmap_group_sizze_203719 =
        &cfg->tuning_params[25];
    ctx->tuning_params.mainzisegmap_group_sizze_204054 =
        &cfg->tuning_params[26];
    ctx->tuning_params.mainzisegmap_group_sizze_204229 =
        &cfg->tuning_params[27];
    ctx->tuning_params.mainzisegmap_group_sizze_204315 =
        &cfg->tuning_params[28];
    ctx->tuning_params.mainzisegmap_group_sizze_205216 =
        &cfg->tuning_params[29];
    ctx->tuning_params.mainzisegmap_group_sizze_205472 =
        &cfg->tuning_params[30];
    ctx->tuning_params.mainzisegmap_group_sizze_205905 =
        &cfg->tuning_params[31];
    ctx->tuning_params.mainzisegmap_group_sizze_206137 =
        &cfg->tuning_params[32];
    ctx->tuning_params.mainzisegmap_group_sizze_206240 =
        &cfg->tuning_params[33];
    ctx->tuning_params.mainzisegmap_group_sizze_207389 =
        &cfg->tuning_params[34];
    ctx->tuning_params.mainzisegmap_group_sizze_207709 =
        &cfg->tuning_params[35];
    ctx->tuning_params.mainzisegmap_group_sizze_208250 =
        &cfg->tuning_params[36];
    ctx->tuning_params.mainzisegmap_group_sizze_208537 =
        &cfg->tuning_params[37];
    ctx->tuning_params.mainzisegmap_group_sizze_208667 =
        &cfg->tuning_params[38];
    ctx->tuning_params.mainzisegmap_group_sizze_211198 =
        &cfg->tuning_params[39];
    ctx->tuning_params.mainzisegmap_group_sizze_211594 =
        &cfg->tuning_params[40];
    ctx->tuning_params.mainzisegmap_group_sizze_211665 =
        &cfg->tuning_params[41];
    ctx->tuning_params.mainzisegmap_group_sizze_211796 =
        &cfg->tuning_params[42];
    ctx->tuning_params.mainzisegmap_group_sizze_211927 =
        &cfg->tuning_params[43];
    ctx->tuning_params.mainzisegmap_group_sizze_212058 =
        &cfg->tuning_params[44];
    ctx->tuning_params.mainzisegmap_group_sizze_212199 =
        &cfg->tuning_params[45];
    ctx->tuning_params.mainzisegmap_group_sizze_212330 =
        &cfg->tuning_params[46];
    ctx->tuning_params.mainzisegmap_group_sizze_212691 =
        &cfg->tuning_params[47];
    ctx->tuning_params.mainzisegmap_group_sizze_212891 =
        &cfg->tuning_params[48];
    ctx->tuning_params.mainzisegmap_group_sizze_213073 =
        &cfg->tuning_params[49];
    ctx->tuning_params.mainzisegmap_group_sizze_213556 =
        &cfg->tuning_params[50];
    ctx->tuning_params.mainzisegmap_group_sizze_213820 =
        &cfg->tuning_params[51];
    ctx->tuning_params.mainzisegmap_group_sizze_214051 =
        &cfg->tuning_params[52];
    ctx->tuning_params.mainzisegmap_group_sizze_215309 =
        &cfg->tuning_params[53];
    ctx->tuning_params.mainzisegmap_group_sizze_215496 =
        &cfg->tuning_params[54];
    ctx->tuning_params.mainzisegmap_group_sizze_215537 =
        &cfg->tuning_params[55];
    ctx->tuning_params.mainzisegmap_group_sizze_215726 =
        &cfg->tuning_params[56];
    ctx->tuning_params.mainzisegmap_group_sizze_215864 =
        &cfg->tuning_params[57];
    ctx->tuning_params.mainzisegmap_group_sizze_216063 =
        &cfg->tuning_params[58];
    ctx->tuning_params.mainzisegmap_group_sizze_216119 =
        &cfg->tuning_params[59];
    ctx->tuning_params.mainzisegmap_group_sizze_216379 =
        &cfg->tuning_params[60];
    ctx->tuning_params.mainzisegmap_group_sizze_216627 =
        &cfg->tuning_params[61];
    ctx->tuning_params.mainzisegmap_group_sizze_216816 =
        &cfg->tuning_params[62];
    ctx->tuning_params.mainzisegmap_group_sizze_217069 =
        &cfg->tuning_params[63];
    ctx->tuning_params.mainzisegmap_group_sizze_217125 =
        &cfg->tuning_params[64];
    ctx->tuning_params.mainzisegmap_group_sizze_217453 =
        &cfg->tuning_params[65];
    ctx->tuning_params.mainzisegmap_group_sizze_217765 =
        &cfg->tuning_params[66];
    ctx->tuning_params.mainzisegmap_group_sizze_218003 =
        &cfg->tuning_params[67];
    ctx->tuning_params.mainzisegmap_group_sizze_218323 =
        &cfg->tuning_params[68];
    ctx->tuning_params.mainzisegmap_group_sizze_218379 =
        &cfg->tuning_params[69];
    ctx->tuning_params.mainzisegmap_group_sizze_218869 =
        &cfg->tuning_params[70];
    ctx->tuning_params.mainzisegmap_group_sizze_218925 =
        &cfg->tuning_params[71];
    ctx->tuning_params.mainzisegmap_group_sizze_219181 =
        &cfg->tuning_params[72];
    ctx->tuning_params.mainzisegmap_group_sizze_219237 =
        &cfg->tuning_params[73];
    ctx->tuning_params.mainzisegmap_group_sizze_219585 =
        &cfg->tuning_params[74];
    ctx->tuning_params.mainzisegmap_group_sizze_219641 =
        &cfg->tuning_params[75];
    ctx->tuning_params.mainzisegmap_group_sizze_219854 =
        &cfg->tuning_params[76];
    ctx->tuning_params.mainzisegmap_group_sizze_220110 =
        &cfg->tuning_params[77];
    ctx->tuning_params.mainzisegmap_group_sizze_220153 =
        &cfg->tuning_params[78];
    ctx->tuning_params.mainzisegmap_group_sizze_220241 =
        &cfg->tuning_params[79];
    ctx->tuning_params.mainzisegmap_group_sizze_220642 =
        &cfg->tuning_params[80];
    ctx->tuning_params.mainzisegmap_group_sizze_221071 =
        &cfg->tuning_params[81];
    ctx->tuning_params.mainzisegmap_group_sizze_221106 =
        &cfg->tuning_params[82];
    ctx->tuning_params.mainzisegmap_group_sizze_221175 =
        &cfg->tuning_params[83];
    ctx->tuning_params.mainzisegmap_group_sizze_221275 =
        &cfg->tuning_params[84];
    ctx->tuning_params.mainzisegmap_num_groups_203526 = &cfg->tuning_params[85];
    ctx->tuning_params.mainzisegmap_num_groups_203721 = &cfg->tuning_params[86];
    ctx->tuning_params.mainzisegmap_num_groups_205218 = &cfg->tuning_params[87];
    ctx->tuning_params.mainzisegmap_num_groups_205474 = &cfg->tuning_params[88];
    ctx->tuning_params.mainzisegmap_num_groups_207391 = &cfg->tuning_params[89];
    ctx->tuning_params.mainzisegmap_num_groups_207711 = &cfg->tuning_params[90];
    ctx->tuning_params.mainzisegmap_num_groups_212060 = &cfg->tuning_params[91];
    ctx->tuning_params.mainzisegmap_num_groups_212693 = &cfg->tuning_params[92];
    ctx->tuning_params.mainzisegmap_num_groups_213558 = &cfg->tuning_params[93];
    ctx->tuning_params.mainzisegmap_num_groups_215539 = &cfg->tuning_params[94];
    ctx->tuning_params.mainzisegmap_num_groups_216381 = &cfg->tuning_params[95];
    ctx->tuning_params.mainzisegmap_num_groups_217455 = &cfg->tuning_params[96];
    ctx->tuning_params.mainzisegmap_num_groups_220243 = &cfg->tuning_params[97];
    ctx->tuning_params.mainzisegred_group_sizze_204157 =
        &cfg->tuning_params[98];
    ctx->tuning_params.mainzisegred_group_sizze_204259 =
        &cfg->tuning_params[99];
    ctx->tuning_params.mainzisegred_group_sizze_206043 =
        &cfg->tuning_params[100];
    ctx->tuning_params.mainzisegred_group_sizze_206176 =
        &cfg->tuning_params[101];
    ctx->tuning_params.mainzisegred_group_sizze_208426 =
        &cfg->tuning_params[102];
    ctx->tuning_params.mainzisegred_group_sizze_208595 =
        &cfg->tuning_params[103];
    ctx->tuning_params.mainzisegred_group_sizze_211691 =
        &cfg->tuning_params[104];
    ctx->tuning_params.mainzisegred_group_sizze_211822 =
        &cfg->tuning_params[105];
    ctx->tuning_params.mainzisegred_group_sizze_211953 =
        &cfg->tuning_params[106];
    ctx->tuning_params.mainzisegred_group_sizze_212276 =
        &cfg->tuning_params[107];
    ctx->tuning_params.mainzisegred_group_sizze_212343 =
        &cfg->tuning_params[108];
    ctx->tuning_params.mainzisegred_group_sizze_213001 =
        &cfg->tuning_params[109];
    ctx->tuning_params.mainzisegred_group_sizze_213095 =
        &cfg->tuning_params[110];
    ctx->tuning_params.mainzisegred_group_sizze_213966 =
        &cfg->tuning_params[111];
    ctx->tuning_params.mainzisegred_group_sizze_214092 =
        &cfg->tuning_params[112];
    ctx->tuning_params.mainzisegred_group_sizze_215807 =
        &cfg->tuning_params[113];
    ctx->tuning_params.mainzisegred_group_sizze_215877 =
        &cfg->tuning_params[114];
    ctx->tuning_params.mainzisegred_group_sizze_216741 =
        &cfg->tuning_params[115];
    ctx->tuning_params.mainzisegred_group_sizze_216838 =
        &cfg->tuning_params[116];
    ctx->tuning_params.mainzisegred_group_sizze_217915 =
        &cfg->tuning_params[117];
    ctx->tuning_params.mainzisegred_group_sizze_218044 =
        &cfg->tuning_params[118];
    ctx->tuning_params.mainzisegred_group_sizze_221118 =
        &cfg->tuning_params[119];
    ctx->tuning_params.mainzisegred_num_groups_204159 =
        &cfg->tuning_params[120];
    ctx->tuning_params.mainzisegred_num_groups_204261 =
        &cfg->tuning_params[121];
    ctx->tuning_params.mainzisegred_num_groups_206045 =
        &cfg->tuning_params[122];
    ctx->tuning_params.mainzisegred_num_groups_206178 =
        &cfg->tuning_params[123];
    ctx->tuning_params.mainzisegred_num_groups_208428 =
        &cfg->tuning_params[124];
    ctx->tuning_params.mainzisegred_num_groups_208597 =
        &cfg->tuning_params[125];
    ctx->tuning_params.mainzisegred_num_groups_211693 =
        &cfg->tuning_params[126];
    ctx->tuning_params.mainzisegred_num_groups_211824 =
        &cfg->tuning_params[127];
    ctx->tuning_params.mainzisegred_num_groups_211955 =
        &cfg->tuning_params[128];
    ctx->tuning_params.mainzisegred_num_groups_212278 =
        &cfg->tuning_params[129];
    ctx->tuning_params.mainzisegred_num_groups_212345 =
        &cfg->tuning_params[130];
    ctx->tuning_params.mainzisegred_num_groups_213003 =
        &cfg->tuning_params[131];
    ctx->tuning_params.mainzisegred_num_groups_213097 =
        &cfg->tuning_params[132];
    ctx->tuning_params.mainzisegred_num_groups_213968 =
        &cfg->tuning_params[133];
    ctx->tuning_params.mainzisegred_num_groups_214094 =
        &cfg->tuning_params[134];
    ctx->tuning_params.mainzisegred_num_groups_215809 =
        &cfg->tuning_params[135];
    ctx->tuning_params.mainzisegred_num_groups_215879 =
        &cfg->tuning_params[136];
    ctx->tuning_params.mainzisegred_num_groups_216743 =
        &cfg->tuning_params[137];
    ctx->tuning_params.mainzisegred_num_groups_216840 =
        &cfg->tuning_params[138];
    ctx->tuning_params.mainzisegred_num_groups_217917 =
        &cfg->tuning_params[139];
    ctx->tuning_params.mainzisegred_num_groups_218046 =
        &cfg->tuning_params[140];
    ctx->tuning_params.mainzisegred_num_groups_221120 =
        &cfg->tuning_params[141];
    ctx->tuning_params.mainzisegscan_group_sizze_200064 =
        &cfg->tuning_params[142];
    ctx->tuning_params.mainzisegscan_group_sizze_200502 =
        &cfg->tuning_params[143];
    ctx->tuning_params.mainzisegscan_group_sizze_211724 =
        &cfg->tuning_params[144];
    ctx->tuning_params.mainzisegscan_group_sizze_211855 =
        &cfg->tuning_params[145];
    ctx->tuning_params.mainzisegscan_group_sizze_211986 =
        &cfg->tuning_params[146];
    ctx->tuning_params.mainzisegscan_group_sizze_220690 =
        &cfg->tuning_params[147];
    ctx->tuning_params.mainzisegscan_num_groups_200066 =
        &cfg->tuning_params[148];
    ctx->tuning_params.mainzisegscan_num_groups_200504 =
        &cfg->tuning_params[149];
    ctx->tuning_params.mainzisegscan_num_groups_211726 =
        &cfg->tuning_params[150];
    ctx->tuning_params.mainzisegscan_num_groups_211857 =
        &cfg->tuning_params[151];
    ctx->tuning_params.mainzisegscan_num_groups_211988 =
        &cfg->tuning_params[152];
    ctx->tuning_params.mainzisegscan_num_groups_220692 =
        &cfg->tuning_params[153];
    ctx->tuning_params.mainzisuff_intra_par_0 = &cfg->tuning_params[154];
    ctx->tuning_params.mainzisuff_intra_par_1 = &cfg->tuning_params[155];
    ctx->tuning_params.mainzisuff_intra_par_13 = &cfg->tuning_params[156];
    ctx->tuning_params.mainzisuff_intra_par_17 = &cfg->tuning_params[157];
    ctx->tuning_params.mainzisuff_intra_par_2 = &cfg->tuning_params[158];
    ctx->tuning_params.mainzisuff_intra_par_3 = &cfg->tuning_params[159];
    ctx->tuning_params.mainzisuff_intra_par_34 = &cfg->tuning_params[160];
    ctx->tuning_params.mainzisuff_intra_par_36 = &cfg->tuning_params[161];
    ctx->tuning_params.mainzisuff_intra_par_37 = &cfg->tuning_params[162];
    ctx->tuning_params.mainzisuff_intra_par_4 = &cfg->tuning_params[163];
    ctx->tuning_params.mainzisuff_intra_par_5 = &cfg->tuning_params[164];
    ctx->tuning_params.mainzisuff_intra_par_6 = &cfg->tuning_params[165];
    ctx->tuning_params.mainzisuff_intra_par_9 = &cfg->tuning_params[166];
    ctx->tuning_params.mainzisuff_outer_par_10 = &cfg->tuning_params[167];
    ctx->tuning_params.mainzisuff_outer_par_11 = &cfg->tuning_params[168];
    ctx->tuning_params.mainzisuff_outer_par_12 = &cfg->tuning_params[169];
    ctx->tuning_params.mainzisuff_outer_par_14 = &cfg->tuning_params[170];
    ctx->tuning_params.mainzisuff_outer_par_15 = &cfg->tuning_params[171];
    ctx->tuning_params.mainzisuff_outer_par_16 = &cfg->tuning_params[172];
    ctx->tuning_params.mainzisuff_outer_par_18 = &cfg->tuning_params[173];
    ctx->tuning_params.mainzisuff_outer_par_19 = &cfg->tuning_params[174];
    ctx->tuning_params.mainzisuff_outer_par_20 = &cfg->tuning_params[175];
    ctx->tuning_params.mainzisuff_outer_par_21 = &cfg->tuning_params[176];
    ctx->tuning_params.mainzisuff_outer_par_22 = &cfg->tuning_params[177];
    ctx->tuning_params.mainzisuff_outer_par_23 = &cfg->tuning_params[178];
    ctx->tuning_params.mainzisuff_outer_par_24 = &cfg->tuning_params[179];
    ctx->tuning_params.mainzisuff_outer_par_25 = &cfg->tuning_params[180];
    ctx->tuning_params.mainzisuff_outer_par_26 = &cfg->tuning_params[181];
    ctx->tuning_params.mainzisuff_outer_par_27 = &cfg->tuning_params[182];
    ctx->tuning_params.mainzisuff_outer_par_28 = &cfg->tuning_params[183];
    ctx->tuning_params.mainzisuff_outer_par_29 = &cfg->tuning_params[184];
    ctx->tuning_params.mainzisuff_outer_par_30 = &cfg->tuning_params[185];
    ctx->tuning_params.mainzisuff_outer_par_31 = &cfg->tuning_params[186];
    ctx->tuning_params.mainzisuff_outer_par_32 = &cfg->tuning_params[187];
    ctx->tuning_params.mainzisuff_outer_par_33 = &cfg->tuning_params[188];
    ctx->tuning_params.mainzisuff_outer_par_35 = &cfg->tuning_params[189];
    ctx->tuning_params.mainzisuff_outer_par_38 = &cfg->tuning_params[190];
    ctx->tuning_params.mainzisuff_outer_par_7 = &cfg->tuning_params[191];
    ctx->tuning_params.mainzisuff_outer_par_8 = &cfg->tuning_params[192];
    init_constants(ctx);
    // Clear the free list of any deallocations that occurred while initialising constants.
    OPENCL_SUCCEED_OR_RETURN(opencl_free_all(&ctx->opencl));
    // The program will be properly freed after all the kernels have also been freed.
    OPENCL_SUCCEED_OR_RETURN(clReleaseProgram(prog));
    return futhark_context_sync(ctx);
}
struct futhark_context *futhark_context_new(struct futhark_context_config *cfg)
{
    assert(!cfg->in_use);
    
    struct futhark_context *ctx =
                           (struct futhark_context *) malloc(sizeof(struct futhark_context));
    
    if (ctx == NULL)
        return NULL;
    ctx->cfg = cfg;
    ctx->cfg->in_use = 1;
    
    int required_types = 0;
    
    init_context_early(cfg, ctx);
    
    cl_program prog = setup_opencl(&ctx->opencl, opencl_program, required_types,
                                   cfg->build_opts);
    
    init_context_late(cfg, ctx, prog);
    return ctx;
}
struct futhark_context *futhark_context_new_with_command_queue(struct futhark_context_config *cfg,
                                                               cl_command_queue queue)
{
    assert(!cfg->in_use);
    
    struct futhark_context *ctx =
                           (struct futhark_context *) malloc(sizeof(struct futhark_context));
    
    if (ctx == NULL)
        return NULL;
    ctx->cfg = cfg;
    ctx->cfg->in_use = 1;
    
    int required_types = 0;
    
    init_context_early(cfg, ctx);
    
    cl_program prog = setup_opencl_with_command_queue(&ctx->opencl, queue,
                                                      opencl_program,
                                                      required_types,
                                                      cfg->build_opts);
    
    init_context_late(cfg, ctx, prog);
    return ctx;
}
void futhark_context_free(struct futhark_context *ctx)
{
    free_constants(ctx);
    free_lock(&ctx->lock);
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->builtinzhreplicate_f32zireplicate_225805));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->builtinzhreplicate_i64zireplicate_225388));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_f32));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_f32_low_height));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_f32_low_width));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_f32_small));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_i64));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_i64_low_height));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_i64_low_width));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->gpu_map_transpose_i64_small));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_225406));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_225565));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_227488));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_227687));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_227937));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_228315));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_228537));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzicopy_228810));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_200090));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_200642));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_211766));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_211897));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_212028));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage1_220969));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_200090));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_200642));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_211766));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_211897));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_212028));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage2_220969));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_200090));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_200642));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_211766));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_211897));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_212028));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainziscan_stage3_220969));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_200128));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_200253));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_200688));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_201901));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_201915));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_201939));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_202549));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_202561));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_202582));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203175));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203187));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203208));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203350));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203495));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_203625));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_204765));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_204973));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_205062));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_205134));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_205348));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_206802));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_207077));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_207194));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_207278));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_207553));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_209345));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_209690));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_209839));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_209935));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_211496));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_211645));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_211681));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_211812));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_211943));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_212132));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_212517));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_212634));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_212795));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_213316));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_213473));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_213692));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_214361));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_214562));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_215432));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_215527));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_215634));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_216150));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_216167));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_216195));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_216319));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_216506));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_217156));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_217173));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_217203));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_217367));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_217612));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218410));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218427));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218457));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218665));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218956));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_218973));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_219268));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_219285));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_219672));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_219689));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_219977));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_220194));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_220215));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_220339));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_221037));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_221092));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_221154));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_221240));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_221310));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_199976));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_200331));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_200607));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_200860));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_201764));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_202165));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_202791));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_204851));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_206919));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_209494));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_210266));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_210587));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_211038));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_214752));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_214919));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_215176));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_219000));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_219313));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_219717));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_220067));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_220432));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegmap_intragroup_220872));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_205086));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_205160));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_207220));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_207314));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_209867));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_209990));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_211714));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_211845));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_211976));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_212598));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_212647));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_213427));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_213496));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_214506));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_214604));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_216280));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_216332));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_217318));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_217390));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_218606));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_218707));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_large_221141));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_205086));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_205160));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_207220));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_207314));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_209867));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_209990));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_211714));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_211845));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_211976));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_212598));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_212647));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_213427));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_213496));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_214506));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_214604));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_216280));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_216332));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_217318));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_217390));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_218606));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_218707));
    OPENCL_SUCCEED_FATAL(clReleaseKernel(ctx->mainzisegred_small_221141));
    teardown_opencl(&ctx->opencl);
    ctx->cfg->in_use = 0;
    free(ctx);
}
int futhark_context_sync(struct futhark_context *ctx)
{
    cl_int failure_idx = -1;
    
    if (ctx->failure_is_an_option) {
        OPENCL_SUCCEED_OR_RETURN(clEnqueueReadBuffer(ctx->opencl.queue,
                                                     ctx->global_failure,
                                                     CL_FALSE, 0,
                                                     sizeof(cl_int),
                                                     &failure_idx, 0, NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_scalar_from_dev_runs,
                                                                                               &ctx->copy_scalar_from_dev_total_runtime)));
        ctx->failure_is_an_option = 0;
    }
    OPENCL_SUCCEED_OR_RETURN(clFinish(ctx->opencl.queue));
    if (failure_idx >= 0) {
        cl_int no_failure = -1;
        
        OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                      ctx->global_failure,
                                                      CL_TRUE, 0,
                                                      sizeof(cl_int),
                                                      &no_failure, 0, NULL,
                                                      NULL));
        
        int64_t args[4 + 1];
        
        OPENCL_SUCCEED_OR_RETURN(clEnqueueReadBuffer(ctx->opencl.queue,
                                                     ctx->global_failure_args,
                                                     CL_TRUE, 0, sizeof(args),
                                                     &args, 0, NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_dev_to_host_runs,
                                                                                               &ctx->copy_dev_to_host_total_runtime)));
        switch (failure_idx) {
            
          case 0:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:124:33-40\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:119:20-125:36\n   #5  /prelude/soacs.fut:59:3-10\n   #6  /prelude/array.fut:195:3-17\n   #7  utils.fut:6:3-16\n   #8  stl.fut:117:12-126:20\n   #9  stl.fut:116:5-127:11\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 1:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 2:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 3:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 4:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 5:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 6:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 7:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 8:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 9:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 10:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 11:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 12:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 13:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:516:15-50\n   #6  stl.fut:142:20-80\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:141:12-143:40\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:140:5-144:36\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 14:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 15:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:517:16-54\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 16:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 17:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 18:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 19:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:150:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:148:5-151:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 20:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:150:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:148:5-151:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 21:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 22:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 23:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:150:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:148:5-151:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 24:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:150:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:148:5-151:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 25:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:150:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:148:5-151:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 26:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 27:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 28:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 29:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:157:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:155:5-158:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 30:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:157:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:155:5-158:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 31:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:449:26-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 32:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:459:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 33:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:460:35-48\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:442:3-469:10\n   #5  loess.fut:502:15-61\n   #6  stl.fut:157:13-60\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:155:5-158:26\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 34:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:484:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:157:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:155:5-158:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 35:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:483:40-47\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  loess.fut:479:3-487:25\n   #4  loess.fut:503:16-51\n   #5  stl.fut:157:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:155:5-158:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 36:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:193:42-57\n   #1  stl.fut:188:28-194:44\n   #2  /prelude/soacs.fut:67:19-23\n   #3  /prelude/soacs.fut:67:3-37\n   #4  stl.fut:186:21-195:50\n   #5  /prelude/soacs.fut:75:22-28\n   #6  /prelude/soacs.fut:75:3-45\n   #7  stl.fut:184:13-196:57\n   #8  stl.fut:401:3-415:29\n   #9  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 37:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  /prelude/array.fut:21:29-32\n   #1  loess.fut:558:12-20\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:556:3-565:9\n   #6  stl.fut:220:31-96\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:219:23-221:48\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:218:15-222:44\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 38:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  /prelude/array.fut:26:29-34\n   #1  loess.fut:560:12-20\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:556:3-565:9\n   #6  stl.fut:220:31-96\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:219:23-221:48\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:218:15-222:44\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 39:
            {
                ctx->error =
                    msgprintf("division by zero\n-> #0  loess.fut:562:22-35\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:556:3-565:9\n   #5  stl.fut:220:31-96\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:219:23-221:48\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:218:15-222:44\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n");
                break;
            }
            
          case 40:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:535:27-33\n   #1  loess.fut:564:15-52\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:556:3-565:9\n   #6  stl.fut:220:31-96\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:219:23-221:48\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:218:15-222:44\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 41:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:536:27-37\n   #1  loess.fut:564:15-52\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:556:3-565:9\n   #6  stl.fut:220:31-96\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:219:23-221:48\n   #10 /prelude/soacs.fut:67:19-23\n   #11 /prelude/soacs.fut:67:3-37\n   #12 stl.fut:218:15-222:44\n   #13 stl.fut:401:3-415:29\n   #14 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 42:
            {
                ctx->error =
                    msgprintf("Index [%lld, %lld] out of bounds for array of shape [%lld][%lld].\n-> #0  stl.fut:226:39-67\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:226:28-74\n   #5  stl.fut:225:21-227:39\n   #6  stl.fut:401:3-415:29\n   #7  stl.fut:385:1-415:29\n",
                              args[0], args[1], args[2], args[3]);
                break;
            }
            
          case 43:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:23-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  stl.fut:38:3-36\n   #9  stl.fut:231:23-47\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 44:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:40-47\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  stl.fut:38:3-36\n   #9  stl.fut:231:23-47\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 45:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:23-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  /prelude/functional.fut:9:42-44\n   #9  stl.fut:38:3-64\n   #10 stl.fut:231:23-47\n   #11 stl.fut:401:3-415:29\n   #12 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 46:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:40-47\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  /prelude/functional.fut:9:42-44\n   #9  stl.fut:38:3-64\n   #10 stl.fut:231:23-47\n   #11 stl.fut:401:3-415:29\n   #12 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 47:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:23-36\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  /prelude/functional.fut:9:42-44\n   #9  stl.fut:38:3-84\n   #10 stl.fut:231:23-47\n   #11 stl.fut:401:3-415:29\n   #12 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 48:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  stl.fut:32:40-47\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:27:13-33:19\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:26:5-34:23\n   #8  /prelude/functional.fut:9:42-44\n   #9  stl.fut:38:3-84\n   #10 stl.fut:231:23-47\n   #11 stl.fut:401:3-415:29\n   #12 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 49:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:535:27-33\n   #1  loess.fut:548:13-50\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:545:3-549:9\n   #6  stl.fut:252:23-75\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:250:15-253:43\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 50:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:536:27-37\n   #1  loess.fut:548:13-50\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:545:3-549:9\n   #6  stl.fut:252:23-75\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:250:15-253:43\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 51:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 52:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 53:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 54:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 55:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 56:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 57:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 58:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 59:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 60:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 61:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 62:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 63:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 64:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 65:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 66:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 67:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:281:33-58\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 68:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:42:43-70\n   #3  stl.fut:282:33-64\n   #4  /prelude/soacs.fut:75:22-28\n   #5  /prelude/soacs.fut:75:3-45\n   #6  stl.fut:279:13-284:41\n   #7  stl.fut:401:3-415:29\n   #8  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 69:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:535:27-33\n   #1  loess.fut:548:13-50\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:545:3-549:9\n   #6  stl.fut:304:23-75\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:303:15-305:43\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 70:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  loess.fut:536:27-37\n   #1  loess.fut:548:13-50\n   #2  /prelude/soacs.fut:59:3-10\n   #3  /prelude/array.fut:195:3-17\n   #4  utils.fut:6:3-16\n   #5  loess.fut:545:3-549:9\n   #6  stl.fut:304:23-75\n   #7  /prelude/soacs.fut:67:19-23\n   #8  /prelude/soacs.fut:67:3-37\n   #9  stl.fut:303:15-305:43\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 71:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:334:21-49\n   #3  /prelude/soacs.fut:67:19-23\n   #4  /prelude/soacs.fut:67:3-37\n   #5  stl.fut:332:13-335:35\n   #6  stl.fut:401:3-415:29\n   #7  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
            
          case 72:
            {
                ctx->error =
                    msgprintf("Index [%lld] out of bounds for array of shape [%lld].\n-> #0  utils.fut:32:29-33\n   #1  utils.fut:32:3-49\n   #2  stl.fut:334:21-49\n   #3  /prelude/soacs.fut:67:19-23\n   #4  /prelude/soacs.fut:67:3-37\n   #5  stl.fut:332:13-335:35\n   #6  stl.fut:401:3-415:29\n   #7  stl.fut:385:1-415:29\n",
                              args[0], args[1]);
                break;
            }
        }
        return 1;
    }
    return 0;
}
cl_command_queue futhark_context_get_command_queue(struct futhark_context *ctx)
{
    return ctx->opencl.queue;
}
static int memblock_unref_device(struct futhark_context *ctx,
                                 struct memblock_device *block, const
                                 char *desc)
{
    if (block->references != NULL) {
        *block->references -= 1;
        if (ctx->detail_memory)
            fprintf(ctx->log,
                    "Unreferencing block %s (allocated as %s) in %s: %d references remaining.\n",
                    desc, block->desc, "space 'device'", *block->references);
        if (*block->references == 0) {
            ctx->cur_mem_usage_device -= block->size;
            OPENCL_SUCCEED_OR_RETURN(opencl_free(&ctx->opencl, block->mem,
                                                 desc));
            free(block->references);
            if (ctx->detail_memory)
                fprintf(ctx->log,
                        "%lld bytes freed (now allocated: %lld bytes)\n",
                        (long long) block->size,
                        (long long) ctx->cur_mem_usage_device);
        }
        block->references = NULL;
    }
    return 0;
}
static int memblock_alloc_device(struct futhark_context *ctx,
                                 struct memblock_device *block, int64_t size,
                                 const char *desc)
{
    if (size < 0)
        futhark_panic(1,
                      "Negative allocation of %lld bytes attempted for %s in %s.\n",
                      (long long) size, desc, "space 'device'",
                      ctx->cur_mem_usage_device);
    
    int ret = memblock_unref_device(ctx, block, desc);
    
    ctx->cur_mem_usage_device += size;
    if (ctx->detail_memory)
        fprintf(ctx->log,
                "Allocating %lld bytes for %s in %s (then allocated: %lld bytes)",
                (long long) size, desc, "space 'device'",
                (long long) ctx->cur_mem_usage_device);
    if (ctx->cur_mem_usage_device > ctx->peak_mem_usage_device) {
        ctx->peak_mem_usage_device = ctx->cur_mem_usage_device;
        if (ctx->detail_memory)
            fprintf(ctx->log, " (new peak).\n");
    } else if (ctx->detail_memory)
        fprintf(ctx->log, ".\n");
    OPENCL_SUCCEED_OR_RETURN(opencl_alloc(&ctx->opencl, (size_t) size, desc,
                                          &block->mem));
    block->references = (int *) malloc(sizeof(int));
    *block->references = 1;
    block->size = size;
    block->desc = desc;
    return ret;
}
static int memblock_set_device(struct futhark_context *ctx,
                               struct memblock_device *lhs,
                               struct memblock_device *rhs, const
                               char *lhs_desc)
{
    int ret = memblock_unref_device(ctx, lhs, lhs_desc);
    
    if (rhs->references != NULL)
        (*rhs->references)++;
    *lhs = *rhs;
    return ret;
}
static int memblock_unref(struct futhark_context *ctx, struct memblock *block,
                          const char *desc)
{
    if (block->references != NULL) {
        *block->references -= 1;
        if (ctx->detail_memory)
            fprintf(ctx->log,
                    "Unreferencing block %s (allocated as %s) in %s: %d references remaining.\n",
                    desc, block->desc, "default space", *block->references);
        if (*block->references == 0) {
            ctx->cur_mem_usage_default -= block->size;
            free(block->mem);
            free(block->references);
            if (ctx->detail_memory)
                fprintf(ctx->log,
                        "%lld bytes freed (now allocated: %lld bytes)\n",
                        (long long) block->size,
                        (long long) ctx->cur_mem_usage_default);
        }
        block->references = NULL;
    }
    return 0;
}
static int memblock_alloc(struct futhark_context *ctx, struct memblock *block,
                          int64_t size, const char *desc)
{
    if (size < 0)
        futhark_panic(1,
                      "Negative allocation of %lld bytes attempted for %s in %s.\n",
                      (long long) size, desc, "default space",
                      ctx->cur_mem_usage_default);
    
    int ret = memblock_unref(ctx, block, desc);
    
    ctx->cur_mem_usage_default += size;
    if (ctx->detail_memory)
        fprintf(ctx->log,
                "Allocating %lld bytes for %s in %s (then allocated: %lld bytes)",
                (long long) size, desc, "default space",
                (long long) ctx->cur_mem_usage_default);
    if (ctx->cur_mem_usage_default > ctx->peak_mem_usage_default) {
        ctx->peak_mem_usage_default = ctx->cur_mem_usage_default;
        if (ctx->detail_memory)
            fprintf(ctx->log, " (new peak).\n");
    } else if (ctx->detail_memory)
        fprintf(ctx->log, ".\n");
    block->mem = (unsigned char *) malloc((size_t) size);
    block->references = (int *) malloc(sizeof(int));
    *block->references = 1;
    block->size = size;
    block->desc = desc;
    return ret;
}
static int memblock_set(struct futhark_context *ctx, struct memblock *lhs,
                        struct memblock *rhs, const char *lhs_desc)
{
    int ret = memblock_unref(ctx, lhs, lhs_desc);
    
    if (rhs->references != NULL)
        (*rhs->references)++;
    *lhs = *rhs;
    return ret;
}
int futhark_get_tuning_param_count(void)
{
    return sizeof(tuning_param_names) / sizeof(tuning_param_names[0]);
}
const char *futhark_get_tuning_param_name(int i)
{
    return tuning_param_names[i];
}
const char *futhark_get_tuning_param_class(int i)
{
    return tuning_param_classes[i];
}
char *futhark_context_report(struct futhark_context *ctx)
{
    if (futhark_context_sync(ctx) != 0)
        return NULL;
    
    struct str_builder builder;
    
    str_builder_init(&builder);
    if (ctx->detail_memory || ctx->profiling || ctx->logging) {
        str_builder(&builder,
                    "Peak memory usage for space 'device': %lld bytes.\n",
                    (long long) ctx->peak_mem_usage_device);
        { }
    }
    if (ctx->profiling) {
        OPENCL_SUCCEED_FATAL(opencl_tally_profiling_records(&ctx->opencl));
        str_builder(&builder,
                    "copy_dev_to_dev                        ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->copy_dev_to_dev_runs,
                    (long) ctx->copy_dev_to_dev_total_runtime /
                    (ctx->copy_dev_to_dev_runs !=
                     0 ? ctx->copy_dev_to_dev_runs : 1),
                    (long) ctx->copy_dev_to_dev_total_runtime);
        ctx->total_runtime += ctx->copy_dev_to_dev_total_runtime;
        ctx->total_runs += ctx->copy_dev_to_dev_runs;
        str_builder(&builder,
                    "copy_dev_to_host                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->copy_dev_to_host_runs,
                    (long) ctx->copy_dev_to_host_total_runtime /
                    (ctx->copy_dev_to_host_runs !=
                     0 ? ctx->copy_dev_to_host_runs : 1),
                    (long) ctx->copy_dev_to_host_total_runtime);
        ctx->total_runtime += ctx->copy_dev_to_host_total_runtime;
        ctx->total_runs += ctx->copy_dev_to_host_runs;
        str_builder(&builder,
                    "copy_host_to_dev                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->copy_host_to_dev_runs,
                    (long) ctx->copy_host_to_dev_total_runtime /
                    (ctx->copy_host_to_dev_runs !=
                     0 ? ctx->copy_host_to_dev_runs : 1),
                    (long) ctx->copy_host_to_dev_total_runtime);
        ctx->total_runtime += ctx->copy_host_to_dev_total_runtime;
        ctx->total_runs += ctx->copy_host_to_dev_runs;
        str_builder(&builder,
                    "copy_scalar_to_dev                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->copy_scalar_to_dev_runs,
                    (long) ctx->copy_scalar_to_dev_total_runtime /
                    (ctx->copy_scalar_to_dev_runs !=
                     0 ? ctx->copy_scalar_to_dev_runs : 1),
                    (long) ctx->copy_scalar_to_dev_total_runtime);
        ctx->total_runtime += ctx->copy_scalar_to_dev_total_runtime;
        ctx->total_runs += ctx->copy_scalar_to_dev_runs;
        str_builder(&builder,
                    "copy_scalar_from_dev                   ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->copy_scalar_from_dev_runs,
                    (long) ctx->copy_scalar_from_dev_total_runtime /
                    (ctx->copy_scalar_from_dev_runs !=
                     0 ? ctx->copy_scalar_from_dev_runs : 1),
                    (long) ctx->copy_scalar_from_dev_total_runtime);
        ctx->total_runtime += ctx->copy_scalar_from_dev_total_runtime;
        ctx->total_runs += ctx->copy_scalar_from_dev_runs;
        str_builder(&builder,
                    "builtin#replicate_f32.replicate_225805 ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->builtinzhreplicate_f32zireplicate_225805_runs,
                    (long) ctx->builtinzhreplicate_f32zireplicate_225805_total_runtime /
                    (ctx->builtinzhreplicate_f32zireplicate_225805_runs !=
                     0 ? ctx->builtinzhreplicate_f32zireplicate_225805_runs : 1),
                    (long) ctx->builtinzhreplicate_f32zireplicate_225805_total_runtime);
        ctx->total_runtime +=
            ctx->builtinzhreplicate_f32zireplicate_225805_total_runtime;
        ctx->total_runs += ctx->builtinzhreplicate_f32zireplicate_225805_runs;
        str_builder(&builder,
                    "builtin#replicate_i64.replicate_225388 ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->builtinzhreplicate_i64zireplicate_225388_runs,
                    (long) ctx->builtinzhreplicate_i64zireplicate_225388_total_runtime /
                    (ctx->builtinzhreplicate_i64zireplicate_225388_runs !=
                     0 ? ctx->builtinzhreplicate_i64zireplicate_225388_runs : 1),
                    (long) ctx->builtinzhreplicate_i64zireplicate_225388_total_runtime);
        ctx->total_runtime +=
            ctx->builtinzhreplicate_i64zireplicate_225388_total_runtime;
        ctx->total_runs += ctx->builtinzhreplicate_i64zireplicate_225388_runs;
        str_builder(&builder,
                    "gpu_map_transpose_f32                  ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_f32_runs,
                    (long) ctx->gpu_map_transpose_f32_total_runtime /
                    (ctx->gpu_map_transpose_f32_runs !=
                     0 ? ctx->gpu_map_transpose_f32_runs : 1),
                    (long) ctx->gpu_map_transpose_f32_total_runtime);
        ctx->total_runtime += ctx->gpu_map_transpose_f32_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_f32_runs;
        str_builder(&builder,
                    "gpu_map_transpose_f32_low_height       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_f32_low_height_runs,
                    (long) ctx->gpu_map_transpose_f32_low_height_total_runtime /
                    (ctx->gpu_map_transpose_f32_low_height_runs !=
                     0 ? ctx->gpu_map_transpose_f32_low_height_runs : 1),
                    (long) ctx->gpu_map_transpose_f32_low_height_total_runtime);
        ctx->total_runtime +=
            ctx->gpu_map_transpose_f32_low_height_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_f32_low_height_runs;
        str_builder(&builder,
                    "gpu_map_transpose_f32_low_width        ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_f32_low_width_runs,
                    (long) ctx->gpu_map_transpose_f32_low_width_total_runtime /
                    (ctx->gpu_map_transpose_f32_low_width_runs !=
                     0 ? ctx->gpu_map_transpose_f32_low_width_runs : 1),
                    (long) ctx->gpu_map_transpose_f32_low_width_total_runtime);
        ctx->total_runtime +=
            ctx->gpu_map_transpose_f32_low_width_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_f32_low_width_runs;
        str_builder(&builder,
                    "gpu_map_transpose_f32_small            ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_f32_small_runs,
                    (long) ctx->gpu_map_transpose_f32_small_total_runtime /
                    (ctx->gpu_map_transpose_f32_small_runs !=
                     0 ? ctx->gpu_map_transpose_f32_small_runs : 1),
                    (long) ctx->gpu_map_transpose_f32_small_total_runtime);
        ctx->total_runtime += ctx->gpu_map_transpose_f32_small_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_f32_small_runs;
        str_builder(&builder,
                    "gpu_map_transpose_i64                  ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_i64_runs,
                    (long) ctx->gpu_map_transpose_i64_total_runtime /
                    (ctx->gpu_map_transpose_i64_runs !=
                     0 ? ctx->gpu_map_transpose_i64_runs : 1),
                    (long) ctx->gpu_map_transpose_i64_total_runtime);
        ctx->total_runtime += ctx->gpu_map_transpose_i64_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_i64_runs;
        str_builder(&builder,
                    "gpu_map_transpose_i64_low_height       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_i64_low_height_runs,
                    (long) ctx->gpu_map_transpose_i64_low_height_total_runtime /
                    (ctx->gpu_map_transpose_i64_low_height_runs !=
                     0 ? ctx->gpu_map_transpose_i64_low_height_runs : 1),
                    (long) ctx->gpu_map_transpose_i64_low_height_total_runtime);
        ctx->total_runtime +=
            ctx->gpu_map_transpose_i64_low_height_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_i64_low_height_runs;
        str_builder(&builder,
                    "gpu_map_transpose_i64_low_width        ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_i64_low_width_runs,
                    (long) ctx->gpu_map_transpose_i64_low_width_total_runtime /
                    (ctx->gpu_map_transpose_i64_low_width_runs !=
                     0 ? ctx->gpu_map_transpose_i64_low_width_runs : 1),
                    (long) ctx->gpu_map_transpose_i64_low_width_total_runtime);
        ctx->total_runtime +=
            ctx->gpu_map_transpose_i64_low_width_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_i64_low_width_runs;
        str_builder(&builder,
                    "gpu_map_transpose_i64_small            ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->gpu_map_transpose_i64_small_runs,
                    (long) ctx->gpu_map_transpose_i64_small_total_runtime /
                    (ctx->gpu_map_transpose_i64_small_runs !=
                     0 ? ctx->gpu_map_transpose_i64_small_runs : 1),
                    (long) ctx->gpu_map_transpose_i64_small_total_runtime);
        ctx->total_runtime += ctx->gpu_map_transpose_i64_small_total_runtime;
        ctx->total_runs += ctx->gpu_map_transpose_i64_small_runs;
        str_builder(&builder,
                    "main.copy_225406                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_225406_runs,
                    (long) ctx->mainzicopy_225406_total_runtime /
                    (ctx->mainzicopy_225406_runs !=
                     0 ? ctx->mainzicopy_225406_runs : 1),
                    (long) ctx->mainzicopy_225406_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_225406_total_runtime;
        ctx->total_runs += ctx->mainzicopy_225406_runs;
        str_builder(&builder,
                    "main.copy_225565                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_225565_runs,
                    (long) ctx->mainzicopy_225565_total_runtime /
                    (ctx->mainzicopy_225565_runs !=
                     0 ? ctx->mainzicopy_225565_runs : 1),
                    (long) ctx->mainzicopy_225565_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_225565_total_runtime;
        ctx->total_runs += ctx->mainzicopy_225565_runs;
        str_builder(&builder,
                    "main.copy_227488                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_227488_runs,
                    (long) ctx->mainzicopy_227488_total_runtime /
                    (ctx->mainzicopy_227488_runs !=
                     0 ? ctx->mainzicopy_227488_runs : 1),
                    (long) ctx->mainzicopy_227488_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_227488_total_runtime;
        ctx->total_runs += ctx->mainzicopy_227488_runs;
        str_builder(&builder,
                    "main.copy_227687                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_227687_runs,
                    (long) ctx->mainzicopy_227687_total_runtime /
                    (ctx->mainzicopy_227687_runs !=
                     0 ? ctx->mainzicopy_227687_runs : 1),
                    (long) ctx->mainzicopy_227687_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_227687_total_runtime;
        ctx->total_runs += ctx->mainzicopy_227687_runs;
        str_builder(&builder,
                    "main.copy_227937                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_227937_runs,
                    (long) ctx->mainzicopy_227937_total_runtime /
                    (ctx->mainzicopy_227937_runs !=
                     0 ? ctx->mainzicopy_227937_runs : 1),
                    (long) ctx->mainzicopy_227937_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_227937_total_runtime;
        ctx->total_runs += ctx->mainzicopy_227937_runs;
        str_builder(&builder,
                    "main.copy_228315                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228315_runs,
                    (long) ctx->mainzicopy_228315_total_runtime /
                    (ctx->mainzicopy_228315_runs !=
                     0 ? ctx->mainzicopy_228315_runs : 1),
                    (long) ctx->mainzicopy_228315_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228315_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228315_runs;
        str_builder(&builder,
                    "main.copy_228537                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228537_runs,
                    (long) ctx->mainzicopy_228537_total_runtime /
                    (ctx->mainzicopy_228537_runs !=
                     0 ? ctx->mainzicopy_228537_runs : 1),
                    (long) ctx->mainzicopy_228537_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228537_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228537_runs;
        str_builder(&builder,
                    "main.copy_228810                       ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzicopy_228810_runs,
                    (long) ctx->mainzicopy_228810_total_runtime /
                    (ctx->mainzicopy_228810_runs !=
                     0 ? ctx->mainzicopy_228810_runs : 1),
                    (long) ctx->mainzicopy_228810_total_runtime);
        ctx->total_runtime += ctx->mainzicopy_228810_total_runtime;
        ctx->total_runs += ctx->mainzicopy_228810_runs;
        str_builder(&builder,
                    "main.scan_stage1_200090                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_200090_runs,
                    (long) ctx->mainziscan_stage1_200090_total_runtime /
                    (ctx->mainziscan_stage1_200090_runs !=
                     0 ? ctx->mainziscan_stage1_200090_runs : 1),
                    (long) ctx->mainziscan_stage1_200090_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_200090_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_200090_runs;
        str_builder(&builder,
                    "main.scan_stage1_200642                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_200642_runs,
                    (long) ctx->mainziscan_stage1_200642_total_runtime /
                    (ctx->mainziscan_stage1_200642_runs !=
                     0 ? ctx->mainziscan_stage1_200642_runs : 1),
                    (long) ctx->mainziscan_stage1_200642_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_200642_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_200642_runs;
        str_builder(&builder,
                    "main.scan_stage1_211766                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_211766_runs,
                    (long) ctx->mainziscan_stage1_211766_total_runtime /
                    (ctx->mainziscan_stage1_211766_runs !=
                     0 ? ctx->mainziscan_stage1_211766_runs : 1),
                    (long) ctx->mainziscan_stage1_211766_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_211766_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_211766_runs;
        str_builder(&builder,
                    "main.scan_stage1_211897                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_211897_runs,
                    (long) ctx->mainziscan_stage1_211897_total_runtime /
                    (ctx->mainziscan_stage1_211897_runs !=
                     0 ? ctx->mainziscan_stage1_211897_runs : 1),
                    (long) ctx->mainziscan_stage1_211897_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_211897_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_211897_runs;
        str_builder(&builder,
                    "main.scan_stage1_212028                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_212028_runs,
                    (long) ctx->mainziscan_stage1_212028_total_runtime /
                    (ctx->mainziscan_stage1_212028_runs !=
                     0 ? ctx->mainziscan_stage1_212028_runs : 1),
                    (long) ctx->mainziscan_stage1_212028_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_212028_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_212028_runs;
        str_builder(&builder,
                    "main.scan_stage1_220969                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage1_220969_runs,
                    (long) ctx->mainziscan_stage1_220969_total_runtime /
                    (ctx->mainziscan_stage1_220969_runs !=
                     0 ? ctx->mainziscan_stage1_220969_runs : 1),
                    (long) ctx->mainziscan_stage1_220969_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage1_220969_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage1_220969_runs;
        str_builder(&builder,
                    "main.scan_stage2_200090                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_200090_runs,
                    (long) ctx->mainziscan_stage2_200090_total_runtime /
                    (ctx->mainziscan_stage2_200090_runs !=
                     0 ? ctx->mainziscan_stage2_200090_runs : 1),
                    (long) ctx->mainziscan_stage2_200090_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_200090_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_200090_runs;
        str_builder(&builder,
                    "main.scan_stage2_200642                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_200642_runs,
                    (long) ctx->mainziscan_stage2_200642_total_runtime /
                    (ctx->mainziscan_stage2_200642_runs !=
                     0 ? ctx->mainziscan_stage2_200642_runs : 1),
                    (long) ctx->mainziscan_stage2_200642_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_200642_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_200642_runs;
        str_builder(&builder,
                    "main.scan_stage2_211766                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_211766_runs,
                    (long) ctx->mainziscan_stage2_211766_total_runtime /
                    (ctx->mainziscan_stage2_211766_runs !=
                     0 ? ctx->mainziscan_stage2_211766_runs : 1),
                    (long) ctx->mainziscan_stage2_211766_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_211766_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_211766_runs;
        str_builder(&builder,
                    "main.scan_stage2_211897                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_211897_runs,
                    (long) ctx->mainziscan_stage2_211897_total_runtime /
                    (ctx->mainziscan_stage2_211897_runs !=
                     0 ? ctx->mainziscan_stage2_211897_runs : 1),
                    (long) ctx->mainziscan_stage2_211897_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_211897_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_211897_runs;
        str_builder(&builder,
                    "main.scan_stage2_212028                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_212028_runs,
                    (long) ctx->mainziscan_stage2_212028_total_runtime /
                    (ctx->mainziscan_stage2_212028_runs !=
                     0 ? ctx->mainziscan_stage2_212028_runs : 1),
                    (long) ctx->mainziscan_stage2_212028_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_212028_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_212028_runs;
        str_builder(&builder,
                    "main.scan_stage2_220969                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage2_220969_runs,
                    (long) ctx->mainziscan_stage2_220969_total_runtime /
                    (ctx->mainziscan_stage2_220969_runs !=
                     0 ? ctx->mainziscan_stage2_220969_runs : 1),
                    (long) ctx->mainziscan_stage2_220969_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage2_220969_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage2_220969_runs;
        str_builder(&builder,
                    "main.scan_stage3_200090                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_200090_runs,
                    (long) ctx->mainziscan_stage3_200090_total_runtime /
                    (ctx->mainziscan_stage3_200090_runs !=
                     0 ? ctx->mainziscan_stage3_200090_runs : 1),
                    (long) ctx->mainziscan_stage3_200090_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_200090_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_200090_runs;
        str_builder(&builder,
                    "main.scan_stage3_200642                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_200642_runs,
                    (long) ctx->mainziscan_stage3_200642_total_runtime /
                    (ctx->mainziscan_stage3_200642_runs !=
                     0 ? ctx->mainziscan_stage3_200642_runs : 1),
                    (long) ctx->mainziscan_stage3_200642_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_200642_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_200642_runs;
        str_builder(&builder,
                    "main.scan_stage3_211766                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_211766_runs,
                    (long) ctx->mainziscan_stage3_211766_total_runtime /
                    (ctx->mainziscan_stage3_211766_runs !=
                     0 ? ctx->mainziscan_stage3_211766_runs : 1),
                    (long) ctx->mainziscan_stage3_211766_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_211766_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_211766_runs;
        str_builder(&builder,
                    "main.scan_stage3_211897                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_211897_runs,
                    (long) ctx->mainziscan_stage3_211897_total_runtime /
                    (ctx->mainziscan_stage3_211897_runs !=
                     0 ? ctx->mainziscan_stage3_211897_runs : 1),
                    (long) ctx->mainziscan_stage3_211897_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_211897_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_211897_runs;
        str_builder(&builder,
                    "main.scan_stage3_212028                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_212028_runs,
                    (long) ctx->mainziscan_stage3_212028_total_runtime /
                    (ctx->mainziscan_stage3_212028_runs !=
                     0 ? ctx->mainziscan_stage3_212028_runs : 1),
                    (long) ctx->mainziscan_stage3_212028_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_212028_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_212028_runs;
        str_builder(&builder,
                    "main.scan_stage3_220969                ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainziscan_stage3_220969_runs,
                    (long) ctx->mainziscan_stage3_220969_total_runtime /
                    (ctx->mainziscan_stage3_220969_runs !=
                     0 ? ctx->mainziscan_stage3_220969_runs : 1),
                    (long) ctx->mainziscan_stage3_220969_total_runtime);
        ctx->total_runtime += ctx->mainziscan_stage3_220969_total_runtime;
        ctx->total_runs += ctx->mainziscan_stage3_220969_runs;
        str_builder(&builder,
                    "main.segmap_200128                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_200128_runs,
                    (long) ctx->mainzisegmap_200128_total_runtime /
                    (ctx->mainzisegmap_200128_runs !=
                     0 ? ctx->mainzisegmap_200128_runs : 1),
                    (long) ctx->mainzisegmap_200128_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_200128_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_200128_runs;
        str_builder(&builder,
                    "main.segmap_200253                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_200253_runs,
                    (long) ctx->mainzisegmap_200253_total_runtime /
                    (ctx->mainzisegmap_200253_runs !=
                     0 ? ctx->mainzisegmap_200253_runs : 1),
                    (long) ctx->mainzisegmap_200253_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_200253_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_200253_runs;
        str_builder(&builder,
                    "main.segmap_200688                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_200688_runs,
                    (long) ctx->mainzisegmap_200688_total_runtime /
                    (ctx->mainzisegmap_200688_runs !=
                     0 ? ctx->mainzisegmap_200688_runs : 1),
                    (long) ctx->mainzisegmap_200688_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_200688_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_200688_runs;
        str_builder(&builder,
                    "main.segmap_201901                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_201901_runs,
                    (long) ctx->mainzisegmap_201901_total_runtime /
                    (ctx->mainzisegmap_201901_runs !=
                     0 ? ctx->mainzisegmap_201901_runs : 1),
                    (long) ctx->mainzisegmap_201901_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_201901_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_201901_runs;
        str_builder(&builder,
                    "main.segmap_201915                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_201915_runs,
                    (long) ctx->mainzisegmap_201915_total_runtime /
                    (ctx->mainzisegmap_201915_runs !=
                     0 ? ctx->mainzisegmap_201915_runs : 1),
                    (long) ctx->mainzisegmap_201915_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_201915_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_201915_runs;
        str_builder(&builder,
                    "main.segmap_201939                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_201939_runs,
                    (long) ctx->mainzisegmap_201939_total_runtime /
                    (ctx->mainzisegmap_201939_runs !=
                     0 ? ctx->mainzisegmap_201939_runs : 1),
                    (long) ctx->mainzisegmap_201939_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_201939_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_201939_runs;
        str_builder(&builder,
                    "main.segmap_202549                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_202549_runs,
                    (long) ctx->mainzisegmap_202549_total_runtime /
                    (ctx->mainzisegmap_202549_runs !=
                     0 ? ctx->mainzisegmap_202549_runs : 1),
                    (long) ctx->mainzisegmap_202549_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_202549_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_202549_runs;
        str_builder(&builder,
                    "main.segmap_202561                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_202561_runs,
                    (long) ctx->mainzisegmap_202561_total_runtime /
                    (ctx->mainzisegmap_202561_runs !=
                     0 ? ctx->mainzisegmap_202561_runs : 1),
                    (long) ctx->mainzisegmap_202561_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_202561_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_202561_runs;
        str_builder(&builder,
                    "main.segmap_202582                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_202582_runs,
                    (long) ctx->mainzisegmap_202582_total_runtime /
                    (ctx->mainzisegmap_202582_runs !=
                     0 ? ctx->mainzisegmap_202582_runs : 1),
                    (long) ctx->mainzisegmap_202582_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_202582_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_202582_runs;
        str_builder(&builder,
                    "main.segmap_203175                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203175_runs,
                    (long) ctx->mainzisegmap_203175_total_runtime /
                    (ctx->mainzisegmap_203175_runs !=
                     0 ? ctx->mainzisegmap_203175_runs : 1),
                    (long) ctx->mainzisegmap_203175_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203175_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203175_runs;
        str_builder(&builder,
                    "main.segmap_203187                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203187_runs,
                    (long) ctx->mainzisegmap_203187_total_runtime /
                    (ctx->mainzisegmap_203187_runs !=
                     0 ? ctx->mainzisegmap_203187_runs : 1),
                    (long) ctx->mainzisegmap_203187_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203187_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203187_runs;
        str_builder(&builder,
                    "main.segmap_203208                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203208_runs,
                    (long) ctx->mainzisegmap_203208_total_runtime /
                    (ctx->mainzisegmap_203208_runs !=
                     0 ? ctx->mainzisegmap_203208_runs : 1),
                    (long) ctx->mainzisegmap_203208_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203208_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203208_runs;
        str_builder(&builder,
                    "main.segmap_203350                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203350_runs,
                    (long) ctx->mainzisegmap_203350_total_runtime /
                    (ctx->mainzisegmap_203350_runs !=
                     0 ? ctx->mainzisegmap_203350_runs : 1),
                    (long) ctx->mainzisegmap_203350_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203350_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203350_runs;
        str_builder(&builder,
                    "main.segmap_203495                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203495_runs,
                    (long) ctx->mainzisegmap_203495_total_runtime /
                    (ctx->mainzisegmap_203495_runs !=
                     0 ? ctx->mainzisegmap_203495_runs : 1),
                    (long) ctx->mainzisegmap_203495_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203495_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203495_runs;
        str_builder(&builder,
                    "main.segmap_203625                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_203625_runs,
                    (long) ctx->mainzisegmap_203625_total_runtime /
                    (ctx->mainzisegmap_203625_runs !=
                     0 ? ctx->mainzisegmap_203625_runs : 1),
                    (long) ctx->mainzisegmap_203625_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_203625_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_203625_runs;
        str_builder(&builder,
                    "main.segmap_204765                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_204765_runs,
                    (long) ctx->mainzisegmap_204765_total_runtime /
                    (ctx->mainzisegmap_204765_runs !=
                     0 ? ctx->mainzisegmap_204765_runs : 1),
                    (long) ctx->mainzisegmap_204765_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_204765_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_204765_runs;
        str_builder(&builder,
                    "main.segmap_204973                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_204973_runs,
                    (long) ctx->mainzisegmap_204973_total_runtime /
                    (ctx->mainzisegmap_204973_runs !=
                     0 ? ctx->mainzisegmap_204973_runs : 1),
                    (long) ctx->mainzisegmap_204973_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_204973_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_204973_runs;
        str_builder(&builder,
                    "main.segmap_205062                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_205062_runs,
                    (long) ctx->mainzisegmap_205062_total_runtime /
                    (ctx->mainzisegmap_205062_runs !=
                     0 ? ctx->mainzisegmap_205062_runs : 1),
                    (long) ctx->mainzisegmap_205062_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_205062_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_205062_runs;
        str_builder(&builder,
                    "main.segmap_205134                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_205134_runs,
                    (long) ctx->mainzisegmap_205134_total_runtime /
                    (ctx->mainzisegmap_205134_runs !=
                     0 ? ctx->mainzisegmap_205134_runs : 1),
                    (long) ctx->mainzisegmap_205134_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_205134_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_205134_runs;
        str_builder(&builder,
                    "main.segmap_205348                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_205348_runs,
                    (long) ctx->mainzisegmap_205348_total_runtime /
                    (ctx->mainzisegmap_205348_runs !=
                     0 ? ctx->mainzisegmap_205348_runs : 1),
                    (long) ctx->mainzisegmap_205348_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_205348_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_205348_runs;
        str_builder(&builder,
                    "main.segmap_206802                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_206802_runs,
                    (long) ctx->mainzisegmap_206802_total_runtime /
                    (ctx->mainzisegmap_206802_runs !=
                     0 ? ctx->mainzisegmap_206802_runs : 1),
                    (long) ctx->mainzisegmap_206802_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_206802_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_206802_runs;
        str_builder(&builder,
                    "main.segmap_207077                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_207077_runs,
                    (long) ctx->mainzisegmap_207077_total_runtime /
                    (ctx->mainzisegmap_207077_runs !=
                     0 ? ctx->mainzisegmap_207077_runs : 1),
                    (long) ctx->mainzisegmap_207077_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_207077_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_207077_runs;
        str_builder(&builder,
                    "main.segmap_207194                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_207194_runs,
                    (long) ctx->mainzisegmap_207194_total_runtime /
                    (ctx->mainzisegmap_207194_runs !=
                     0 ? ctx->mainzisegmap_207194_runs : 1),
                    (long) ctx->mainzisegmap_207194_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_207194_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_207194_runs;
        str_builder(&builder,
                    "main.segmap_207278                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_207278_runs,
                    (long) ctx->mainzisegmap_207278_total_runtime /
                    (ctx->mainzisegmap_207278_runs !=
                     0 ? ctx->mainzisegmap_207278_runs : 1),
                    (long) ctx->mainzisegmap_207278_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_207278_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_207278_runs;
        str_builder(&builder,
                    "main.segmap_207553                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_207553_runs,
                    (long) ctx->mainzisegmap_207553_total_runtime /
                    (ctx->mainzisegmap_207553_runs !=
                     0 ? ctx->mainzisegmap_207553_runs : 1),
                    (long) ctx->mainzisegmap_207553_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_207553_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_207553_runs;
        str_builder(&builder,
                    "main.segmap_209345                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_209345_runs,
                    (long) ctx->mainzisegmap_209345_total_runtime /
                    (ctx->mainzisegmap_209345_runs !=
                     0 ? ctx->mainzisegmap_209345_runs : 1),
                    (long) ctx->mainzisegmap_209345_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_209345_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_209345_runs;
        str_builder(&builder,
                    "main.segmap_209690                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_209690_runs,
                    (long) ctx->mainzisegmap_209690_total_runtime /
                    (ctx->mainzisegmap_209690_runs !=
                     0 ? ctx->mainzisegmap_209690_runs : 1),
                    (long) ctx->mainzisegmap_209690_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_209690_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_209690_runs;
        str_builder(&builder,
                    "main.segmap_209839                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_209839_runs,
                    (long) ctx->mainzisegmap_209839_total_runtime /
                    (ctx->mainzisegmap_209839_runs !=
                     0 ? ctx->mainzisegmap_209839_runs : 1),
                    (long) ctx->mainzisegmap_209839_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_209839_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_209839_runs;
        str_builder(&builder,
                    "main.segmap_209935                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_209935_runs,
                    (long) ctx->mainzisegmap_209935_total_runtime /
                    (ctx->mainzisegmap_209935_runs !=
                     0 ? ctx->mainzisegmap_209935_runs : 1),
                    (long) ctx->mainzisegmap_209935_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_209935_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_209935_runs;
        str_builder(&builder,
                    "main.segmap_211496                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_211496_runs,
                    (long) ctx->mainzisegmap_211496_total_runtime /
                    (ctx->mainzisegmap_211496_runs !=
                     0 ? ctx->mainzisegmap_211496_runs : 1),
                    (long) ctx->mainzisegmap_211496_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_211496_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_211496_runs;
        str_builder(&builder,
                    "main.segmap_211645                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_211645_runs,
                    (long) ctx->mainzisegmap_211645_total_runtime /
                    (ctx->mainzisegmap_211645_runs !=
                     0 ? ctx->mainzisegmap_211645_runs : 1),
                    (long) ctx->mainzisegmap_211645_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_211645_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_211645_runs;
        str_builder(&builder,
                    "main.segmap_211681                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_211681_runs,
                    (long) ctx->mainzisegmap_211681_total_runtime /
                    (ctx->mainzisegmap_211681_runs !=
                     0 ? ctx->mainzisegmap_211681_runs : 1),
                    (long) ctx->mainzisegmap_211681_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_211681_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_211681_runs;
        str_builder(&builder,
                    "main.segmap_211812                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_211812_runs,
                    (long) ctx->mainzisegmap_211812_total_runtime /
                    (ctx->mainzisegmap_211812_runs !=
                     0 ? ctx->mainzisegmap_211812_runs : 1),
                    (long) ctx->mainzisegmap_211812_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_211812_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_211812_runs;
        str_builder(&builder,
                    "main.segmap_211943                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_211943_runs,
                    (long) ctx->mainzisegmap_211943_total_runtime /
                    (ctx->mainzisegmap_211943_runs !=
                     0 ? ctx->mainzisegmap_211943_runs : 1),
                    (long) ctx->mainzisegmap_211943_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_211943_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_211943_runs;
        str_builder(&builder,
                    "main.segmap_212132                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_212132_runs,
                    (long) ctx->mainzisegmap_212132_total_runtime /
                    (ctx->mainzisegmap_212132_runs !=
                     0 ? ctx->mainzisegmap_212132_runs : 1),
                    (long) ctx->mainzisegmap_212132_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_212132_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_212132_runs;
        str_builder(&builder,
                    "main.segmap_212517                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_212517_runs,
                    (long) ctx->mainzisegmap_212517_total_runtime /
                    (ctx->mainzisegmap_212517_runs !=
                     0 ? ctx->mainzisegmap_212517_runs : 1),
                    (long) ctx->mainzisegmap_212517_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_212517_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_212517_runs;
        str_builder(&builder,
                    "main.segmap_212634                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_212634_runs,
                    (long) ctx->mainzisegmap_212634_total_runtime /
                    (ctx->mainzisegmap_212634_runs !=
                     0 ? ctx->mainzisegmap_212634_runs : 1),
                    (long) ctx->mainzisegmap_212634_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_212634_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_212634_runs;
        str_builder(&builder,
                    "main.segmap_212795                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_212795_runs,
                    (long) ctx->mainzisegmap_212795_total_runtime /
                    (ctx->mainzisegmap_212795_runs !=
                     0 ? ctx->mainzisegmap_212795_runs : 1),
                    (long) ctx->mainzisegmap_212795_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_212795_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_212795_runs;
        str_builder(&builder,
                    "main.segmap_213316                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_213316_runs,
                    (long) ctx->mainzisegmap_213316_total_runtime /
                    (ctx->mainzisegmap_213316_runs !=
                     0 ? ctx->mainzisegmap_213316_runs : 1),
                    (long) ctx->mainzisegmap_213316_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_213316_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_213316_runs;
        str_builder(&builder,
                    "main.segmap_213473                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_213473_runs,
                    (long) ctx->mainzisegmap_213473_total_runtime /
                    (ctx->mainzisegmap_213473_runs !=
                     0 ? ctx->mainzisegmap_213473_runs : 1),
                    (long) ctx->mainzisegmap_213473_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_213473_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_213473_runs;
        str_builder(&builder,
                    "main.segmap_213692                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_213692_runs,
                    (long) ctx->mainzisegmap_213692_total_runtime /
                    (ctx->mainzisegmap_213692_runs !=
                     0 ? ctx->mainzisegmap_213692_runs : 1),
                    (long) ctx->mainzisegmap_213692_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_213692_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_213692_runs;
        str_builder(&builder,
                    "main.segmap_214361                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_214361_runs,
                    (long) ctx->mainzisegmap_214361_total_runtime /
                    (ctx->mainzisegmap_214361_runs !=
                     0 ? ctx->mainzisegmap_214361_runs : 1),
                    (long) ctx->mainzisegmap_214361_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_214361_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_214361_runs;
        str_builder(&builder,
                    "main.segmap_214562                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_214562_runs,
                    (long) ctx->mainzisegmap_214562_total_runtime /
                    (ctx->mainzisegmap_214562_runs !=
                     0 ? ctx->mainzisegmap_214562_runs : 1),
                    (long) ctx->mainzisegmap_214562_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_214562_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_214562_runs;
        str_builder(&builder,
                    "main.segmap_215432                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_215432_runs,
                    (long) ctx->mainzisegmap_215432_total_runtime /
                    (ctx->mainzisegmap_215432_runs !=
                     0 ? ctx->mainzisegmap_215432_runs : 1),
                    (long) ctx->mainzisegmap_215432_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_215432_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_215432_runs;
        str_builder(&builder,
                    "main.segmap_215527                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_215527_runs,
                    (long) ctx->mainzisegmap_215527_total_runtime /
                    (ctx->mainzisegmap_215527_runs !=
                     0 ? ctx->mainzisegmap_215527_runs : 1),
                    (long) ctx->mainzisegmap_215527_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_215527_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_215527_runs;
        str_builder(&builder,
                    "main.segmap_215634                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_215634_runs,
                    (long) ctx->mainzisegmap_215634_total_runtime /
                    (ctx->mainzisegmap_215634_runs !=
                     0 ? ctx->mainzisegmap_215634_runs : 1),
                    (long) ctx->mainzisegmap_215634_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_215634_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_215634_runs;
        str_builder(&builder,
                    "main.segmap_216150                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_216150_runs,
                    (long) ctx->mainzisegmap_216150_total_runtime /
                    (ctx->mainzisegmap_216150_runs !=
                     0 ? ctx->mainzisegmap_216150_runs : 1),
                    (long) ctx->mainzisegmap_216150_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_216150_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_216150_runs;
        str_builder(&builder,
                    "main.segmap_216167                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_216167_runs,
                    (long) ctx->mainzisegmap_216167_total_runtime /
                    (ctx->mainzisegmap_216167_runs !=
                     0 ? ctx->mainzisegmap_216167_runs : 1),
                    (long) ctx->mainzisegmap_216167_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_216167_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_216167_runs;
        str_builder(&builder,
                    "main.segmap_216195                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_216195_runs,
                    (long) ctx->mainzisegmap_216195_total_runtime /
                    (ctx->mainzisegmap_216195_runs !=
                     0 ? ctx->mainzisegmap_216195_runs : 1),
                    (long) ctx->mainzisegmap_216195_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_216195_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_216195_runs;
        str_builder(&builder,
                    "main.segmap_216319                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_216319_runs,
                    (long) ctx->mainzisegmap_216319_total_runtime /
                    (ctx->mainzisegmap_216319_runs !=
                     0 ? ctx->mainzisegmap_216319_runs : 1),
                    (long) ctx->mainzisegmap_216319_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_216319_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_216319_runs;
        str_builder(&builder,
                    "main.segmap_216506                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_216506_runs,
                    (long) ctx->mainzisegmap_216506_total_runtime /
                    (ctx->mainzisegmap_216506_runs !=
                     0 ? ctx->mainzisegmap_216506_runs : 1),
                    (long) ctx->mainzisegmap_216506_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_216506_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_216506_runs;
        str_builder(&builder,
                    "main.segmap_217156                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_217156_runs,
                    (long) ctx->mainzisegmap_217156_total_runtime /
                    (ctx->mainzisegmap_217156_runs !=
                     0 ? ctx->mainzisegmap_217156_runs : 1),
                    (long) ctx->mainzisegmap_217156_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_217156_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_217156_runs;
        str_builder(&builder,
                    "main.segmap_217173                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_217173_runs,
                    (long) ctx->mainzisegmap_217173_total_runtime /
                    (ctx->mainzisegmap_217173_runs !=
                     0 ? ctx->mainzisegmap_217173_runs : 1),
                    (long) ctx->mainzisegmap_217173_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_217173_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_217173_runs;
        str_builder(&builder,
                    "main.segmap_217203                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_217203_runs,
                    (long) ctx->mainzisegmap_217203_total_runtime /
                    (ctx->mainzisegmap_217203_runs !=
                     0 ? ctx->mainzisegmap_217203_runs : 1),
                    (long) ctx->mainzisegmap_217203_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_217203_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_217203_runs;
        str_builder(&builder,
                    "main.segmap_217367                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_217367_runs,
                    (long) ctx->mainzisegmap_217367_total_runtime /
                    (ctx->mainzisegmap_217367_runs !=
                     0 ? ctx->mainzisegmap_217367_runs : 1),
                    (long) ctx->mainzisegmap_217367_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_217367_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_217367_runs;
        str_builder(&builder,
                    "main.segmap_217612                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_217612_runs,
                    (long) ctx->mainzisegmap_217612_total_runtime /
                    (ctx->mainzisegmap_217612_runs !=
                     0 ? ctx->mainzisegmap_217612_runs : 1),
                    (long) ctx->mainzisegmap_217612_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_217612_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_217612_runs;
        str_builder(&builder,
                    "main.segmap_218410                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218410_runs,
                    (long) ctx->mainzisegmap_218410_total_runtime /
                    (ctx->mainzisegmap_218410_runs !=
                     0 ? ctx->mainzisegmap_218410_runs : 1),
                    (long) ctx->mainzisegmap_218410_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218410_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218410_runs;
        str_builder(&builder,
                    "main.segmap_218427                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218427_runs,
                    (long) ctx->mainzisegmap_218427_total_runtime /
                    (ctx->mainzisegmap_218427_runs !=
                     0 ? ctx->mainzisegmap_218427_runs : 1),
                    (long) ctx->mainzisegmap_218427_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218427_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218427_runs;
        str_builder(&builder,
                    "main.segmap_218457                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218457_runs,
                    (long) ctx->mainzisegmap_218457_total_runtime /
                    (ctx->mainzisegmap_218457_runs !=
                     0 ? ctx->mainzisegmap_218457_runs : 1),
                    (long) ctx->mainzisegmap_218457_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218457_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218457_runs;
        str_builder(&builder,
                    "main.segmap_218665                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218665_runs,
                    (long) ctx->mainzisegmap_218665_total_runtime /
                    (ctx->mainzisegmap_218665_runs !=
                     0 ? ctx->mainzisegmap_218665_runs : 1),
                    (long) ctx->mainzisegmap_218665_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218665_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218665_runs;
        str_builder(&builder,
                    "main.segmap_218956                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218956_runs,
                    (long) ctx->mainzisegmap_218956_total_runtime /
                    (ctx->mainzisegmap_218956_runs !=
                     0 ? ctx->mainzisegmap_218956_runs : 1),
                    (long) ctx->mainzisegmap_218956_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218956_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218956_runs;
        str_builder(&builder,
                    "main.segmap_218973                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_218973_runs,
                    (long) ctx->mainzisegmap_218973_total_runtime /
                    (ctx->mainzisegmap_218973_runs !=
                     0 ? ctx->mainzisegmap_218973_runs : 1),
                    (long) ctx->mainzisegmap_218973_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_218973_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_218973_runs;
        str_builder(&builder,
                    "main.segmap_219268                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_219268_runs,
                    (long) ctx->mainzisegmap_219268_total_runtime /
                    (ctx->mainzisegmap_219268_runs !=
                     0 ? ctx->mainzisegmap_219268_runs : 1),
                    (long) ctx->mainzisegmap_219268_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_219268_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_219268_runs;
        str_builder(&builder,
                    "main.segmap_219285                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_219285_runs,
                    (long) ctx->mainzisegmap_219285_total_runtime /
                    (ctx->mainzisegmap_219285_runs !=
                     0 ? ctx->mainzisegmap_219285_runs : 1),
                    (long) ctx->mainzisegmap_219285_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_219285_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_219285_runs;
        str_builder(&builder,
                    "main.segmap_219672                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_219672_runs,
                    (long) ctx->mainzisegmap_219672_total_runtime /
                    (ctx->mainzisegmap_219672_runs !=
                     0 ? ctx->mainzisegmap_219672_runs : 1),
                    (long) ctx->mainzisegmap_219672_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_219672_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_219672_runs;
        str_builder(&builder,
                    "main.segmap_219689                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_219689_runs,
                    (long) ctx->mainzisegmap_219689_total_runtime /
                    (ctx->mainzisegmap_219689_runs !=
                     0 ? ctx->mainzisegmap_219689_runs : 1),
                    (long) ctx->mainzisegmap_219689_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_219689_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_219689_runs;
        str_builder(&builder,
                    "main.segmap_219977                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_219977_runs,
                    (long) ctx->mainzisegmap_219977_total_runtime /
                    (ctx->mainzisegmap_219977_runs !=
                     0 ? ctx->mainzisegmap_219977_runs : 1),
                    (long) ctx->mainzisegmap_219977_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_219977_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_219977_runs;
        str_builder(&builder,
                    "main.segmap_220194                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_220194_runs,
                    (long) ctx->mainzisegmap_220194_total_runtime /
                    (ctx->mainzisegmap_220194_runs !=
                     0 ? ctx->mainzisegmap_220194_runs : 1),
                    (long) ctx->mainzisegmap_220194_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_220194_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_220194_runs;
        str_builder(&builder,
                    "main.segmap_220215                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_220215_runs,
                    (long) ctx->mainzisegmap_220215_total_runtime /
                    (ctx->mainzisegmap_220215_runs !=
                     0 ? ctx->mainzisegmap_220215_runs : 1),
                    (long) ctx->mainzisegmap_220215_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_220215_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_220215_runs;
        str_builder(&builder,
                    "main.segmap_220339                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_220339_runs,
                    (long) ctx->mainzisegmap_220339_total_runtime /
                    (ctx->mainzisegmap_220339_runs !=
                     0 ? ctx->mainzisegmap_220339_runs : 1),
                    (long) ctx->mainzisegmap_220339_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_220339_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_220339_runs;
        str_builder(&builder,
                    "main.segmap_221037                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_221037_runs,
                    (long) ctx->mainzisegmap_221037_total_runtime /
                    (ctx->mainzisegmap_221037_runs !=
                     0 ? ctx->mainzisegmap_221037_runs : 1),
                    (long) ctx->mainzisegmap_221037_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_221037_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_221037_runs;
        str_builder(&builder,
                    "main.segmap_221092                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_221092_runs,
                    (long) ctx->mainzisegmap_221092_total_runtime /
                    (ctx->mainzisegmap_221092_runs !=
                     0 ? ctx->mainzisegmap_221092_runs : 1),
                    (long) ctx->mainzisegmap_221092_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_221092_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_221092_runs;
        str_builder(&builder,
                    "main.segmap_221154                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_221154_runs,
                    (long) ctx->mainzisegmap_221154_total_runtime /
                    (ctx->mainzisegmap_221154_runs !=
                     0 ? ctx->mainzisegmap_221154_runs : 1),
                    (long) ctx->mainzisegmap_221154_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_221154_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_221154_runs;
        str_builder(&builder,
                    "main.segmap_221240                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_221240_runs,
                    (long) ctx->mainzisegmap_221240_total_runtime /
                    (ctx->mainzisegmap_221240_runs !=
                     0 ? ctx->mainzisegmap_221240_runs : 1),
                    (long) ctx->mainzisegmap_221240_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_221240_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_221240_runs;
        str_builder(&builder,
                    "main.segmap_221310                     ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_221310_runs,
                    (long) ctx->mainzisegmap_221310_total_runtime /
                    (ctx->mainzisegmap_221310_runs !=
                     0 ? ctx->mainzisegmap_221310_runs : 1),
                    (long) ctx->mainzisegmap_221310_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_221310_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_221310_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_199976          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_199976_runs,
                    (long) ctx->mainzisegmap_intragroup_199976_total_runtime /
                    (ctx->mainzisegmap_intragroup_199976_runs !=
                     0 ? ctx->mainzisegmap_intragroup_199976_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_199976_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_199976_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_199976_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_200331          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_200331_runs,
                    (long) ctx->mainzisegmap_intragroup_200331_total_runtime /
                    (ctx->mainzisegmap_intragroup_200331_runs !=
                     0 ? ctx->mainzisegmap_intragroup_200331_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_200331_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_200331_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_200331_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_200607          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_200607_runs,
                    (long) ctx->mainzisegmap_intragroup_200607_total_runtime /
                    (ctx->mainzisegmap_intragroup_200607_runs !=
                     0 ? ctx->mainzisegmap_intragroup_200607_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_200607_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_200607_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_200607_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_200860          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_200860_runs,
                    (long) ctx->mainzisegmap_intragroup_200860_total_runtime /
                    (ctx->mainzisegmap_intragroup_200860_runs !=
                     0 ? ctx->mainzisegmap_intragroup_200860_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_200860_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_200860_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_200860_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_201764          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_201764_runs,
                    (long) ctx->mainzisegmap_intragroup_201764_total_runtime /
                    (ctx->mainzisegmap_intragroup_201764_runs !=
                     0 ? ctx->mainzisegmap_intragroup_201764_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_201764_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_201764_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_201764_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_202165          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_202165_runs,
                    (long) ctx->mainzisegmap_intragroup_202165_total_runtime /
                    (ctx->mainzisegmap_intragroup_202165_runs !=
                     0 ? ctx->mainzisegmap_intragroup_202165_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_202165_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_202165_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_202165_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_202791          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_202791_runs,
                    (long) ctx->mainzisegmap_intragroup_202791_total_runtime /
                    (ctx->mainzisegmap_intragroup_202791_runs !=
                     0 ? ctx->mainzisegmap_intragroup_202791_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_202791_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_202791_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_202791_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_204851          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_204851_runs,
                    (long) ctx->mainzisegmap_intragroup_204851_total_runtime /
                    (ctx->mainzisegmap_intragroup_204851_runs !=
                     0 ? ctx->mainzisegmap_intragroup_204851_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_204851_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_204851_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_204851_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_206919          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_206919_runs,
                    (long) ctx->mainzisegmap_intragroup_206919_total_runtime /
                    (ctx->mainzisegmap_intragroup_206919_runs !=
                     0 ? ctx->mainzisegmap_intragroup_206919_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_206919_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_206919_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_206919_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_209494          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_209494_runs,
                    (long) ctx->mainzisegmap_intragroup_209494_total_runtime /
                    (ctx->mainzisegmap_intragroup_209494_runs !=
                     0 ? ctx->mainzisegmap_intragroup_209494_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_209494_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_209494_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_209494_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_210266          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_210266_runs,
                    (long) ctx->mainzisegmap_intragroup_210266_total_runtime /
                    (ctx->mainzisegmap_intragroup_210266_runs !=
                     0 ? ctx->mainzisegmap_intragroup_210266_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_210266_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_210266_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_210266_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_210587          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_210587_runs,
                    (long) ctx->mainzisegmap_intragroup_210587_total_runtime /
                    (ctx->mainzisegmap_intragroup_210587_runs !=
                     0 ? ctx->mainzisegmap_intragroup_210587_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_210587_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_210587_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_210587_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_211038          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_211038_runs,
                    (long) ctx->mainzisegmap_intragroup_211038_total_runtime /
                    (ctx->mainzisegmap_intragroup_211038_runs !=
                     0 ? ctx->mainzisegmap_intragroup_211038_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_211038_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_211038_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_211038_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_214752          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_214752_runs,
                    (long) ctx->mainzisegmap_intragroup_214752_total_runtime /
                    (ctx->mainzisegmap_intragroup_214752_runs !=
                     0 ? ctx->mainzisegmap_intragroup_214752_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_214752_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_214752_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_214752_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_214919          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_214919_runs,
                    (long) ctx->mainzisegmap_intragroup_214919_total_runtime /
                    (ctx->mainzisegmap_intragroup_214919_runs !=
                     0 ? ctx->mainzisegmap_intragroup_214919_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_214919_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_214919_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_214919_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_215176          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_215176_runs,
                    (long) ctx->mainzisegmap_intragroup_215176_total_runtime /
                    (ctx->mainzisegmap_intragroup_215176_runs !=
                     0 ? ctx->mainzisegmap_intragroup_215176_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_215176_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_215176_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_215176_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_219000          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_219000_runs,
                    (long) ctx->mainzisegmap_intragroup_219000_total_runtime /
                    (ctx->mainzisegmap_intragroup_219000_runs !=
                     0 ? ctx->mainzisegmap_intragroup_219000_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_219000_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_219000_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_219000_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_219313          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_219313_runs,
                    (long) ctx->mainzisegmap_intragroup_219313_total_runtime /
                    (ctx->mainzisegmap_intragroup_219313_runs !=
                     0 ? ctx->mainzisegmap_intragroup_219313_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_219313_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_219313_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_219313_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_219717          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_219717_runs,
                    (long) ctx->mainzisegmap_intragroup_219717_total_runtime /
                    (ctx->mainzisegmap_intragroup_219717_runs !=
                     0 ? ctx->mainzisegmap_intragroup_219717_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_219717_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_219717_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_219717_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_220067          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_220067_runs,
                    (long) ctx->mainzisegmap_intragroup_220067_total_runtime /
                    (ctx->mainzisegmap_intragroup_220067_runs !=
                     0 ? ctx->mainzisegmap_intragroup_220067_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_220067_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_220067_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_220067_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_220432          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_220432_runs,
                    (long) ctx->mainzisegmap_intragroup_220432_total_runtime /
                    (ctx->mainzisegmap_intragroup_220432_runs !=
                     0 ? ctx->mainzisegmap_intragroup_220432_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_220432_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_220432_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_220432_runs;
        str_builder(&builder,
                    "main.segmap_intragroup_220872          ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegmap_intragroup_220872_runs,
                    (long) ctx->mainzisegmap_intragroup_220872_total_runtime /
                    (ctx->mainzisegmap_intragroup_220872_runs !=
                     0 ? ctx->mainzisegmap_intragroup_220872_runs : 1),
                    (long) ctx->mainzisegmap_intragroup_220872_total_runtime);
        ctx->total_runtime += ctx->mainzisegmap_intragroup_220872_total_runtime;
        ctx->total_runs += ctx->mainzisegmap_intragroup_220872_runs;
        str_builder(&builder,
                    "main.segred_large_205086               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_205086_runs,
                    (long) ctx->mainzisegred_large_205086_total_runtime /
                    (ctx->mainzisegred_large_205086_runs !=
                     0 ? ctx->mainzisegred_large_205086_runs : 1),
                    (long) ctx->mainzisegred_large_205086_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_205086_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_205086_runs;
        str_builder(&builder,
                    "main.segred_large_205160               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_205160_runs,
                    (long) ctx->mainzisegred_large_205160_total_runtime /
                    (ctx->mainzisegred_large_205160_runs !=
                     0 ? ctx->mainzisegred_large_205160_runs : 1),
                    (long) ctx->mainzisegred_large_205160_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_205160_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_205160_runs;
        str_builder(&builder,
                    "main.segred_large_207220               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_207220_runs,
                    (long) ctx->mainzisegred_large_207220_total_runtime /
                    (ctx->mainzisegred_large_207220_runs !=
                     0 ? ctx->mainzisegred_large_207220_runs : 1),
                    (long) ctx->mainzisegred_large_207220_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_207220_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_207220_runs;
        str_builder(&builder,
                    "main.segred_large_207314               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_207314_runs,
                    (long) ctx->mainzisegred_large_207314_total_runtime /
                    (ctx->mainzisegred_large_207314_runs !=
                     0 ? ctx->mainzisegred_large_207314_runs : 1),
                    (long) ctx->mainzisegred_large_207314_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_207314_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_207314_runs;
        str_builder(&builder,
                    "main.segred_large_209867               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_209867_runs,
                    (long) ctx->mainzisegred_large_209867_total_runtime /
                    (ctx->mainzisegred_large_209867_runs !=
                     0 ? ctx->mainzisegred_large_209867_runs : 1),
                    (long) ctx->mainzisegred_large_209867_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_209867_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_209867_runs;
        str_builder(&builder,
                    "main.segred_large_209990               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_209990_runs,
                    (long) ctx->mainzisegred_large_209990_total_runtime /
                    (ctx->mainzisegred_large_209990_runs !=
                     0 ? ctx->mainzisegred_large_209990_runs : 1),
                    (long) ctx->mainzisegred_large_209990_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_209990_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_209990_runs;
        str_builder(&builder,
                    "main.segred_large_211714               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_211714_runs,
                    (long) ctx->mainzisegred_large_211714_total_runtime /
                    (ctx->mainzisegred_large_211714_runs !=
                     0 ? ctx->mainzisegred_large_211714_runs : 1),
                    (long) ctx->mainzisegred_large_211714_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_211714_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_211714_runs;
        str_builder(&builder,
                    "main.segred_large_211845               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_211845_runs,
                    (long) ctx->mainzisegred_large_211845_total_runtime /
                    (ctx->mainzisegred_large_211845_runs !=
                     0 ? ctx->mainzisegred_large_211845_runs : 1),
                    (long) ctx->mainzisegred_large_211845_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_211845_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_211845_runs;
        str_builder(&builder,
                    "main.segred_large_211976               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_211976_runs,
                    (long) ctx->mainzisegred_large_211976_total_runtime /
                    (ctx->mainzisegred_large_211976_runs !=
                     0 ? ctx->mainzisegred_large_211976_runs : 1),
                    (long) ctx->mainzisegred_large_211976_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_211976_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_211976_runs;
        str_builder(&builder,
                    "main.segred_large_212598               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_212598_runs,
                    (long) ctx->mainzisegred_large_212598_total_runtime /
                    (ctx->mainzisegred_large_212598_runs !=
                     0 ? ctx->mainzisegred_large_212598_runs : 1),
                    (long) ctx->mainzisegred_large_212598_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_212598_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_212598_runs;
        str_builder(&builder,
                    "main.segred_large_212647               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_212647_runs,
                    (long) ctx->mainzisegred_large_212647_total_runtime /
                    (ctx->mainzisegred_large_212647_runs !=
                     0 ? ctx->mainzisegred_large_212647_runs : 1),
                    (long) ctx->mainzisegred_large_212647_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_212647_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_212647_runs;
        str_builder(&builder,
                    "main.segred_large_213427               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_213427_runs,
                    (long) ctx->mainzisegred_large_213427_total_runtime /
                    (ctx->mainzisegred_large_213427_runs !=
                     0 ? ctx->mainzisegred_large_213427_runs : 1),
                    (long) ctx->mainzisegred_large_213427_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_213427_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_213427_runs;
        str_builder(&builder,
                    "main.segred_large_213496               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_213496_runs,
                    (long) ctx->mainzisegred_large_213496_total_runtime /
                    (ctx->mainzisegred_large_213496_runs !=
                     0 ? ctx->mainzisegred_large_213496_runs : 1),
                    (long) ctx->mainzisegred_large_213496_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_213496_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_213496_runs;
        str_builder(&builder,
                    "main.segred_large_214506               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_214506_runs,
                    (long) ctx->mainzisegred_large_214506_total_runtime /
                    (ctx->mainzisegred_large_214506_runs !=
                     0 ? ctx->mainzisegred_large_214506_runs : 1),
                    (long) ctx->mainzisegred_large_214506_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_214506_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_214506_runs;
        str_builder(&builder,
                    "main.segred_large_214604               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_214604_runs,
                    (long) ctx->mainzisegred_large_214604_total_runtime /
                    (ctx->mainzisegred_large_214604_runs !=
                     0 ? ctx->mainzisegred_large_214604_runs : 1),
                    (long) ctx->mainzisegred_large_214604_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_214604_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_214604_runs;
        str_builder(&builder,
                    "main.segred_large_216280               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_216280_runs,
                    (long) ctx->mainzisegred_large_216280_total_runtime /
                    (ctx->mainzisegred_large_216280_runs !=
                     0 ? ctx->mainzisegred_large_216280_runs : 1),
                    (long) ctx->mainzisegred_large_216280_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_216280_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_216280_runs;
        str_builder(&builder,
                    "main.segred_large_216332               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_216332_runs,
                    (long) ctx->mainzisegred_large_216332_total_runtime /
                    (ctx->mainzisegred_large_216332_runs !=
                     0 ? ctx->mainzisegred_large_216332_runs : 1),
                    (long) ctx->mainzisegred_large_216332_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_216332_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_216332_runs;
        str_builder(&builder,
                    "main.segred_large_217318               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_217318_runs,
                    (long) ctx->mainzisegred_large_217318_total_runtime /
                    (ctx->mainzisegred_large_217318_runs !=
                     0 ? ctx->mainzisegred_large_217318_runs : 1),
                    (long) ctx->mainzisegred_large_217318_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_217318_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_217318_runs;
        str_builder(&builder,
                    "main.segred_large_217390               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_217390_runs,
                    (long) ctx->mainzisegred_large_217390_total_runtime /
                    (ctx->mainzisegred_large_217390_runs !=
                     0 ? ctx->mainzisegred_large_217390_runs : 1),
                    (long) ctx->mainzisegred_large_217390_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_217390_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_217390_runs;
        str_builder(&builder,
                    "main.segred_large_218606               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_218606_runs,
                    (long) ctx->mainzisegred_large_218606_total_runtime /
                    (ctx->mainzisegred_large_218606_runs !=
                     0 ? ctx->mainzisegred_large_218606_runs : 1),
                    (long) ctx->mainzisegred_large_218606_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_218606_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_218606_runs;
        str_builder(&builder,
                    "main.segred_large_218707               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_218707_runs,
                    (long) ctx->mainzisegred_large_218707_total_runtime /
                    (ctx->mainzisegred_large_218707_runs !=
                     0 ? ctx->mainzisegred_large_218707_runs : 1),
                    (long) ctx->mainzisegred_large_218707_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_218707_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_218707_runs;
        str_builder(&builder,
                    "main.segred_large_221141               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_large_221141_runs,
                    (long) ctx->mainzisegred_large_221141_total_runtime /
                    (ctx->mainzisegred_large_221141_runs !=
                     0 ? ctx->mainzisegred_large_221141_runs : 1),
                    (long) ctx->mainzisegred_large_221141_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_large_221141_total_runtime;
        ctx->total_runs += ctx->mainzisegred_large_221141_runs;
        str_builder(&builder,
                    "main.segred_small_205086               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_205086_runs,
                    (long) ctx->mainzisegred_small_205086_total_runtime /
                    (ctx->mainzisegred_small_205086_runs !=
                     0 ? ctx->mainzisegred_small_205086_runs : 1),
                    (long) ctx->mainzisegred_small_205086_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_205086_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_205086_runs;
        str_builder(&builder,
                    "main.segred_small_205160               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_205160_runs,
                    (long) ctx->mainzisegred_small_205160_total_runtime /
                    (ctx->mainzisegred_small_205160_runs !=
                     0 ? ctx->mainzisegred_small_205160_runs : 1),
                    (long) ctx->mainzisegred_small_205160_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_205160_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_205160_runs;
        str_builder(&builder,
                    "main.segred_small_207220               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_207220_runs,
                    (long) ctx->mainzisegred_small_207220_total_runtime /
                    (ctx->mainzisegred_small_207220_runs !=
                     0 ? ctx->mainzisegred_small_207220_runs : 1),
                    (long) ctx->mainzisegred_small_207220_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_207220_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_207220_runs;
        str_builder(&builder,
                    "main.segred_small_207314               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_207314_runs,
                    (long) ctx->mainzisegred_small_207314_total_runtime /
                    (ctx->mainzisegred_small_207314_runs !=
                     0 ? ctx->mainzisegred_small_207314_runs : 1),
                    (long) ctx->mainzisegred_small_207314_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_207314_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_207314_runs;
        str_builder(&builder,
                    "main.segred_small_209867               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_209867_runs,
                    (long) ctx->mainzisegred_small_209867_total_runtime /
                    (ctx->mainzisegred_small_209867_runs !=
                     0 ? ctx->mainzisegred_small_209867_runs : 1),
                    (long) ctx->mainzisegred_small_209867_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_209867_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_209867_runs;
        str_builder(&builder,
                    "main.segred_small_209990               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_209990_runs,
                    (long) ctx->mainzisegred_small_209990_total_runtime /
                    (ctx->mainzisegred_small_209990_runs !=
                     0 ? ctx->mainzisegred_small_209990_runs : 1),
                    (long) ctx->mainzisegred_small_209990_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_209990_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_209990_runs;
        str_builder(&builder,
                    "main.segred_small_211714               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_211714_runs,
                    (long) ctx->mainzisegred_small_211714_total_runtime /
                    (ctx->mainzisegred_small_211714_runs !=
                     0 ? ctx->mainzisegred_small_211714_runs : 1),
                    (long) ctx->mainzisegred_small_211714_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_211714_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_211714_runs;
        str_builder(&builder,
                    "main.segred_small_211845               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_211845_runs,
                    (long) ctx->mainzisegred_small_211845_total_runtime /
                    (ctx->mainzisegred_small_211845_runs !=
                     0 ? ctx->mainzisegred_small_211845_runs : 1),
                    (long) ctx->mainzisegred_small_211845_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_211845_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_211845_runs;
        str_builder(&builder,
                    "main.segred_small_211976               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_211976_runs,
                    (long) ctx->mainzisegred_small_211976_total_runtime /
                    (ctx->mainzisegred_small_211976_runs !=
                     0 ? ctx->mainzisegred_small_211976_runs : 1),
                    (long) ctx->mainzisegred_small_211976_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_211976_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_211976_runs;
        str_builder(&builder,
                    "main.segred_small_212598               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_212598_runs,
                    (long) ctx->mainzisegred_small_212598_total_runtime /
                    (ctx->mainzisegred_small_212598_runs !=
                     0 ? ctx->mainzisegred_small_212598_runs : 1),
                    (long) ctx->mainzisegred_small_212598_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_212598_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_212598_runs;
        str_builder(&builder,
                    "main.segred_small_212647               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_212647_runs,
                    (long) ctx->mainzisegred_small_212647_total_runtime /
                    (ctx->mainzisegred_small_212647_runs !=
                     0 ? ctx->mainzisegred_small_212647_runs : 1),
                    (long) ctx->mainzisegred_small_212647_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_212647_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_212647_runs;
        str_builder(&builder,
                    "main.segred_small_213427               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_213427_runs,
                    (long) ctx->mainzisegred_small_213427_total_runtime /
                    (ctx->mainzisegred_small_213427_runs !=
                     0 ? ctx->mainzisegred_small_213427_runs : 1),
                    (long) ctx->mainzisegred_small_213427_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_213427_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_213427_runs;
        str_builder(&builder,
                    "main.segred_small_213496               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_213496_runs,
                    (long) ctx->mainzisegred_small_213496_total_runtime /
                    (ctx->mainzisegred_small_213496_runs !=
                     0 ? ctx->mainzisegred_small_213496_runs : 1),
                    (long) ctx->mainzisegred_small_213496_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_213496_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_213496_runs;
        str_builder(&builder,
                    "main.segred_small_214506               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_214506_runs,
                    (long) ctx->mainzisegred_small_214506_total_runtime /
                    (ctx->mainzisegred_small_214506_runs !=
                     0 ? ctx->mainzisegred_small_214506_runs : 1),
                    (long) ctx->mainzisegred_small_214506_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_214506_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_214506_runs;
        str_builder(&builder,
                    "main.segred_small_214604               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_214604_runs,
                    (long) ctx->mainzisegred_small_214604_total_runtime /
                    (ctx->mainzisegred_small_214604_runs !=
                     0 ? ctx->mainzisegred_small_214604_runs : 1),
                    (long) ctx->mainzisegred_small_214604_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_214604_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_214604_runs;
        str_builder(&builder,
                    "main.segred_small_216280               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_216280_runs,
                    (long) ctx->mainzisegred_small_216280_total_runtime /
                    (ctx->mainzisegred_small_216280_runs !=
                     0 ? ctx->mainzisegred_small_216280_runs : 1),
                    (long) ctx->mainzisegred_small_216280_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_216280_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_216280_runs;
        str_builder(&builder,
                    "main.segred_small_216332               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_216332_runs,
                    (long) ctx->mainzisegred_small_216332_total_runtime /
                    (ctx->mainzisegred_small_216332_runs !=
                     0 ? ctx->mainzisegred_small_216332_runs : 1),
                    (long) ctx->mainzisegred_small_216332_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_216332_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_216332_runs;
        str_builder(&builder,
                    "main.segred_small_217318               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_217318_runs,
                    (long) ctx->mainzisegred_small_217318_total_runtime /
                    (ctx->mainzisegred_small_217318_runs !=
                     0 ? ctx->mainzisegred_small_217318_runs : 1),
                    (long) ctx->mainzisegred_small_217318_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_217318_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_217318_runs;
        str_builder(&builder,
                    "main.segred_small_217390               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_217390_runs,
                    (long) ctx->mainzisegred_small_217390_total_runtime /
                    (ctx->mainzisegred_small_217390_runs !=
                     0 ? ctx->mainzisegred_small_217390_runs : 1),
                    (long) ctx->mainzisegred_small_217390_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_217390_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_217390_runs;
        str_builder(&builder,
                    "main.segred_small_218606               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_218606_runs,
                    (long) ctx->mainzisegred_small_218606_total_runtime /
                    (ctx->mainzisegred_small_218606_runs !=
                     0 ? ctx->mainzisegred_small_218606_runs : 1),
                    (long) ctx->mainzisegred_small_218606_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_218606_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_218606_runs;
        str_builder(&builder,
                    "main.segred_small_218707               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_218707_runs,
                    (long) ctx->mainzisegred_small_218707_total_runtime /
                    (ctx->mainzisegred_small_218707_runs !=
                     0 ? ctx->mainzisegred_small_218707_runs : 1),
                    (long) ctx->mainzisegred_small_218707_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_218707_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_218707_runs;
        str_builder(&builder,
                    "main.segred_small_221141               ran %5d times; avg: %8ldus; total: %8ldus\n",
                    ctx->mainzisegred_small_221141_runs,
                    (long) ctx->mainzisegred_small_221141_total_runtime /
                    (ctx->mainzisegred_small_221141_runs !=
                     0 ? ctx->mainzisegred_small_221141_runs : 1),
                    (long) ctx->mainzisegred_small_221141_total_runtime);
        ctx->total_runtime += ctx->mainzisegred_small_221141_total_runtime;
        ctx->total_runs += ctx->mainzisegred_small_221141_runs;
        str_builder(&builder, "%d operations with cumulative runtime: %6ldus\n",
                    ctx->total_runs, ctx->total_runtime);
    }
    return builder.str;
}
char *futhark_context_get_error(struct futhark_context *ctx)
{
    char *error = ctx->error;
    
    ctx->error = NULL;
    return error;
}
void futhark_context_set_logging_file(struct futhark_context *ctx, FILE *f)
{
    ctx->log = f;
}
void futhark_context_pause_profiling(struct futhark_context *ctx)
{
    ctx->profiling_paused = 1;
}
void futhark_context_unpause_profiling(struct futhark_context *ctx)
{
    ctx->profiling_paused = 0;
}
int futhark_context_clear_caches(struct futhark_context *ctx)
{
    lock_lock(&ctx->lock);
    ctx->peak_mem_usage_device = 0;
    ctx->peak_mem_usage_default = 0;
    if (ctx->error == NULL)
        ctx->error = OPENCL_SUCCEED_NONFATAL(opencl_free_all(&ctx->opencl));
    lock_unlock(&ctx->lock);
    return ctx->error != NULL;
}

static int futrts_builtinzhgpu_map_transpose_f32(struct futhark_context *ctx,
                                                 struct memblock_device destmem_0,
                                                 int32_t destoffset_1,
                                                 struct memblock_device srcmem_2,
                                                 int32_t srcoffset_3,
                                                 int32_t num_arrays_4,
                                                 int32_t x_elems_5,
                                                 int32_t y_elems_6);
static int futrts_builtinzhgpu_map_transpose_i64(struct futhark_context *ctx,
                                                 struct memblock_device destmem_0,
                                                 int32_t destoffset_1,
                                                 struct memblock_device srcmem_2,
                                                 int32_t srcoffset_3,
                                                 int32_t num_arrays_4,
                                                 int32_t x_elems_5,
                                                 int32_t y_elems_6);
static int futrts_builtinzhreplicate_f32(struct futhark_context *ctx,
                                         struct memblock_device mem_225801,
                                         int32_t num_elems_225802,
                                         float val_225803);
static int futrts_builtinzhreplicate_i64(struct futhark_context *ctx,
                                         struct memblock_device mem_225384,
                                         int32_t num_elems_225385,
                                         int64_t val_225386);
static int futrts_entry_main(struct futhark_context *ctx,
                             struct memblock_device *mem_out_p_229692,
                             struct memblock_device *mem_out_p_229693,
                             struct memblock_device *mem_out_p_229694,
                             struct memblock_device Y_mem_222225,
                             int64_t m_196691, int64_t n_196692,
                             int64_t n_p_196694, int64_t q_s_196695,
                             int64_t q_t_196696, int64_t q_l_196697,
                             int64_t d_s_196698, int64_t d_t_196699,
                             int64_t d_l_196700, int64_t jump_s_196701,
                             int64_t jump_t_196702, int64_t jump_l_196703,
                             int64_t n_inner_196704, int64_t n_outer_196705,
                             int64_t jump_threshold_196706,
                             int64_t q_threshold_196707);

static int init_constants(struct futhark_context *ctx)
{
    (void) ctx;
    
    int err = 0;
    
    
  cleanup:
    return err;
}
static int free_constants(struct futhark_context *ctx)
{
    (void) ctx;
    return 0;
}
struct futhark_f32_2d {
    struct memblock_device mem;
    int64_t shape[2];
};
struct futhark_f32_2d *futhark_new_f32_2d(struct futhark_context *ctx, const
                                          float *data, int64_t dim0,
                                          int64_t dim1)
{
    struct futhark_f32_2d *bad = NULL;
    struct futhark_f32_2d *arr =
                          (struct futhark_f32_2d *) malloc(sizeof(struct futhark_f32_2d));
    
    if (arr == NULL)
        return bad;
    lock_lock(&ctx->lock);
    arr->mem.references = NULL;
    if (memblock_alloc_device(ctx, &arr->mem, dim0 * dim1 * 4, "arr->mem"))
        return NULL;
    arr->shape[0] = dim0;
    arr->shape[1] = dim1;
    if ((size_t) (dim0 * dim1) * 4 > 0)
        OPENCL_SUCCEED_OR_RETURN(clEnqueueWriteBuffer(ctx->opencl.queue,
                                                      arr->mem.mem, CL_TRUE,
                                                      (size_t) 0,
                                                      (size_t) ((size_t) (dim0 *
                                                                          dim1) *
                                                                4), data + 0, 0,
                                                      NULL,
                                                      ctx->profiling_paused ||
                                                      !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                &ctx->copy_dev_to_host_runs,
                                                                                                &ctx->copy_dev_to_host_total_runtime)));
    lock_unlock(&ctx->lock);
    return arr;
}
struct futhark_f32_2d *futhark_new_raw_f32_2d(struct futhark_context *ctx, const
                                              cl_mem data, int64_t offset,
                                              int64_t dim0, int64_t dim1)
{
    struct futhark_f32_2d *bad = NULL;
    struct futhark_f32_2d *arr =
                          (struct futhark_f32_2d *) malloc(sizeof(struct futhark_f32_2d));
    
    if (arr == NULL)
        return bad;
    lock_lock(&ctx->lock);
    arr->mem.references = NULL;
    if (memblock_alloc_device(ctx, &arr->mem, dim0 * dim1 * 4, "arr->mem"))
        return NULL;
    arr->shape[0] = dim0;
    arr->shape[1] = dim1;
    if ((size_t) (dim0 * dim1) * 4 > 0) {
        OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue, data,
                                                     arr->mem.mem,
                                                     (size_t) offset,
                                                     (size_t) 0,
                                                     (size_t) ((size_t) (dim0 *
                                                                         dim1) *
                                                               4), 0, NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_dev_to_dev_runs,
                                                                                               &ctx->copy_dev_to_dev_total_runtime)));
        if (ctx->debugging)
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
    }
    lock_unlock(&ctx->lock);
    return arr;
}
int futhark_free_f32_2d(struct futhark_context *ctx, struct futhark_f32_2d *arr)
{
    lock_lock(&ctx->lock);
    if (memblock_unref_device(ctx, &arr->mem, "arr->mem") != 0)
        return 1;
    lock_unlock(&ctx->lock);
    free(arr);
    return 0;
}
int futhark_values_f32_2d(struct futhark_context *ctx,
                          struct futhark_f32_2d *arr, float *data)
{
    lock_lock(&ctx->lock);
    if ((size_t) (arr->shape[0] * arr->shape[1]) * 4 > 0) {
        OPENCL_SUCCEED_OR_RETURN(clEnqueueReadBuffer(ctx->opencl.queue,
                                                     arr->mem.mem,
                                                     ctx->failure_is_an_option ? CL_FALSE : CL_TRUE,
                                                     (size_t) 0,
                                                     (size_t) ((size_t) (arr->shape[0] *
                                                                         arr->shape[1]) *
                                                               4), data + 0, 0,
                                                     NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_host_to_dev_runs,
                                                                                               &ctx->copy_host_to_dev_total_runtime)));
        if (ctx->failure_is_an_option && futhark_context_sync(ctx) != 0)
            return 1;
    }
    lock_unlock(&ctx->lock);
    return 0;
}
cl_mem futhark_values_raw_f32_2d(struct futhark_context *ctx,
                                 struct futhark_f32_2d *arr)
{
    (void) ctx;
    return arr->mem.mem;
}
const int64_t *futhark_shape_f32_2d(struct futhark_context *ctx,
                                    struct futhark_f32_2d *arr)
{
    (void) ctx;
    return arr->shape;
}

static int futrts_builtinzhgpu_map_transpose_f32(struct futhark_context *ctx,
                                                 struct memblock_device destmem_0,
                                                 int32_t destoffset_1,
                                                 struct memblock_device srcmem_2,
                                                 int32_t srcoffset_3,
                                                 int32_t num_arrays_4,
                                                 int32_t x_elems_5,
                                                 int32_t y_elems_6)
{
    (void) ctx;
    
    int err = 0;
    
    if (!(num_arrays_4 == 0 || (x_elems_5 == 0 || y_elems_6 == 0))) {
        int32_t muly_8 = squot32(16, x_elems_5);
        int32_t mulx_7 = squot32(16, y_elems_6);
        
        if (num_arrays_4 == 1 && (x_elems_5 == 1 || y_elems_6 == 1)) {
            if (sext_i32_i64(x_elems_5 * y_elems_6 * 4) > 0) {
                OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                             srcmem_2.mem,
                                                             destmem_0.mem,
                                                             (size_t) sext_i32_i64(srcoffset_3),
                                                             (size_t) sext_i32_i64(destoffset_1),
                                                             (size_t) sext_i32_i64(x_elems_5 *
                                                             y_elems_6 * 4), 0,
                                                             NULL,
                                                             ctx->profiling_paused ||
                                                             !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                       &ctx->copy_dev_to_dev_runs,
                                                                                                       &ctx->copy_dev_to_dev_total_runtime)));
                if (ctx->debugging)
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            }
        } else {
            if (sle32(x_elems_5, 8) && slt32(16, y_elems_6)) {
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        0,
                                                        (size_t) (int64_t) 1088,
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        1, sizeof(destoffset_1),
                                                        &destoffset_1));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        2, sizeof(srcoffset_3),
                                                        &srcoffset_3));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        3, sizeof(num_arrays_4),
                                                        &num_arrays_4));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        4, sizeof(x_elems_5),
                                                        &x_elems_5));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        5, sizeof(y_elems_6),
                                                        &y_elems_6));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        6, sizeof(mulx_7),
                                                        &mulx_7));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        7, sizeof(muly_8),
                                                        &muly_8));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        8,
                                                        sizeof(destmem_0.mem),
                                                        &destmem_0.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_width,
                                                        9, sizeof(srcmem_2.mem),
                                                        &srcmem_2.mem));
                if (1 * ((size_t) sdiv_up32(x_elems_5, 16) * (size_t) 16) *
                    ((size_t) sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) *
                     (size_t) 16) * ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                    const size_t global_work_sizze_229642[3] =
                                 {(size_t) sdiv_up32(x_elems_5, 16) *
                                  (size_t) 16,
                                  (size_t) sdiv_up32(sdiv_up32(y_elems_6,
                                                               muly_8), 16) *
                                  (size_t) 16, (size_t) num_arrays_4 *
                                  (size_t) 1};
                    const size_t local_work_sizze_229646[3] = {(size_t) 16,
                                                               (size_t) 16,
                                                               (size_t) 1};
                    int64_t time_start_229643 = 0, time_end_229644 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                "gpu_map_transpose_f32_low_width",
                                global_work_sizze_229642[0],
                                global_work_sizze_229642[1],
                                global_work_sizze_229642[2],
                                local_work_sizze_229646[0],
                                local_work_sizze_229646[1],
                                local_work_sizze_229646[2], (int) (0 +
                                                                   (int64_t) 1088));
                        time_start_229643 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->gpu_map_transpose_f32_low_width,
                                                                    3, NULL,
                                                                    global_work_sizze_229642,
                                                                    local_work_sizze_229646,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->gpu_map_transpose_f32_low_width_runs,
                                                                                                              &ctx->gpu_map_transpose_f32_low_width_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_229644 = get_wall_time();
                        
                        long time_diff_229645 = time_end_229644 -
                             time_start_229643;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "gpu_map_transpose_f32_low_width",
                                time_diff_229645);
                    }
                }
            } else {
                if (sle32(y_elems_6, 8) && slt32(16, x_elems_5)) {
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            0,
                                                            (size_t) (int64_t) 1088,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            1,
                                                            sizeof(destoffset_1),
                                                            &destoffset_1));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            2,
                                                            sizeof(srcoffset_3),
                                                            &srcoffset_3));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            3,
                                                            sizeof(num_arrays_4),
                                                            &num_arrays_4));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            4,
                                                            sizeof(x_elems_5),
                                                            &x_elems_5));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            5,
                                                            sizeof(y_elems_6),
                                                            &y_elems_6));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            6, sizeof(mulx_7),
                                                            &mulx_7));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            7, sizeof(muly_8),
                                                            &muly_8));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            8,
                                                            sizeof(destmem_0.mem),
                                                            &destmem_0.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_low_height,
                                                            9,
                                                            sizeof(srcmem_2.mem),
                                                            &srcmem_2.mem));
                    if (1 * ((size_t) sdiv_up32(sdiv_up32(x_elems_5, mulx_7),
                                                16) * (size_t) 16) *
                        ((size_t) sdiv_up32(y_elems_6, 16) * (size_t) 16) *
                        ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                        const size_t global_work_sizze_229647[3] =
                                     {(size_t) sdiv_up32(sdiv_up32(x_elems_5,
                                                                   mulx_7),
                                                         16) * (size_t) 16,
                                      (size_t) sdiv_up32(y_elems_6, 16) *
                                      (size_t) 16, (size_t) num_arrays_4 *
                                      (size_t) 1};
                        const size_t local_work_sizze_229651[3] = {(size_t) 16,
                                                                   (size_t) 16,
                                                                   (size_t) 1};
                        int64_t time_start_229648 = 0, time_end_229649 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                    "gpu_map_transpose_f32_low_height",
                                    global_work_sizze_229647[0],
                                    global_work_sizze_229647[1],
                                    global_work_sizze_229647[2],
                                    local_work_sizze_229651[0],
                                    local_work_sizze_229651[1],
                                    local_work_sizze_229651[2], (int) (0 +
                                                                       (int64_t) 1088));
                            time_start_229648 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->gpu_map_transpose_f32_low_height,
                                                                        3, NULL,
                                                                        global_work_sizze_229647,
                                                                        local_work_sizze_229651,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->gpu_map_transpose_f32_low_height_runs,
                                                                                                                  &ctx->gpu_map_transpose_f32_low_height_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_229649 = get_wall_time();
                            
                            long time_diff_229650 = time_end_229649 -
                                 time_start_229648;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "gpu_map_transpose_f32_low_height",
                                    time_diff_229650);
                        }
                    }
                } else {
                    if (sle32(x_elems_5, 8) && sle32(y_elems_6, 8)) {
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                0,
                                                                (size_t) (int64_t) 1,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                1,
                                                                sizeof(destoffset_1),
                                                                &destoffset_1));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                2,
                                                                sizeof(srcoffset_3),
                                                                &srcoffset_3));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                3,
                                                                sizeof(num_arrays_4),
                                                                &num_arrays_4));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                4,
                                                                sizeof(x_elems_5),
                                                                &x_elems_5));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                5,
                                                                sizeof(y_elems_6),
                                                                &y_elems_6));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                6,
                                                                sizeof(mulx_7),
                                                                &mulx_7));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                7,
                                                                sizeof(muly_8),
                                                                &muly_8));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                8,
                                                                sizeof(destmem_0.mem),
                                                                &destmem_0.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32_small,
                                                                9,
                                                                sizeof(srcmem_2.mem),
                                                                &srcmem_2.mem));
                        if (1 * ((size_t) sdiv_up32(num_arrays_4 * x_elems_5 *
                                                    y_elems_6, 256) *
                                 (size_t) 256) != 0) {
                            const size_t global_work_sizze_229652[1] =
                                         {(size_t) sdiv_up32(num_arrays_4 *
                                                             x_elems_5 *
                                                             y_elems_6, 256) *
                                         (size_t) 256};
                            const size_t local_work_sizze_229656[1] =
                                         {(size_t) 256};
                            int64_t time_start_229653 = 0, time_end_229654 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "gpu_map_transpose_f32_small",
                                        global_work_sizze_229652[0],
                                        local_work_sizze_229656[0], (int) (0 +
                                                                           (int64_t) 1));
                                time_start_229653 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->gpu_map_transpose_f32_small,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_229652,
                                                                            local_work_sizze_229656,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->gpu_map_transpose_f32_small_runs,
                                                                                                                      &ctx->gpu_map_transpose_f32_small_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_229654 = get_wall_time();
                                
                                long time_diff_229655 = time_end_229654 -
                                     time_start_229653;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_f32_small",
                                        time_diff_229655);
                            }
                        }
                    } else {
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                0,
                                                                (size_t) (int64_t) 4224,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                1,
                                                                sizeof(destoffset_1),
                                                                &destoffset_1));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                2,
                                                                sizeof(srcoffset_3),
                                                                &srcoffset_3));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                3,
                                                                sizeof(num_arrays_4),
                                                                &num_arrays_4));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                4,
                                                                sizeof(x_elems_5),
                                                                &x_elems_5));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                5,
                                                                sizeof(y_elems_6),
                                                                &y_elems_6));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                6,
                                                                sizeof(mulx_7),
                                                                &mulx_7));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                7,
                                                                sizeof(muly_8),
                                                                &muly_8));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                8,
                                                                sizeof(destmem_0.mem),
                                                                &destmem_0.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_f32,
                                                                9,
                                                                sizeof(srcmem_2.mem),
                                                                &srcmem_2.mem));
                        if (1 * ((size_t) sdiv_up32(x_elems_5, 32) *
                                 (size_t) 32) * ((size_t) sdiv_up32(y_elems_6,
                                                                    32) *
                                                 (size_t) 8) *
                            ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                            const size_t global_work_sizze_229657[3] =
                                         {(size_t) sdiv_up32(x_elems_5, 32) *
                                          (size_t) 32,
                                          (size_t) sdiv_up32(y_elems_6, 32) *
                                          (size_t) 8, (size_t) num_arrays_4 *
                                          (size_t) 1};
                            const size_t local_work_sizze_229661[3] =
                                         {(size_t) 32, (size_t) 8, (size_t) 1};
                            int64_t time_start_229658 = 0, time_end_229659 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                        "gpu_map_transpose_f32",
                                        global_work_sizze_229657[0],
                                        global_work_sizze_229657[1],
                                        global_work_sizze_229657[2],
                                        local_work_sizze_229661[0],
                                        local_work_sizze_229661[1],
                                        local_work_sizze_229661[2], (int) (0 +
                                                                           (int64_t) 4224));
                                time_start_229658 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->gpu_map_transpose_f32,
                                                                            3,
                                                                            NULL,
                                                                            global_work_sizze_229657,
                                                                            local_work_sizze_229661,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->gpu_map_transpose_f32_runs,
                                                                                                                      &ctx->gpu_map_transpose_f32_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_229659 = get_wall_time();
                                
                                long time_diff_229660 = time_end_229659 -
                                     time_start_229658;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_f32",
                                        time_diff_229660);
                            }
                        }
                    }
                }
            }
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhgpu_map_transpose_i64(struct futhark_context *ctx,
                                                 struct memblock_device destmem_0,
                                                 int32_t destoffset_1,
                                                 struct memblock_device srcmem_2,
                                                 int32_t srcoffset_3,
                                                 int32_t num_arrays_4,
                                                 int32_t x_elems_5,
                                                 int32_t y_elems_6)
{
    (void) ctx;
    
    int err = 0;
    
    if (!(num_arrays_4 == 0 || (x_elems_5 == 0 || y_elems_6 == 0))) {
        int32_t muly_8 = squot32(16, x_elems_5);
        int32_t mulx_7 = squot32(16, y_elems_6);
        
        if (num_arrays_4 == 1 && (x_elems_5 == 1 || y_elems_6 == 1)) {
            if (sext_i32_i64(x_elems_5 * y_elems_6 * 8) > 0) {
                OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                             srcmem_2.mem,
                                                             destmem_0.mem,
                                                             (size_t) sext_i32_i64(srcoffset_3),
                                                             (size_t) sext_i32_i64(destoffset_1),
                                                             (size_t) sext_i32_i64(x_elems_5 *
                                                             y_elems_6 * 8), 0,
                                                             NULL,
                                                             ctx->profiling_paused ||
                                                             !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                       &ctx->copy_dev_to_dev_runs,
                                                                                                       &ctx->copy_dev_to_dev_total_runtime)));
                if (ctx->debugging)
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            }
        } else {
            if (sle32(x_elems_5, 8) && slt32(16, y_elems_6)) {
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        0,
                                                        (size_t) (int64_t) 2176,
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        1, sizeof(destoffset_1),
                                                        &destoffset_1));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        2, sizeof(srcoffset_3),
                                                        &srcoffset_3));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        3, sizeof(num_arrays_4),
                                                        &num_arrays_4));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        4, sizeof(x_elems_5),
                                                        &x_elems_5));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        5, sizeof(y_elems_6),
                                                        &y_elems_6));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        6, sizeof(mulx_7),
                                                        &mulx_7));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        7, sizeof(muly_8),
                                                        &muly_8));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        8,
                                                        sizeof(destmem_0.mem),
                                                        &destmem_0.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_width,
                                                        9, sizeof(srcmem_2.mem),
                                                        &srcmem_2.mem));
                if (1 * ((size_t) sdiv_up32(x_elems_5, 16) * (size_t) 16) *
                    ((size_t) sdiv_up32(sdiv_up32(y_elems_6, muly_8), 16) *
                     (size_t) 16) * ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                    const size_t global_work_sizze_229662[3] =
                                 {(size_t) sdiv_up32(x_elems_5, 16) *
                                  (size_t) 16,
                                  (size_t) sdiv_up32(sdiv_up32(y_elems_6,
                                                               muly_8), 16) *
                                  (size_t) 16, (size_t) num_arrays_4 *
                                  (size_t) 1};
                    const size_t local_work_sizze_229666[3] = {(size_t) 16,
                                                               (size_t) 16,
                                                               (size_t) 1};
                    int64_t time_start_229663 = 0, time_end_229664 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                "gpu_map_transpose_i64_low_width",
                                global_work_sizze_229662[0],
                                global_work_sizze_229662[1],
                                global_work_sizze_229662[2],
                                local_work_sizze_229666[0],
                                local_work_sizze_229666[1],
                                local_work_sizze_229666[2], (int) (0 +
                                                                   (int64_t) 2176));
                        time_start_229663 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->gpu_map_transpose_i64_low_width,
                                                                    3, NULL,
                                                                    global_work_sizze_229662,
                                                                    local_work_sizze_229666,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->gpu_map_transpose_i64_low_width_runs,
                                                                                                              &ctx->gpu_map_transpose_i64_low_width_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_229664 = get_wall_time();
                        
                        long time_diff_229665 = time_end_229664 -
                             time_start_229663;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "gpu_map_transpose_i64_low_width",
                                time_diff_229665);
                    }
                }
            } else {
                if (sle32(y_elems_6, 8) && slt32(16, x_elems_5)) {
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            0,
                                                            (size_t) (int64_t) 2176,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            1,
                                                            sizeof(destoffset_1),
                                                            &destoffset_1));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            2,
                                                            sizeof(srcoffset_3),
                                                            &srcoffset_3));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            3,
                                                            sizeof(num_arrays_4),
                                                            &num_arrays_4));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            4,
                                                            sizeof(x_elems_5),
                                                            &x_elems_5));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            5,
                                                            sizeof(y_elems_6),
                                                            &y_elems_6));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            6, sizeof(mulx_7),
                                                            &mulx_7));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            7, sizeof(muly_8),
                                                            &muly_8));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            8,
                                                            sizeof(destmem_0.mem),
                                                            &destmem_0.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_low_height,
                                                            9,
                                                            sizeof(srcmem_2.mem),
                                                            &srcmem_2.mem));
                    if (1 * ((size_t) sdiv_up32(sdiv_up32(x_elems_5, mulx_7),
                                                16) * (size_t) 16) *
                        ((size_t) sdiv_up32(y_elems_6, 16) * (size_t) 16) *
                        ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                        const size_t global_work_sizze_229667[3] =
                                     {(size_t) sdiv_up32(sdiv_up32(x_elems_5,
                                                                   mulx_7),
                                                         16) * (size_t) 16,
                                      (size_t) sdiv_up32(y_elems_6, 16) *
                                      (size_t) 16, (size_t) num_arrays_4 *
                                      (size_t) 1};
                        const size_t local_work_sizze_229671[3] = {(size_t) 16,
                                                                   (size_t) 16,
                                                                   (size_t) 1};
                        int64_t time_start_229668 = 0, time_end_229669 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                    "gpu_map_transpose_i64_low_height",
                                    global_work_sizze_229667[0],
                                    global_work_sizze_229667[1],
                                    global_work_sizze_229667[2],
                                    local_work_sizze_229671[0],
                                    local_work_sizze_229671[1],
                                    local_work_sizze_229671[2], (int) (0 +
                                                                       (int64_t) 2176));
                            time_start_229668 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->gpu_map_transpose_i64_low_height,
                                                                        3, NULL,
                                                                        global_work_sizze_229667,
                                                                        local_work_sizze_229671,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->gpu_map_transpose_i64_low_height_runs,
                                                                                                                  &ctx->gpu_map_transpose_i64_low_height_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_229669 = get_wall_time();
                            
                            long time_diff_229670 = time_end_229669 -
                                 time_start_229668;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "gpu_map_transpose_i64_low_height",
                                    time_diff_229670);
                        }
                    }
                } else {
                    if (sle32(x_elems_5, 8) && sle32(y_elems_6, 8)) {
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                0,
                                                                (size_t) (int64_t) 1,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                1,
                                                                sizeof(destoffset_1),
                                                                &destoffset_1));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                2,
                                                                sizeof(srcoffset_3),
                                                                &srcoffset_3));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                3,
                                                                sizeof(num_arrays_4),
                                                                &num_arrays_4));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                4,
                                                                sizeof(x_elems_5),
                                                                &x_elems_5));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                5,
                                                                sizeof(y_elems_6),
                                                                &y_elems_6));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                6,
                                                                sizeof(mulx_7),
                                                                &mulx_7));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                7,
                                                                sizeof(muly_8),
                                                                &muly_8));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                8,
                                                                sizeof(destmem_0.mem),
                                                                &destmem_0.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64_small,
                                                                9,
                                                                sizeof(srcmem_2.mem),
                                                                &srcmem_2.mem));
                        if (1 * ((size_t) sdiv_up32(num_arrays_4 * x_elems_5 *
                                                    y_elems_6, 256) *
                                 (size_t) 256) != 0) {
                            const size_t global_work_sizze_229672[1] =
                                         {(size_t) sdiv_up32(num_arrays_4 *
                                                             x_elems_5 *
                                                             y_elems_6, 256) *
                                         (size_t) 256};
                            const size_t local_work_sizze_229676[1] =
                                         {(size_t) 256};
                            int64_t time_start_229673 = 0, time_end_229674 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "gpu_map_transpose_i64_small",
                                        global_work_sizze_229672[0],
                                        local_work_sizze_229676[0], (int) (0 +
                                                                           (int64_t) 1));
                                time_start_229673 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->gpu_map_transpose_i64_small,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_229672,
                                                                            local_work_sizze_229676,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->gpu_map_transpose_i64_small_runs,
                                                                                                                      &ctx->gpu_map_transpose_i64_small_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_229674 = get_wall_time();
                                
                                long time_diff_229675 = time_end_229674 -
                                     time_start_229673;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_i64_small",
                                        time_diff_229675);
                            }
                        }
                    } else {
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                0,
                                                                (size_t) (int64_t) 8448,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                1,
                                                                sizeof(destoffset_1),
                                                                &destoffset_1));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                2,
                                                                sizeof(srcoffset_3),
                                                                &srcoffset_3));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                3,
                                                                sizeof(num_arrays_4),
                                                                &num_arrays_4));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                4,
                                                                sizeof(x_elems_5),
                                                                &x_elems_5));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                5,
                                                                sizeof(y_elems_6),
                                                                &y_elems_6));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                6,
                                                                sizeof(mulx_7),
                                                                &mulx_7));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                7,
                                                                sizeof(muly_8),
                                                                &muly_8));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                8,
                                                                sizeof(destmem_0.mem),
                                                                &destmem_0.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->gpu_map_transpose_i64,
                                                                9,
                                                                sizeof(srcmem_2.mem),
                                                                &srcmem_2.mem));
                        if (1 * ((size_t) sdiv_up32(x_elems_5, 32) *
                                 (size_t) 32) * ((size_t) sdiv_up32(y_elems_6,
                                                                    32) *
                                                 (size_t) 8) *
                            ((size_t) num_arrays_4 * (size_t) 1) != 0) {
                            const size_t global_work_sizze_229677[3] =
                                         {(size_t) sdiv_up32(x_elems_5, 32) *
                                          (size_t) 32,
                                          (size_t) sdiv_up32(y_elems_6, 32) *
                                          (size_t) 8, (size_t) num_arrays_4 *
                                          (size_t) 1};
                            const size_t local_work_sizze_229681[3] =
                                         {(size_t) 32, (size_t) 8, (size_t) 1};
                            int64_t time_start_229678 = 0, time_end_229679 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu, %zu, %zu] and local work size [%zu, %zu, %zu]; local memory: %d bytes.\n",
                                        "gpu_map_transpose_i64",
                                        global_work_sizze_229677[0],
                                        global_work_sizze_229677[1],
                                        global_work_sizze_229677[2],
                                        local_work_sizze_229681[0],
                                        local_work_sizze_229681[1],
                                        local_work_sizze_229681[2], (int) (0 +
                                                                           (int64_t) 8448));
                                time_start_229678 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->gpu_map_transpose_i64,
                                                                            3,
                                                                            NULL,
                                                                            global_work_sizze_229677,
                                                                            local_work_sizze_229681,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->gpu_map_transpose_i64_runs,
                                                                                                                      &ctx->gpu_map_transpose_i64_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_229679 = get_wall_time();
                                
                                long time_diff_229680 = time_end_229679 -
                                     time_start_229678;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "gpu_map_transpose_i64",
                                        time_diff_229680);
                            }
                        }
                    }
                }
            }
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhreplicate_f32(struct futhark_context *ctx,
                                         struct memblock_device mem_225801,
                                         int32_t num_elems_225802,
                                         float val_225803)
{
    (void) ctx;
    
    int err = 0;
    int64_t group_sizze_225808;
    
    group_sizze_225808 =
        *ctx->tuning_params.builtinzhreplicate_f32zigroup_sizze_225808;
    
    int64_t num_groups_225809 = sdiv_up64(num_elems_225802, group_sizze_225808);
    
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_f32zireplicate_225805,
                                            0, sizeof(num_elems_225802),
                                            &num_elems_225802));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_f32zireplicate_225805,
                                            1, sizeof(val_225803),
                                            &val_225803));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_f32zireplicate_225805,
                                            2, sizeof(mem_225801.mem),
                                            &mem_225801.mem));
    if (1 * ((size_t) num_groups_225809 * (size_t) group_sizze_225808) != 0) {
        const size_t global_work_sizze_229682[1] = {(size_t) num_groups_225809 *
                     (size_t) group_sizze_225808};
        const size_t local_work_sizze_229686[1] = {(size_t) group_sizze_225808};
        int64_t time_start_229683 = 0, time_end_229684 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                    "builtin#replicate_f32.replicate_225805",
                    global_work_sizze_229682[0], local_work_sizze_229686[0],
                    (int) 0);
            time_start_229683 = get_wall_time();
        }
        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                        ctx->builtinzhreplicate_f32zireplicate_225805,
                                                        1, NULL,
                                                        global_work_sizze_229682,
                                                        local_work_sizze_229686,
                                                        0, NULL,
                                                        ctx->profiling_paused ||
                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                  &ctx->builtinzhreplicate_f32zireplicate_225805_runs,
                                                                                                  &ctx->builtinzhreplicate_f32zireplicate_225805_total_runtime)));
        if (ctx->debugging) {
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            time_end_229684 = get_wall_time();
            
            long time_diff_229685 = time_end_229684 - time_start_229683;
            
            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                    "builtin#replicate_f32.replicate_225805", time_diff_229685);
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_builtinzhreplicate_i64(struct futhark_context *ctx,
                                         struct memblock_device mem_225384,
                                         int32_t num_elems_225385,
                                         int64_t val_225386)
{
    (void) ctx;
    
    int err = 0;
    int64_t group_sizze_225391;
    
    group_sizze_225391 =
        *ctx->tuning_params.builtinzhreplicate_i64zigroup_sizze_225391;
    
    int64_t num_groups_225392 = sdiv_up64(num_elems_225385, group_sizze_225391);
    
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_i64zireplicate_225388,
                                            0, sizeof(num_elems_225385),
                                            &num_elems_225385));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_i64zireplicate_225388,
                                            1, sizeof(val_225386),
                                            &val_225386));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->builtinzhreplicate_i64zireplicate_225388,
                                            2, sizeof(mem_225384.mem),
                                            &mem_225384.mem));
    if (1 * ((size_t) num_groups_225392 * (size_t) group_sizze_225391) != 0) {
        const size_t global_work_sizze_229687[1] = {(size_t) num_groups_225392 *
                     (size_t) group_sizze_225391};
        const size_t local_work_sizze_229691[1] = {(size_t) group_sizze_225391};
        int64_t time_start_229688 = 0, time_end_229689 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                    "builtin#replicate_i64.replicate_225388",
                    global_work_sizze_229687[0], local_work_sizze_229691[0],
                    (int) 0);
            time_start_229688 = get_wall_time();
        }
        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                        ctx->builtinzhreplicate_i64zireplicate_225388,
                                                        1, NULL,
                                                        global_work_sizze_229687,
                                                        local_work_sizze_229691,
                                                        0, NULL,
                                                        ctx->profiling_paused ||
                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                  &ctx->builtinzhreplicate_i64zireplicate_225388_runs,
                                                                                                  &ctx->builtinzhreplicate_i64zireplicate_225388_total_runtime)));
        if (ctx->debugging) {
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            time_end_229689 = get_wall_time();
            
            long time_diff_229690 = time_end_229689 - time_start_229688;
            
            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                    "builtin#replicate_i64.replicate_225388", time_diff_229690);
        }
    }
    
  cleanup:
    { }
    return err;
}
static int futrts_entry_main(struct futhark_context *ctx,
                             struct memblock_device *mem_out_p_229692,
                             struct memblock_device *mem_out_p_229693,
                             struct memblock_device *mem_out_p_229694,
                             struct memblock_device Y_mem_222225,
                             int64_t m_196691, int64_t n_196692,
                             int64_t n_p_196694, int64_t q_s_196695,
                             int64_t q_t_196696, int64_t q_l_196697,
                             int64_t d_s_196698, int64_t d_t_196699,
                             int64_t d_l_196700, int64_t jump_s_196701,
                             int64_t jump_t_196702, int64_t jump_l_196703,
                             int64_t n_inner_196704, int64_t n_outer_196705,
                             int64_t jump_threshold_196706,
                             int64_t q_threshold_196707)
{
    (void) ctx;
    
    int err = 0;
    struct memblock_device mem_out_225290;
    
    mem_out_225290.references = NULL;
    
    struct memblock_device mem_out_225291;
    
    mem_out_225291.references = NULL;
    
    struct memblock_device mem_out_225292;
    
    mem_out_225292.references = NULL;
    
    bool assert_cond_196708 = sle64((int64_t) 4, n_p_196694);
    bool assert_c_196709;
    
    if (!assert_cond_196708) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (n_p >= 4)",
                               "-> #0  stl.fut:69:13-33\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t x_196710 = smod64(q_t_196696, (int64_t) 2);
    bool assert_cond_196711 = x_196710 == (int64_t) 1;
    bool assert_c_196712;
    
    if (!assert_cond_196711) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x % 2 == 1)",
                               "-> #0  utils.fut:20:3-23\n   #1  /prelude/functional.fut:39:62-64\n   #2  stl.fut:71:13-25\n   #3  stl.fut:401:3-415:29\n   #4  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196713 = slt64((int64_t) 0, q_t_196696);
    bool assert_c_196714;
    
    if (!assert_cond_196713) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  /prelude/functional.fut:39:59-65\n   #2  stl.fut:71:13-25\n   #3  stl.fut:401:3-415:29\n   #4  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t x_196715 = smod64(q_l_196697, (int64_t) 2);
    bool assert_cond_196716 = x_196715 == (int64_t) 1;
    bool assert_c_196717;
    
    if (!assert_cond_196716) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x % 2 == 1)",
                               "-> #0  utils.fut:20:3-23\n   #1  /prelude/functional.fut:39:62-64\n   #2  stl.fut:72:13-25\n   #3  stl.fut:401:3-415:29\n   #4  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196718 = slt64((int64_t) 0, q_l_196697);
    bool assert_c_196719;
    
    if (!assert_cond_196718) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  /prelude/functional.fut:39:59-65\n   #2  stl.fut:72:13-25\n   #3  stl.fut:401:3-415:29\n   #4  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool cond_196720 = sle64((int64_t) 0, d_t_196699);
    bool assert_cond_t_res_196721 = sle64(d_t_196699, (int64_t) 2);
    bool x_196722 = cond_196720 && assert_cond_t_res_196721;
    bool assert_c_196723;
    
    if (!x_196722) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x >= 0 && x <= 2)",
                               "-> #0  utils.fut:23:3-29\n   #1  stl.fut:74:13-25\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool cond_196724 = sle64((int64_t) 0, d_l_196700);
    bool assert_cond_t_res_196725 = sle64(d_l_196700, (int64_t) 2);
    bool x_196726 = cond_196724 && assert_cond_t_res_196725;
    bool assert_c_196727;
    
    if (!x_196726) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x >= 0 && x <= 2)",
                               "-> #0  utils.fut:23:3-29\n   #1  stl.fut:75:13-25\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196728 = slt64((int64_t) 0, jump_t_196702);
    bool assert_c_196729;
    
    if (!assert_cond_196728) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  stl.fut:77:16-31\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196730 = slt64((int64_t) 0, jump_l_196703);
    bool assert_c_196731;
    
    if (!assert_cond_196730) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  stl.fut:78:16-31\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196732 = slt64((int64_t) 0, n_inner_196704);
    bool assert_c_196733;
    
    if (!assert_cond_196732) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  stl.fut:80:17-33\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool assert_cond_196734 = slt64((int64_t) 0, n_outer_196705);
    bool assert_c_196735;
    
    if (!assert_cond_196734) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "Assertion is false: (x > 0)",
                               "-> #0  utils.fut:17:3-18\n   #1  stl.fut:81:17-33\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    float i64_res_196736 = sitofp_i64_f32(n_196692);
    float i64_res_196737 = sitofp_i64_f32(n_p_196694);
    float ceil_arg_196738 = i64_res_196736 / i64_res_196737;
    float ceil_res_196739;
    
    ceil_res_196739 = futrts_ceil32(ceil_arg_196738);
    
    int64_t defunc_0_f_res_196740 = fptosi_f32_i64(ceil_res_196739);
    int64_t pad_css_len_196741 = add64((int64_t) 2, defunc_0_f_res_196740);
    int64_t y_196742 = mul64((int64_t) 2, n_p_196694);
    int64_t C_len_196743 = add64(n_196692, y_196742);
    bool cond_196744 = jump_s_196701 == (int64_t) 1;
    int64_t s_n_m_196745;
    
    if (cond_196744) {
        s_n_m_196745 = pad_css_len_196741;
    } else {
        bool zzero_196746 = jump_s_196701 == (int64_t) 0;
        bool nonzzero_196747 = !zzero_196746;
        bool nonzzero_cert_196748;
        
        if (!nonzzero_196747) {
            ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                                   "division by zero",
                                   "-> #0  stl.fut:88:52-71\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
            if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") !=
                0)
                return 1;
            err = 1;
            goto cleanup;
        }
        
        int64_t x_196749 = sdiv64(defunc_0_f_res_196740, jump_s_196701);
        int64_t s_n_m_f_res_196750 = add64((int64_t) 3, x_196749);
        
        s_n_m_196745 = s_n_m_f_res_196750;
    }
    
    bool cond_196751 = jump_l_196703 == (int64_t) 1;
    int64_t l_n_m_196752;
    
    if (cond_196751) {
        l_n_m_196752 = n_196692;
    } else {
        bool zzero_196753 = jump_l_196703 == (int64_t) 0;
        bool nonzzero_196754 = !zzero_196753;
        bool nonzzero_cert_196755;
        
        if (!nonzzero_196754) {
            ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                                   "division by zero",
                                   "-> #0  stl.fut:94:42-51\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
            if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") !=
                0)
                return 1;
            err = 1;
            goto cleanup;
        }
        
        int64_t x_196756 = sdiv64(n_196692, jump_l_196703);
        int64_t l_n_m_f_res_196757 = add64((int64_t) 1, x_196756);
        
        l_n_m_196752 = l_n_m_f_res_196757;
    }
    
    bool cond_196758 = jump_t_196702 == (int64_t) 1;
    int64_t t_n_m_196759;
    
    if (cond_196758) {
        t_n_m_196759 = n_196692;
    } else {
        bool zzero_196760 = jump_t_196702 == (int64_t) 0;
        bool nonzzero_196761 = !zzero_196760;
        bool nonzzero_cert_196762;
        
        if (!nonzzero_196761) {
            ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                                   "division by zero",
                                   "-> #0  stl.fut:98:42-51\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
            if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") !=
                0)
                return 1;
            err = 1;
            goto cleanup;
        }
        
        int64_t x_196763 = sdiv64(n_196692, jump_t_196702);
        int64_t t_n_m_f_res_196764 = add64((int64_t) 1, x_196763);
        
        t_n_m_196759 = t_n_m_f_res_196764;
    }
    
    float x_196765 = i64_res_196736 / 2.0F;
    float floor_arg_196766 = 1.0F + x_196765;
    float floor_res_196767;
    
    floor_res_196767 = futrts_floor32(floor_arg_196766);
    
    int64_t defunc_0_f_res_196768 = fptosi_f32_i64(floor_res_196767);
    int64_t x_196769 = sub64(n_196692, defunc_0_f_res_196768);
    int64_t mid2_196770 = add64((int64_t) 1, x_196769);
    bool cond_196771 = defunc_0_f_res_196768 == mid2_196770;
    int64_t stl_res_t_res_196772 = sub64(defunc_0_f_res_196768, (int64_t) 1);
    int64_t stl_res_196773;
    int64_t stl_res_196774;
    
    if (cond_196771) {
        stl_res_196773 = stl_res_t_res_196772;
        stl_res_196774 = defunc_0_f_res_196768;
    } else {
        int64_t min_res_196775 = smin64(defunc_0_f_res_196768, mid2_196770);
        int64_t stl_res_f_res_196776 = sub64(min_res_196775, (int64_t) 1);
        int64_t max_res_196777 = smax64(defunc_0_f_res_196768, mid2_196770);
        
        stl_res_196773 = stl_res_f_res_196776;
        stl_res_196774 = max_res_196777;
    }
    
    int64_t i_196779 = sub64(n_196692, (int64_t) 1);
    bool x_196780 = sle64((int64_t) 0, i_196779);
    bool y_196781 = slt64(i_196779, n_196692);
    bool bounds_check_196782 = x_196780 && y_196781;
    bool index_certs_196783;
    
    if (!bounds_check_196782) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [", (long long) i_196779,
                               "] out of bounds for array of shape [",
                               (long long) n_196692, "].",
                               "-> #0  /prelude/array.fut:26:29-34\n   #1  utils.fut:45:13-20\n   #2  stl.fut:112:31-49\n   #3  stl.fut:401:3-415:29\n   #4  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t max_group_sizze_199970;
    
    max_group_sizze_199970 = ctx->opencl.max_group_size;
    
    bool fits_199971 = sle64(n_196692, max_group_sizze_199970);
    bool suff_intra_par_199969;
    
    suff_intra_par_199969 = *ctx->tuning_params.mainzisuff_intra_par_0 <=
        n_196692;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_0",
                (long) n_196692, suff_intra_par_199969 ? "true" : "false");
    
    bool intra_suff_and_fits_199972 = suff_intra_par_199969 && fits_199971;
    int64_t nest_sizze_200083 = m_196691 * n_196692;
    int64_t segscan_group_sizze_200084;
    
    segscan_group_sizze_200084 =
        *ctx->tuning_params.mainzisegscan_group_sizze_200064;
    
    int64_t num_groups_200085;
    int32_t max_num_groups_225293;
    
    max_num_groups_225293 = *ctx->tuning_params.mainzisegscan_num_groups_200066;
    num_groups_200085 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(nest_sizze_200083,
                                                             segscan_group_sizze_200084),
                                                   sext_i32_i64(max_num_groups_225293))));
    
    int64_t segmap_group_sizze_200123;
    
    segmap_group_sizze_200123 =
        *ctx->tuning_params.mainzisegmap_group_sizze_200008;
    
    int64_t binop_y_222236 = (int64_t) 8 * nest_sizze_200083;
    int64_t bytes_222237 = smax64((int64_t) 0, binop_y_222236);
    int64_t binop_y_222239 = (int64_t) 8 * m_196691;
    int64_t bytes_222240 = smax64((int64_t) 0, binop_y_222239);
    int64_t binop_y_222228 = (int64_t) 8 * n_196692;
    int64_t bytes_222229 = smax64((int64_t) 0, binop_y_222228);
    struct memblock_device ext_mem_222257;
    
    ext_mem_222257.references = NULL;
    
    struct memblock_device ext_mem_222256;
    
    ext_mem_222256.references = NULL;
    
    int32_t local_memory_capacity_225415;
    
    local_memory_capacity_225415 = ctx->opencl.max_local_memory;
    if (sle64(bytes_222229 + srem64((int64_t) 8 - srem64(bytes_222229,
                                                         (int64_t) 8),
                                    (int64_t) 8) + (bytes_222229 +
                                                    srem64((int64_t) 8 -
                                                           srem64(bytes_222229,
                                                                  (int64_t) 8),
                                                           (int64_t) 8)),
              sext_i32_i64(local_memory_capacity_225415)) &&
        intra_suff_and_fits_199972) {
        struct memblock_device mem_222238;
        
        mem_222238.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222238, bytes_222237,
                                  "mem_222238")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222241;
        
        mem_222241.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222241, bytes_222240,
                                  "mem_222241")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                1, (size_t) bytes_222229,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                2, (size_t) bytes_222229,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                3, sizeof(m_196691),
                                                &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                4, sizeof(n_196692),
                                                &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                5, sizeof(i_196779),
                                                &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                6, sizeof(Y_mem_222225.mem),
                                                &Y_mem_222225.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                7, sizeof(mem_222238.mem),
                                                &mem_222238.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_199976,
                                                8, sizeof(mem_222241.mem),
                                                &mem_222241.mem));
        if (1 * ((size_t) m_196691 * (size_t) n_196692) != 0) {
            const size_t global_work_sizze_229695[1] = {(size_t) m_196691 *
                         (size_t) n_196692};
            const size_t local_work_sizze_229699[1] = {(size_t) n_196692};
            int64_t time_start_229696 = 0, time_end_229697 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_intragroup_199976",
                        global_work_sizze_229695[0], local_work_sizze_229699[0],
                        (int) (0 + bytes_222229 + bytes_222229));
                time_start_229696 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_intragroup_199976,
                                                            1, NULL,
                                                            global_work_sizze_229695,
                                                            local_work_sizze_229699,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_intragroup_199976_runs,
                                                                                                      &ctx->mainzisegmap_intragroup_199976_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229697 = get_wall_time();
                
                long time_diff_229698 = time_end_229697 - time_start_229696;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_199976", time_diff_229698);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_set_device(ctx, &ext_mem_222257, &mem_222238,
                                "mem_222238") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222256, &mem_222241,
                                "mem_222241") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222241, "mem_222241") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222238, "mem_222238") != 0)
            return 1;
    } else {
        struct memblock_device mem_222246;
        
        mem_222246.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222246, bytes_222237,
                                  "mem_222246")) {
            err = 1;
            goto cleanup;
        }
        if (slt64((int64_t) 0, m_196691 * n_196692)) {
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegScan");
            
            int64_t stage1_max_num_groups_225319;
            
            stage1_max_num_groups_225319 = ctx->opencl.max_group_size;
            
            int64_t stage1_num_groups_225320 =
                    smin64(stage1_max_num_groups_225319, num_groups_200085);
            int32_t num_threads_225321 = sext_i64_i32(stage1_num_groups_225320 *
                    segscan_group_sizze_200084);
            
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    1,
                                                    (size_t) smax64((int64_t) 1,
                                                                    (int64_t) 8 *
                                                                    segscan_group_sizze_200084),
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    2, sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    3, sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    4,
                                                    sizeof(num_threads_225321),
                                                    &num_threads_225321));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    5, sizeof(Y_mem_222225.mem),
                                                    &Y_mem_222225.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200090,
                                                    6, sizeof(mem_222246.mem),
                                                    &mem_222246.mem));
            if (1 * ((size_t) stage1_num_groups_225320 *
                     (size_t) segscan_group_sizze_200084) != 0) {
                const size_t global_work_sizze_229700[1] =
                             {(size_t) stage1_num_groups_225320 *
                             (size_t) segscan_group_sizze_200084};
                const size_t local_work_sizze_229704[1] =
                             {(size_t) segscan_group_sizze_200084};
                int64_t time_start_229701 = 0, time_end_229702 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.scan_stage1_200090",
                            global_work_sizze_229700[0],
                            local_work_sizze_229704[0], (int) (0 +
                                                               smax64((int64_t) 1,
                                                                      (int64_t) 8 *
                                                                      segscan_group_sizze_200084)));
                    time_start_229701 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainziscan_stage1_200090,
                                                                1, NULL,
                                                                global_work_sizze_229700,
                                                                local_work_sizze_229704,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainziscan_stage1_200090_runs,
                                                                                                          &ctx->mainziscan_stage1_200090_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229702 = get_wall_time();
                    
                    long time_diff_229703 = time_end_229702 - time_start_229701;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.scan_stage1_200090", time_diff_229703);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s: %llu%c", "elems_per_group",
                        (long long) (segscan_group_sizze_200084 *
                                     sdiv_up64(m_196691 * n_196692,
                                               sext_i32_i64(num_threads_225321))),
                        '\n');
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    1,
                                                    (size_t) smax64((int64_t) 1,
                                                                    (int64_t) 8 *
                                                                    stage1_num_groups_225320),
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    2, sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    3, sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    4,
                                                    sizeof(stage1_num_groups_225320),
                                                    &stage1_num_groups_225320));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    5,
                                                    sizeof(num_threads_225321),
                                                    &num_threads_225321));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200090,
                                                    6, sizeof(mem_222246.mem),
                                                    &mem_222246.mem));
            if (1 * ((size_t) (int64_t) 1 *
                     (size_t) stage1_num_groups_225320) != 0) {
                const size_t global_work_sizze_229705[1] =
                             {(size_t) (int64_t) 1 *
                             (size_t) stage1_num_groups_225320};
                const size_t local_work_sizze_229709[1] =
                             {(size_t) stage1_num_groups_225320};
                int64_t time_start_229706 = 0, time_end_229707 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.scan_stage2_200090",
                            global_work_sizze_229705[0],
                            local_work_sizze_229709[0], (int) (0 +
                                                               smax64((int64_t) 1,
                                                                      (int64_t) 8 *
                                                                      stage1_num_groups_225320)));
                    time_start_229706 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainziscan_stage2_200090,
                                                                1, NULL,
                                                                global_work_sizze_229705,
                                                                local_work_sizze_229709,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainziscan_stage2_200090_runs,
                                                                                                          &ctx->mainziscan_stage2_200090_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229707 = get_wall_time();
                    
                    long time_diff_229708 = time_end_229707 - time_start_229706;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.scan_stage2_200090", time_diff_229708);
                }
            }
            
            int32_t required_groups_225372 = sext_i64_i32(sdiv_up64(m_196691 *
                                                                    n_196692,
                                                                    segscan_group_sizze_200084));
            
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    1, sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    2, sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    3,
                                                    sizeof(num_groups_200085),
                                                    &num_groups_200085));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    4,
                                                    sizeof(num_threads_225321),
                                                    &num_threads_225321));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    5,
                                                    sizeof(required_groups_225372),
                                                    &required_groups_225372));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200090,
                                                    6, sizeof(mem_222246.mem),
                                                    &mem_222246.mem));
            if (1 * ((size_t) num_groups_200085 *
                     (size_t) segscan_group_sizze_200084) != 0) {
                const size_t global_work_sizze_229710[1] =
                             {(size_t) num_groups_200085 *
                             (size_t) segscan_group_sizze_200084};
                const size_t local_work_sizze_229714[1] =
                             {(size_t) segscan_group_sizze_200084};
                int64_t time_start_229711 = 0, time_end_229712 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.scan_stage3_200090",
                            global_work_sizze_229710[0],
                            local_work_sizze_229714[0], (int) 0);
                    time_start_229711 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainziscan_stage3_200090,
                                                                1, NULL,
                                                                global_work_sizze_229710,
                                                                local_work_sizze_229714,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainziscan_stage3_200090_runs,
                                                                                                          &ctx->mainziscan_stage3_200090_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229712 = get_wall_time();
                    
                    long time_diff_229713 = time_end_229712 - time_start_229711;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.scan_stage3_200090", time_diff_229713);
                }
            }
        }
        
        struct memblock_device mem_222250;
        
        mem_222250.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222250, bytes_222237,
                                  "mem_222250")) {
            err = 1;
            goto cleanup;
        }
        if (futrts_builtinzhreplicate_i64(ctx, mem_222250, m_196691 * n_196692,
                                          (int64_t) -1) != 0) {
            if (memblock_unref_device(ctx, &mem_222250, "mem_222250") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222246, "mem_222246") != 0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") !=
                0)
                return 1;
            err = 1;
            goto cleanup;
        }
        
        int64_t segmap_usable_groups_200124 = sdiv_up64(nest_sizze_200083,
                                                        segmap_group_sizze_200123);
        
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200128, 1,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200128, 2,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200128, 3,
                                                sizeof(Y_mem_222225.mem),
                                                &Y_mem_222225.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200128, 4,
                                                sizeof(mem_222246.mem),
                                                &mem_222246.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200128, 5,
                                                sizeof(mem_222250.mem),
                                                &mem_222250.mem));
        if (1 * ((size_t) segmap_usable_groups_200124 *
                 (size_t) segmap_group_sizze_200123) != 0) {
            const size_t global_work_sizze_229715[1] =
                         {(size_t) segmap_usable_groups_200124 *
                         (size_t) segmap_group_sizze_200123};
            const size_t local_work_sizze_229719[1] =
                         {(size_t) segmap_group_sizze_200123};
            int64_t time_start_229716 = 0, time_end_229717 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_200128", global_work_sizze_229715[0],
                        local_work_sizze_229719[0], (int) 0);
                time_start_229716 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_200128,
                                                            1, NULL,
                                                            global_work_sizze_229715,
                                                            local_work_sizze_229719,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_200128_runs,
                                                                                                      &ctx->mainzisegmap_200128_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229717 = get_wall_time();
                
                long time_diff_229718 = time_end_229717 - time_start_229716;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_200128", time_diff_229718);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        
        struct memblock_device mem_222254;
        
        mem_222254.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222254, bytes_222240,
                                  "mem_222254")) {
            err = 1;
            goto cleanup;
        }
        
        int64_t group_sizze_225409;
        
        group_sizze_225409 = *ctx->tuning_params.mainzigroup_sizze_225409;
        
        int64_t num_groups_225410 = sdiv_up64(m_196691, group_sizze_225409);
        
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225406, 0,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225406, 1,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225406, 2,
                                                sizeof(i_196779), &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225406, 3,
                                                sizeof(mem_222246.mem),
                                                &mem_222246.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225406, 4,
                                                sizeof(mem_222254.mem),
                                                &mem_222254.mem));
        if (1 * ((size_t) num_groups_225410 * (size_t) group_sizze_225409) !=
            0) {
            const size_t global_work_sizze_229720[1] =
                         {(size_t) num_groups_225410 *
                         (size_t) group_sizze_225409};
            const size_t local_work_sizze_229724[1] =
                         {(size_t) group_sizze_225409};
            int64_t time_start_229721 = 0, time_end_229722 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.copy_225406", global_work_sizze_229720[0],
                        local_work_sizze_229724[0], (int) 0);
                time_start_229721 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzicopy_225406,
                                                            1, NULL,
                                                            global_work_sizze_229720,
                                                            local_work_sizze_229724,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzicopy_225406_runs,
                                                                                                      &ctx->mainzicopy_225406_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229722 = get_wall_time();
                
                long time_diff_229723 = time_end_229722 - time_start_229721;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.copy_225406", time_diff_229723);
            }
        }
        if (memblock_unref_device(ctx, &mem_222246, "mem_222246") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222257, &mem_222250,
                                "mem_222250") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222256, &mem_222254,
                                "mem_222254") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222254, "mem_222254") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222250, "mem_222250") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222246, "mem_222246") != 0)
            return 1;
    }
    
    bool bounds_invalid_upwards_196807 = slt64(n_p_196694, (int64_t) 0);
    bool valid_196808 = !bounds_invalid_upwards_196807;
    bool range_valid_c_196809;
    
    if (!valid_196808) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) n_p_196694, " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  stl.fut:117:12-126:20\n   #4  stl.fut:116:5-127:11\n   #5  stl.fut:401:3-415:29\n   #6  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool bounds_invalid_upwards_196811 = slt64(defunc_0_f_res_196740,
                                               (int64_t) 0);
    bool valid_196812 = !bounds_invalid_upwards_196811;
    bool range_valid_c_196813;
    
    if (!valid_196812) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) defunc_0_f_res_196740,
                               " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  stl.fut:119:20-125:36\n   #4  /prelude/soacs.fut:59:3-10\n   #5  /prelude/array.fut:195:3-17\n   #6  utils.fut:6:3-16\n   #7  stl.fut:117:12-126:20\n   #8  stl.fut:116:5-127:11\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t y_200245 = n_p_196694 * defunc_0_f_res_196740;
    int64_t nest_sizze_200246 = m_196691 * y_200245;
    int64_t segmap_group_sizze_200247;
    
    segmap_group_sizze_200247 =
        *ctx->tuning_params.mainzisegmap_group_sizze_200165;
    
    int64_t segmap_usable_groups_200248 = sdiv_up64(nest_sizze_200246,
                                                    segmap_group_sizze_200247);
    int64_t binop_x_222259 = m_196691 * n_p_196694;
    int64_t binop_x_222260 = defunc_0_f_res_196740 * binop_x_222259;
    int64_t binop_y_222261 = (int64_t) 4 * binop_x_222260;
    int64_t bytes_222262 = smax64((int64_t) 0, binop_y_222261);
    struct memblock_device mem_222263;
    
    mem_222263.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222263, bytes_222262, "mem_222263")) {
        err = 1;
        goto cleanup;
    }
    if (ctx->debugging)
        fprintf(ctx->log, "%s\n", "\n# SegMap");
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 1,
                                            sizeof(ctx->failure_is_an_option),
                                            &ctx->failure_is_an_option));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 3,
                                            sizeof(m_196691), &m_196691));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 4,
                                            sizeof(n_196692), &n_196692));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 5,
                                            sizeof(n_p_196694), &n_p_196694));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 6,
                                            sizeof(defunc_0_f_res_196740),
                                            &defunc_0_f_res_196740));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 7,
                                            sizeof(i_196779), &i_196779));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 8,
                                            sizeof(Y_mem_222225.mem),
                                            &Y_mem_222225.mem));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200253, 9,
                                            sizeof(mem_222263.mem),
                                            &mem_222263.mem));
    if (1 * ((size_t) segmap_usable_groups_200248 *
             (size_t) segmap_group_sizze_200247) != 0) {
        const size_t global_work_sizze_229725[1] =
                     {(size_t) segmap_usable_groups_200248 *
                     (size_t) segmap_group_sizze_200247};
        const size_t local_work_sizze_229729[1] =
                     {(size_t) segmap_group_sizze_200247};
        int64_t time_start_229726 = 0, time_end_229727 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                    "main.segmap_200253", global_work_sizze_229725[0],
                    local_work_sizze_229729[0], (int) 0);
            time_start_229726 = get_wall_time();
        }
        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                        ctx->mainzisegmap_200253,
                                                        1, NULL,
                                                        global_work_sizze_229725,
                                                        local_work_sizze_229729,
                                                        0, NULL,
                                                        ctx->profiling_paused ||
                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                  &ctx->mainzisegmap_200253_runs,
                                                                                                  &ctx->mainzisegmap_200253_total_runtime)));
        if (ctx->debugging) {
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            time_end_229727 = get_wall_time();
            
            long time_diff_229728 = time_end_229727 - time_start_229726;
            
            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                    "main.segmap_200253", time_diff_229728);
        }
    }
    ctx->failure_is_an_option = 1;
    if (ctx->debugging)
        fprintf(ctx->log, "%s\n", "");
    
    int64_t i_196831 = sub64(defunc_0_f_res_196740, (int64_t) 1);
    bool x_196832 = sle64((int64_t) 0, i_196831);
    bool y_196833 = slt64(i_196831, defunc_0_f_res_196740);
    bool bounds_check_196834 = x_196832 && y_196833;
    bool index_certs_196835;
    
    if (!bounds_check_196834) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [", (long long) i_196831,
                               "] out of bounds for array of shape [",
                               (long long) defunc_0_f_res_196740, "].",
                               "-> #0  /prelude/array.fut:26:29-34\n   #1  utils.fut:45:13-20\n   #2  stl.fut:133:51-67\n   #3  stl.fut:132:12-135:21\n   #4  stl.fut:131:5-136:16\n   #5  stl.fut:401:3-415:29\n   #6  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t y_200318 = smin64(n_p_196694, y_200245);
    int64_t intra_avail_par_200319 = smin64(y_200245, y_200318);
    int64_t computed_group_sizze_200270 = smax64(n_p_196694, y_200245);
    bool fits_200326 = sle64(computed_group_sizze_200270,
                             max_group_sizze_199970);
    bool suff_intra_par_200324;
    
    suff_intra_par_200324 = *ctx->tuning_params.mainzisuff_intra_par_1 <=
        intra_avail_par_200319;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_1",
                (long) intra_avail_par_200319,
                suff_intra_par_200324 ? "true" : "false");
    
    bool intra_suff_and_fits_200327 = suff_intra_par_200324 && fits_200326;
    bool fits_200597 = sle64(defunc_0_f_res_196740, max_group_sizze_199970);
    bool suff_intra_par_200599;
    
    suff_intra_par_200599 = *ctx->tuning_params.mainzisuff_intra_par_2 <=
        defunc_0_f_res_196740;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_2",
                (long) defunc_0_f_res_196740,
                suff_intra_par_200599 ? "true" : "false");
    
    bool intra_suff_and_fits_200600 = fits_200597 && suff_intra_par_200599;
    int64_t segscan_group_sizze_200635;
    
    segscan_group_sizze_200635 =
        *ctx->tuning_params.mainzisegscan_group_sizze_200502;
    
    int64_t num_groups_200636;
    int32_t max_num_groups_225428;
    
    max_num_groups_225428 = *ctx->tuning_params.mainzisegscan_num_groups_200504;
    num_groups_200636 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(binop_x_222260,
                                                             segscan_group_sizze_200635),
                                                   sext_i32_i64(max_num_groups_225428))));
    
    int64_t segmap_group_sizze_200682;
    
    segmap_group_sizze_200682 =
        *ctx->tuning_params.mainzisegmap_group_sizze_200433;
    
    int64_t binop_y_222277 = (int64_t) 8 * binop_x_222260;
    int64_t bytes_222278 = smax64((int64_t) 0, binop_y_222277);
    int64_t binop_y_222281 = (int64_t) 8 * binop_x_222259;
    int64_t bytes_222282 = smax64((int64_t) 0, binop_y_222281);
    int64_t binop_y_222267 = (int64_t) 8 * y_200245;
    int64_t bytes_222268 = smax64((int64_t) 0, binop_y_222267);
    int64_t binop_y_222286 = (int64_t) 8 * defunc_0_f_res_196740;
    int64_t bytes_222287 = smax64((int64_t) 0, binop_y_222286);
    struct memblock_device ext_mem_222322;
    
    ext_mem_222322.references = NULL;
    
    struct memblock_device ext_mem_222321;
    
    ext_mem_222321.references = NULL;
    
    int32_t local_memory_capacity_225578;
    
    local_memory_capacity_225578 = ctx->opencl.max_local_memory;
    if (sle64(bytes_222268 + srem64((int64_t) 8 - srem64(bytes_222268,
                                                         (int64_t) 8),
                                    (int64_t) 8) + (bytes_222268 +
                                                    srem64((int64_t) 8 -
                                                           srem64(bytes_222268,
                                                                  (int64_t) 8),
                                                           (int64_t) 8)),
              sext_i32_i64(local_memory_capacity_225578)) &&
        intra_suff_and_fits_200327) {
        struct memblock_device mem_222279;
        
        mem_222279.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222279, bytes_222278,
                                  "mem_222279")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222283;
        
        mem_222283.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222283, bytes_222282,
                                  "mem_222283")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                1, (size_t) bytes_222268,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                2, (size_t) bytes_222268,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                3, sizeof(m_196691),
                                                &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                4, sizeof(n_p_196694),
                                                &n_p_196694));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                5,
                                                sizeof(defunc_0_f_res_196740),
                                                &defunc_0_f_res_196740));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                6, sizeof(i_196831),
                                                &i_196831));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                7,
                                                sizeof(computed_group_sizze_200270),
                                                &computed_group_sizze_200270));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                8, sizeof(mem_222263.mem),
                                                &mem_222263.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                9, sizeof(mem_222279.mem),
                                                &mem_222279.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200331,
                                                10, sizeof(mem_222283.mem),
                                                &mem_222283.mem));
        if (1 * ((size_t) m_196691 * (size_t) computed_group_sizze_200270) !=
            0) {
            const size_t global_work_sizze_229730[1] = {(size_t) m_196691 *
                         (size_t) computed_group_sizze_200270};
            const size_t local_work_sizze_229734[1] =
                         {(size_t) computed_group_sizze_200270};
            int64_t time_start_229731 = 0, time_end_229732 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_intragroup_200331",
                        global_work_sizze_229730[0], local_work_sizze_229734[0],
                        (int) (0 + bytes_222268 + bytes_222268));
                time_start_229731 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_intragroup_200331,
                                                            1, NULL,
                                                            global_work_sizze_229730,
                                                            local_work_sizze_229734,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_intragroup_200331_runs,
                                                                                                      &ctx->mainzisegmap_intragroup_200331_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229732 = get_wall_time();
                
                long time_diff_229733 = time_end_229732 - time_start_229731;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_200331", time_diff_229733);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_set_device(ctx, &ext_mem_222322, &mem_222279,
                                "mem_222279") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222321, &mem_222283,
                                "mem_222283") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222283, "mem_222283") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222279, "mem_222279") != 0)
            return 1;
    } else {
        struct memblock_device ext_mem_222320;
        
        ext_mem_222320.references = NULL;
        
        struct memblock_device ext_mem_222319;
        
        ext_mem_222319.references = NULL;
        
        int32_t local_memory_capacity_225577;
        
        local_memory_capacity_225577 = ctx->opencl.max_local_memory;
        if (sle64(bytes_222287 + srem64((int64_t) 8 - srem64(bytes_222287,
                                                             (int64_t) 8),
                                        (int64_t) 8) + (bytes_222287 +
                                                        srem64((int64_t) 8 -
                                                               srem64(bytes_222287,
                                                                      (int64_t) 8),
                                                               (int64_t) 8)),
                  sext_i32_i64(local_memory_capacity_225577)) &&
            intra_suff_and_fits_200600) {
            struct memblock_device mem_222297;
            
            mem_222297.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222297, bytes_222278,
                                      "mem_222297")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222301;
            
            mem_222301.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222301, bytes_222282,
                                      "mem_222301")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    1, (size_t) bytes_222287,
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    2, (size_t) bytes_222287,
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    3, sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    4, sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    5,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    6, sizeof(i_196831),
                                                    &i_196831));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    7, sizeof(mem_222263.mem),
                                                    &mem_222263.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    8, sizeof(mem_222297.mem),
                                                    &mem_222297.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200607,
                                                    9, sizeof(mem_222301.mem),
                                                    &mem_222301.mem));
            if (1 * ((size_t) binop_x_222259 *
                     (size_t) defunc_0_f_res_196740) != 0) {
                const size_t global_work_sizze_229735[1] =
                             {(size_t) binop_x_222259 *
                             (size_t) defunc_0_f_res_196740};
                const size_t local_work_sizze_229739[1] =
                             {(size_t) defunc_0_f_res_196740};
                int64_t time_start_229736 = 0, time_end_229737 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_intragroup_200607",
                            global_work_sizze_229735[0],
                            local_work_sizze_229739[0], (int) (0 +
                                                               bytes_222287 +
                                                               bytes_222287));
                    time_start_229736 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_intragroup_200607,
                                                                1, NULL,
                                                                global_work_sizze_229735,
                                                                local_work_sizze_229739,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_intragroup_200607_runs,
                                                                                                          &ctx->mainzisegmap_intragroup_200607_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229737 = get_wall_time();
                    
                    long time_diff_229738 = time_end_229737 - time_start_229736;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_intragroup_200607", time_diff_229738);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_set_device(ctx, &ext_mem_222320, &mem_222297,
                                    "mem_222297") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222319, &mem_222301,
                                    "mem_222301") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222301, "mem_222301") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222297, "mem_222297") != 0)
                return 1;
        } else {
            struct memblock_device mem_222307;
            
            mem_222307.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222307, bytes_222278,
                                      "mem_222307")) {
                err = 1;
                goto cleanup;
            }
            if (slt64((int64_t) 0, m_196691 * n_p_196694 *
                      defunc_0_f_res_196740)) {
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegScan");
                
                int64_t stage1_max_num_groups_225488;
                
                stage1_max_num_groups_225488 = ctx->opencl.max_group_size;
                
                int64_t stage1_num_groups_225489 =
                        smin64(stage1_max_num_groups_225488, num_groups_200636);
                int32_t num_threads_225490 =
                        sext_i64_i32(stage1_num_groups_225489 *
                        segscan_group_sizze_200635);
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        1,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 8 *
                                                                        segscan_group_sizze_200635),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        2, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        3, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        4,
                                                        sizeof(defunc_0_f_res_196740),
                                                        &defunc_0_f_res_196740));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        5,
                                                        sizeof(num_threads_225490),
                                                        &num_threads_225490));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        6,
                                                        sizeof(mem_222263.mem),
                                                        &mem_222263.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_200642,
                                                        7,
                                                        sizeof(mem_222307.mem),
                                                        &mem_222307.mem));
                if (1 * ((size_t) stage1_num_groups_225489 *
                         (size_t) segscan_group_sizze_200635) != 0) {
                    const size_t global_work_sizze_229740[1] =
                                 {(size_t) stage1_num_groups_225489 *
                                 (size_t) segscan_group_sizze_200635};
                    const size_t local_work_sizze_229744[1] =
                                 {(size_t) segscan_group_sizze_200635};
                    int64_t time_start_229741 = 0, time_end_229742 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage1_200642",
                                global_work_sizze_229740[0],
                                local_work_sizze_229744[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 8 *
                                                                          segscan_group_sizze_200635)));
                        time_start_229741 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage1_200642,
                                                                    1, NULL,
                                                                    global_work_sizze_229740,
                                                                    local_work_sizze_229744,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage1_200642_runs,
                                                                                                              &ctx->mainziscan_stage1_200642_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_229742 = get_wall_time();
                        
                        long time_diff_229743 = time_end_229742 -
                             time_start_229741;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage1_200642", time_diff_229743);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "elems_per_group",
                            (long long) (segscan_group_sizze_200635 *
                                         sdiv_up64(m_196691 * n_p_196694 *
                                                   defunc_0_f_res_196740,
                                                   sext_i32_i64(num_threads_225490))),
                            '\n');
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        1,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 8 *
                                                                        stage1_num_groups_225489),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        2, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        3, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        4,
                                                        sizeof(defunc_0_f_res_196740),
                                                        &defunc_0_f_res_196740));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        5,
                                                        sizeof(stage1_num_groups_225489),
                                                        &stage1_num_groups_225489));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        6,
                                                        sizeof(num_threads_225490),
                                                        &num_threads_225490));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_200642,
                                                        7,
                                                        sizeof(mem_222307.mem),
                                                        &mem_222307.mem));
                if (1 * ((size_t) (int64_t) 1 *
                         (size_t) stage1_num_groups_225489) != 0) {
                    const size_t global_work_sizze_229745[1] =
                                 {(size_t) (int64_t) 1 *
                                 (size_t) stage1_num_groups_225489};
                    const size_t local_work_sizze_229749[1] =
                                 {(size_t) stage1_num_groups_225489};
                    int64_t time_start_229746 = 0, time_end_229747 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage2_200642",
                                global_work_sizze_229745[0],
                                local_work_sizze_229749[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 8 *
                                                                          stage1_num_groups_225489)));
                        time_start_229746 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage2_200642,
                                                                    1, NULL,
                                                                    global_work_sizze_229745,
                                                                    local_work_sizze_229749,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage2_200642_runs,
                                                                                                              &ctx->mainziscan_stage2_200642_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_229747 = get_wall_time();
                        
                        long time_diff_229748 = time_end_229747 -
                             time_start_229746;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage2_200642", time_diff_229748);
                    }
                }
                
                int32_t required_groups_225541 =
                        sext_i64_i32(sdiv_up64(m_196691 * n_p_196694 *
                                               defunc_0_f_res_196740,
                                               segscan_group_sizze_200635));
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        2, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        3,
                                                        sizeof(defunc_0_f_res_196740),
                                                        &defunc_0_f_res_196740));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        4,
                                                        sizeof(num_groups_200636),
                                                        &num_groups_200636));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        5,
                                                        sizeof(num_threads_225490),
                                                        &num_threads_225490));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        6,
                                                        sizeof(required_groups_225541),
                                                        &required_groups_225541));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_200642,
                                                        7,
                                                        sizeof(mem_222307.mem),
                                                        &mem_222307.mem));
                if (1 * ((size_t) num_groups_200636 *
                         (size_t) segscan_group_sizze_200635) != 0) {
                    const size_t global_work_sizze_229750[1] =
                                 {(size_t) num_groups_200636 *
                                 (size_t) segscan_group_sizze_200635};
                    const size_t local_work_sizze_229754[1] =
                                 {(size_t) segscan_group_sizze_200635};
                    int64_t time_start_229751 = 0, time_end_229752 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage3_200642",
                                global_work_sizze_229750[0],
                                local_work_sizze_229754[0], (int) 0);
                        time_start_229751 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage3_200642,
                                                                    1, NULL,
                                                                    global_work_sizze_229750,
                                                                    local_work_sizze_229754,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage3_200642_runs,
                                                                                                              &ctx->mainziscan_stage3_200642_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_229752 = get_wall_time();
                        
                        long time_diff_229753 = time_end_229752 -
                             time_start_229751;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage3_200642", time_diff_229753);
                    }
                }
            }
            
            struct memblock_device mem_222312;
            
            mem_222312.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222312, bytes_222278,
                                      "mem_222312")) {
                err = 1;
                goto cleanup;
            }
            if (futrts_builtinzhreplicate_i64(ctx, mem_222312, m_196691 *
                                              n_p_196694 *
                                              defunc_0_f_res_196740,
                                              (int64_t) -1) != 0) {
                if (memblock_unref_device(ctx, &mem_222312, "mem_222312") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222307, "mem_222307") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222319,
                                          "ext_mem_222319") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222320,
                                          "ext_mem_222320") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222321,
                                          "ext_mem_222321") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222322,
                                          "ext_mem_222322") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222256,
                                          "ext_mem_222256") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222257,
                                          "ext_mem_222257") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225292,
                                          "mem_out_225292") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225291,
                                          "mem_out_225291") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225290,
                                          "mem_out_225290") != 0)
                    return 1;
                err = 1;
                goto cleanup;
            }
            
            int64_t segmap_usable_groups_200683 = sdiv_up64(nest_sizze_200246,
                                                            segmap_group_sizze_200682);
            
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 2,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 3,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 4,
                                                    sizeof(mem_222263.mem),
                                                    &mem_222263.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 5,
                                                    sizeof(mem_222307.mem),
                                                    &mem_222307.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_200688, 6,
                                                    sizeof(mem_222312.mem),
                                                    &mem_222312.mem));
            if (1 * ((size_t) segmap_usable_groups_200683 *
                     (size_t) segmap_group_sizze_200682) != 0) {
                const size_t global_work_sizze_229755[1] =
                             {(size_t) segmap_usable_groups_200683 *
                             (size_t) segmap_group_sizze_200682};
                const size_t local_work_sizze_229759[1] =
                             {(size_t) segmap_group_sizze_200682};
                int64_t time_start_229756 = 0, time_end_229757 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_200688", global_work_sizze_229755[0],
                            local_work_sizze_229759[0], (int) 0);
                    time_start_229756 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_200688,
                                                                1, NULL,
                                                                global_work_sizze_229755,
                                                                local_work_sizze_229759,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_200688_runs,
                                                                                                          &ctx->mainzisegmap_200688_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229757 = get_wall_time();
                    
                    long time_diff_229758 = time_end_229757 - time_start_229756;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_200688", time_diff_229758);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            
            struct memblock_device mem_222317;
            
            mem_222317.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222317, bytes_222282,
                                      "mem_222317")) {
                err = 1;
                goto cleanup;
            }
            
            int64_t group_sizze_225568;
            
            group_sizze_225568 = *ctx->tuning_params.mainzigroup_sizze_225568;
            
            int64_t num_groups_225569 = sdiv_up64(m_196691 * n_p_196694,
                                                  group_sizze_225568);
            
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 0,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 1,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 2,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 3,
                                                    sizeof(i_196831),
                                                    &i_196831));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 4,
                                                    sizeof(mem_222307.mem),
                                                    &mem_222307.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_225565, 5,
                                                    sizeof(mem_222317.mem),
                                                    &mem_222317.mem));
            if (1 * ((size_t) num_groups_225569 *
                     (size_t) group_sizze_225568) != 0) {
                const size_t global_work_sizze_229760[1] =
                             {(size_t) num_groups_225569 *
                             (size_t) group_sizze_225568};
                const size_t local_work_sizze_229764[1] =
                             {(size_t) group_sizze_225568};
                int64_t time_start_229761 = 0, time_end_229762 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.copy_225565", global_work_sizze_229760[0],
                            local_work_sizze_229764[0], (int) 0);
                    time_start_229761 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzicopy_225565,
                                                                1, NULL,
                                                                global_work_sizze_229760,
                                                                local_work_sizze_229764,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzicopy_225565_runs,
                                                                                                          &ctx->mainzicopy_225565_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229762 = get_wall_time();
                    
                    long time_diff_229763 = time_end_229762 - time_start_229761;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.copy_225565", time_diff_229763);
                }
            }
            if (memblock_unref_device(ctx, &mem_222307, "mem_222307") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222320, &mem_222312,
                                    "mem_222312") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222319, &mem_222317,
                                    "mem_222317") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222317, "mem_222317") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222312, "mem_222312") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222307, "mem_222307") != 0)
                return 1;
        }
        if (memblock_set_device(ctx, &ext_mem_222322, &ext_mem_222320,
                                "ext_mem_222320") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222321, &ext_mem_222319,
                                "ext_mem_222319") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222319, "ext_mem_222319") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222320, "ext_mem_222320") != 0)
            return 1;
    }
    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
        return 1;
    
    int64_t min_res_196862 = smin64(q_s_196695, defunc_0_f_res_196740);
    bool bounds_invalid_upwards_196863 = slt64(s_n_m_196745, (int64_t) 0);
    bool valid_196864 = !bounds_invalid_upwards_196863;
    bool range_valid_c_196865;
    
    if (!valid_196864) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) s_n_m_196745, " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  loess.fut:442:3-469:10\n   #4  loess.fut:516:15-50\n   #5  stl.fut:142:20-80\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:141:12-143:40\n   #9  /prelude/soacs.fut:67:19-23\n   #10 /prelude/soacs.fut:67:3-37\n   #11 stl.fut:140:5-144:36\n   #12 stl.fut:401:3-415:29\n   #13 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool loop_cond_196867 = slt64((int64_t) 1, min_res_196862);
    float i64_res_196868 = sitofp_i64_f32(q_s_196695);
    int64_t one_intra_par_min_200843 = n_p_196694 * s_n_m_196745;
    int64_t y_200846 = smin64(n_p_196694, one_intra_par_min_200843);
    int64_t intra_avail_par_200847 = smin64(y_200245, y_200846);
    int64_t y_200848 = smax64(n_p_196694, one_intra_par_min_200843);
    int64_t computed_group_sizze_200702 = smax64(y_200245, y_200848);
    bool fits_200855 = sle64(computed_group_sizze_200702,
                             max_group_sizze_199970);
    bool suff_intra_par_200853;
    
    suff_intra_par_200853 = *ctx->tuning_params.mainzisuff_intra_par_3 <=
        intra_avail_par_200847;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_3",
                (long) intra_avail_par_200847,
                suff_intra_par_200853 ? "true" : "false");
    
    bool intra_suff_and_fits_200856 = suff_intra_par_200853 && fits_200855;
    int64_t intra_avail_par_201749 = smin64(defunc_0_f_res_196740,
                                            s_n_m_196745);
    int64_t computed_group_sizze_201750 = smax64(defunc_0_f_res_196740,
                                                 s_n_m_196745);
    bool fits_201754 = sle64(computed_group_sizze_201750,
                             max_group_sizze_199970);
    bool suff_intra_par_201756;
    
    suff_intra_par_201756 = *ctx->tuning_params.mainzisuff_intra_par_4 <=
        intra_avail_par_201749;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_4",
                (long) intra_avail_par_201749,
                suff_intra_par_201756 ? "true" : "false");
    
    bool intra_suff_and_fits_201757 = fits_201754 && suff_intra_par_201756;
    int64_t segmap_group_sizze_201895;
    
    segmap_group_sizze_201895 =
        *ctx->tuning_params.mainzisegmap_group_sizze_201558;
    
    int64_t segmap_group_sizze_201907;
    
    segmap_group_sizze_201907 =
        *ctx->tuning_params.mainzisegmap_group_sizze_201527;
    
    int64_t nest_sizze_201931 = m_196691 * one_intra_par_min_200843;
    int64_t segmap_group_sizze_201932;
    
    segmap_group_sizze_201932 =
        *ctx->tuning_params.mainzisegmap_group_sizze_201288;
    
    int64_t binop_x_222352 = s_n_m_196745 * binop_x_222259;
    int64_t binop_y_222353 = (int64_t) 8 * binop_x_222352;
    int64_t bytes_222354 = smax64((int64_t) 0, binop_y_222353);
    int64_t binop_y_222358 = (int64_t) 4 * binop_x_222352;
    int64_t bytes_222359 = smax64((int64_t) 0, binop_y_222358);
    int64_t binop_y_222330 = (int64_t) 8 * n_p_196694;
    int64_t bytes_222331 = smax64((int64_t) 0, binop_y_222330);
    int64_t binop_y_222339 = (int64_t) 4 * n_p_196694;
    int64_t bytes_222340 = smax64((int64_t) 0, binop_y_222339);
    int64_t binop_y_222344 = (int64_t) 4 * one_intra_par_min_200843;
    int64_t bytes_222345 = smax64((int64_t) 0, binop_y_222344);
    int64_t binop_y_222348 = (int64_t) 8 * one_intra_par_min_200843;
    int64_t bytes_222349 = smax64((int64_t) 0, binop_y_222348);
    int64_t binop_y_222367 = (int64_t) 4 * s_n_m_196745;
    int64_t bytes_222368 = smax64((int64_t) 0, binop_y_222367);
    int64_t binop_y_222370 = (int64_t) 8 * s_n_m_196745;
    int64_t bytes_222371 = smax64((int64_t) 0, binop_y_222370);
    int64_t binop_y_222403 = (int64_t) 4 * binop_x_222259;
    int64_t bytes_222404 = smax64((int64_t) 0, binop_y_222403);
    struct memblock_device ext_mem_222420;
    
    ext_mem_222420.references = NULL;
    
    struct memblock_device ext_mem_222419;
    
    ext_mem_222419.references = NULL;
    
    int32_t local_memory_capacity_225680;
    
    local_memory_capacity_225680 = ctx->opencl.max_local_memory;
    if (sle64(bytes_222349 + srem64((int64_t) 8 - srem64(bytes_222349,
                                                         (int64_t) 8),
                                    (int64_t) 8) + (bytes_222345 +
                                                    srem64((int64_t) 8 -
                                                           srem64(bytes_222345,
                                                                  (int64_t) 8),
                                                           (int64_t) 8)) +
              (bytes_222340 + srem64((int64_t) 8 - srem64(bytes_222340,
                                                          (int64_t) 8),
                                     (int64_t) 8)) + (bytes_222331 +
                                                      srem64((int64_t) 8 -
                                                             srem64(bytes_222331,
                                                                    (int64_t) 8),
                                                             (int64_t) 8)) +
              (bytes_222331 + srem64((int64_t) 8 - srem64(bytes_222331,
                                                          (int64_t) 8),
                                     (int64_t) 8)) + (bytes_222331 +
                                                      srem64((int64_t) 8 -
                                                             srem64(bytes_222331,
                                                                    (int64_t) 8),
                                                             (int64_t) 8)) +
              (bytes_222268 + srem64((int64_t) 8 - srem64(bytes_222268,
                                                          (int64_t) 8),
                                     (int64_t) 8)),
              sext_i32_i64(local_memory_capacity_225680)) &&
        intra_suff_and_fits_200856) {
        struct memblock_device mem_222355;
        
        mem_222355.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222355, bytes_222354,
                                  "mem_222355")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222360;
        
        mem_222360.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222360, bytes_222359,
                                  "mem_222360")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                1,
                                                sizeof(ctx->failure_is_an_option),
                                                &ctx->failure_is_an_option));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                3, (size_t) bytes_222268,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                4, (size_t) bytes_222331,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                5, (size_t) bytes_222331,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                6, (size_t) bytes_222331,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                7, (size_t) bytes_222340,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                8, (size_t) bytes_222345,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                9, (size_t) bytes_222349,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                10, sizeof(m_196691),
                                                &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                11, sizeof(n_p_196694),
                                                &n_p_196694));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                12, sizeof(q_s_196695),
                                                &q_s_196695));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                13, sizeof(jump_s_196701),
                                                &jump_s_196701));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                14,
                                                sizeof(defunc_0_f_res_196740),
                                                &defunc_0_f_res_196740));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                15, sizeof(pad_css_len_196741),
                                                &pad_css_len_196741));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                16, sizeof(s_n_m_196745),
                                                &s_n_m_196745));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                17, sizeof(i_196831),
                                                &i_196831));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                18, sizeof(x_196832),
                                                &x_196832));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                19, sizeof(min_res_196862),
                                                &min_res_196862));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                20, sizeof(loop_cond_196867),
                                                &loop_cond_196867));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                21, sizeof(i64_res_196868),
                                                &i64_res_196868));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                22,
                                                sizeof(computed_group_sizze_200702),
                                                &computed_group_sizze_200702));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                23, sizeof(ext_mem_222321.mem),
                                                &ext_mem_222321.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                24, sizeof(ext_mem_222322.mem),
                                                &ext_mem_222322.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                25, sizeof(mem_222355.mem),
                                                &mem_222355.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_200860,
                                                26, sizeof(mem_222360.mem),
                                                &mem_222360.mem));
        if (1 * ((size_t) m_196691 * (size_t) computed_group_sizze_200702) !=
            0) {
            const size_t global_work_sizze_229765[1] = {(size_t) m_196691 *
                         (size_t) computed_group_sizze_200702};
            const size_t local_work_sizze_229769[1] =
                         {(size_t) computed_group_sizze_200702};
            int64_t time_start_229766 = 0, time_end_229767 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_intragroup_200860",
                        global_work_sizze_229765[0], local_work_sizze_229769[0],
                        (int) (0 + bytes_222268 + bytes_222331 + bytes_222331 +
                               bytes_222331 + bytes_222340 + bytes_222345 +
                               bytes_222349));
                time_start_229766 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_intragroup_200860,
                                                            1, NULL,
                                                            global_work_sizze_229765,
                                                            local_work_sizze_229769,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_intragroup_200860_runs,
                                                                                                      &ctx->mainzisegmap_intragroup_200860_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229767 = get_wall_time();
                
                long time_diff_229768 = time_end_229767 - time_start_229766;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_200860", time_diff_229768);
            }
        }
        ctx->failure_is_an_option = 1;
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_set_device(ctx, &ext_mem_222420, &mem_222355,
                                "mem_222355") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222419, &mem_222360,
                                "mem_222360") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222360, "mem_222360") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222355, "mem_222355") != 0)
            return 1;
    } else {
        struct memblock_device ext_mem_222418;
        
        ext_mem_222418.references = NULL;
        
        struct memblock_device ext_mem_222417;
        
        ext_mem_222417.references = NULL;
        
        int32_t local_memory_capacity_225679;
        
        local_memory_capacity_225679 = ctx->opencl.max_local_memory;
        if (sle64(bytes_222371 + srem64((int64_t) 8 - srem64(bytes_222371,
                                                             (int64_t) 8),
                                        (int64_t) 8) + (bytes_222368 +
                                                        srem64((int64_t) 8 -
                                                               srem64(bytes_222368,
                                                                      (int64_t) 8),
                                                               (int64_t) 8)) +
                  (bytes_222287 + srem64((int64_t) 8 - srem64(bytes_222287,
                                                              (int64_t) 8),
                                         (int64_t) 8)),
                  sext_i32_i64(local_memory_capacity_225679)) &&
            intra_suff_and_fits_201757) {
            struct memblock_device mem_222377;
            
            mem_222377.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222377, bytes_222354,
                                      "mem_222377")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222382;
            
            mem_222382.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222382, bytes_222359,
                                      "mem_222382")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    1,
                                                    sizeof(ctx->failure_is_an_option),
                                                    &ctx->failure_is_an_option));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    3, (size_t) bytes_222287,
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    4, (size_t) bytes_222368,
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    5, (size_t) bytes_222371,
                                                    NULL));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    6, sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    7, sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    8, sizeof(q_s_196695),
                                                    &q_s_196695));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    9, sizeof(jump_s_196701),
                                                    &jump_s_196701));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    10,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    11,
                                                    sizeof(pad_css_len_196741),
                                                    &pad_css_len_196741));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    12, sizeof(s_n_m_196745),
                                                    &s_n_m_196745));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    13, sizeof(i_196831),
                                                    &i_196831));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    14, sizeof(x_196832),
                                                    &x_196832));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    15, sizeof(min_res_196862),
                                                    &min_res_196862));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    16,
                                                    sizeof(loop_cond_196867),
                                                    &loop_cond_196867));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    17, sizeof(i64_res_196868),
                                                    &i64_res_196868));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    18,
                                                    sizeof(computed_group_sizze_201750),
                                                    &computed_group_sizze_201750));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    19,
                                                    sizeof(ext_mem_222321.mem),
                                                    &ext_mem_222321.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    20,
                                                    sizeof(ext_mem_222322.mem),
                                                    &ext_mem_222322.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    21, sizeof(mem_222377.mem),
                                                    &mem_222377.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_201764,
                                                    22, sizeof(mem_222382.mem),
                                                    &mem_222382.mem));
            if (1 * ((size_t) binop_x_222259 *
                     (size_t) computed_group_sizze_201750) != 0) {
                const size_t global_work_sizze_229770[1] =
                             {(size_t) binop_x_222259 *
                             (size_t) computed_group_sizze_201750};
                const size_t local_work_sizze_229774[1] =
                             {(size_t) computed_group_sizze_201750};
                int64_t time_start_229771 = 0, time_end_229772 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_intragroup_201764",
                            global_work_sizze_229770[0],
                            local_work_sizze_229774[0], (int) (0 +
                                                               bytes_222287 +
                                                               bytes_222368 +
                                                               bytes_222371));
                    time_start_229771 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_intragroup_201764,
                                                                1, NULL,
                                                                global_work_sizze_229770,
                                                                local_work_sizze_229774,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_intragroup_201764_runs,
                                                                                                          &ctx->mainzisegmap_intragroup_201764_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229772 = get_wall_time();
                    
                    long time_diff_229773 = time_end_229772 - time_start_229771;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_intragroup_201764", time_diff_229773);
                }
            }
            ctx->failure_is_an_option = 1;
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_set_device(ctx, &ext_mem_222418, &mem_222377,
                                    "mem_222377") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222417, &mem_222382,
                                    "mem_222382") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222382, "mem_222382") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222377, "mem_222377") != 0)
                return 1;
        } else {
            int64_t segmap_usable_groups_201896 = sdiv_up64(nest_sizze_200246,
                                                            segmap_group_sizze_201895);
            struct memblock_device mem_222388;
            
            mem_222388.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222388, bytes_222278,
                                      "mem_222388")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201901, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201901, 2,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201901, 3,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201901, 4,
                                                    sizeof(ext_mem_222322.mem),
                                                    &ext_mem_222322.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201901, 5,
                                                    sizeof(mem_222388.mem),
                                                    &mem_222388.mem));
            if (1 * ((size_t) segmap_usable_groups_201896 *
                     (size_t) segmap_group_sizze_201895) != 0) {
                const size_t global_work_sizze_229775[1] =
                             {(size_t) segmap_usable_groups_201896 *
                             (size_t) segmap_group_sizze_201895};
                const size_t local_work_sizze_229779[1] =
                             {(size_t) segmap_group_sizze_201895};
                int64_t time_start_229776 = 0, time_end_229777 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_201901", global_work_sizze_229775[0],
                            local_work_sizze_229779[0], (int) 0);
                    time_start_229776 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_201901,
                                                                1, NULL,
                                                                global_work_sizze_229775,
                                                                local_work_sizze_229779,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_201901_runs,
                                                                                                          &ctx->mainzisegmap_201901_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229777 = get_wall_time();
                    
                    long time_diff_229778 = time_end_229777 - time_start_229776;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_201901", time_diff_229778);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            
            int64_t segmap_usable_groups_201908 = sdiv_up64(binop_x_222259,
                                                            segmap_group_sizze_201907);
            struct memblock_device mem_222393;
            
            mem_222393.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222393, bytes_222282,
                                      "mem_222393")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222397;
            
            mem_222397.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222397, bytes_222282,
                                      "mem_222397")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222401;
            
            mem_222401.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222401, bytes_222282,
                                      "mem_222401")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222405;
            
            mem_222405.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222405, bytes_222404,
                                      "mem_222405")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 2,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 3,
                                                    sizeof(q_s_196695),
                                                    &q_s_196695));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 4,
                                                    sizeof(min_res_196862),
                                                    &min_res_196862));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 5,
                                                    sizeof(i64_res_196868),
                                                    &i64_res_196868));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 6,
                                                    sizeof(ext_mem_222321.mem),
                                                    &ext_mem_222321.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 7,
                                                    sizeof(mem_222393.mem),
                                                    &mem_222393.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 8,
                                                    sizeof(mem_222397.mem),
                                                    &mem_222397.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915, 9,
                                                    sizeof(mem_222401.mem),
                                                    &mem_222401.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201915,
                                                    10, sizeof(mem_222405.mem),
                                                    &mem_222405.mem));
            if (1 * ((size_t) segmap_usable_groups_201908 *
                     (size_t) segmap_group_sizze_201907) != 0) {
                const size_t global_work_sizze_229780[1] =
                             {(size_t) segmap_usable_groups_201908 *
                             (size_t) segmap_group_sizze_201907};
                const size_t local_work_sizze_229784[1] =
                             {(size_t) segmap_group_sizze_201907};
                int64_t time_start_229781 = 0, time_end_229782 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_201915", global_work_sizze_229780[0],
                            local_work_sizze_229784[0], (int) 0);
                    time_start_229781 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_201915,
                                                                1, NULL,
                                                                global_work_sizze_229780,
                                                                local_work_sizze_229784,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_201915_runs,
                                                                                                          &ctx->mainzisegmap_201915_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229782 = get_wall_time();
                    
                    long time_diff_229783 = time_end_229782 - time_start_229781;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_201915", time_diff_229783);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            
            int64_t segmap_usable_groups_201933 = sdiv_up64(nest_sizze_201931,
                                                            segmap_group_sizze_201932);
            struct memblock_device mem_222411;
            
            mem_222411.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222411, bytes_222359,
                                      "mem_222411")) {
                err = 1;
                goto cleanup;
            }
            
            struct memblock_device mem_222416;
            
            mem_222416.references = NULL;
            if (memblock_alloc_device(ctx, &mem_222416, bytes_222354,
                                      "mem_222416")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 1,
                                                    sizeof(ctx->failure_is_an_option),
                                                    &ctx->failure_is_an_option));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 3,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 4,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 5,
                                                    sizeof(jump_s_196701),
                                                    &jump_s_196701));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 6,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 7,
                                                    sizeof(pad_css_len_196741),
                                                    &pad_css_len_196741));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 8,
                                                    sizeof(s_n_m_196745),
                                                    &s_n_m_196745));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939, 9,
                                                    sizeof(i_196831),
                                                    &i_196831));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    10, sizeof(x_196832),
                                                    &x_196832));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    11, sizeof(min_res_196862),
                                                    &min_res_196862));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    12,
                                                    sizeof(loop_cond_196867),
                                                    &loop_cond_196867));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    13, sizeof(mem_222388.mem),
                                                    &mem_222388.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    14, sizeof(mem_222393.mem),
                                                    &mem_222393.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    15, sizeof(mem_222397.mem),
                                                    &mem_222397.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    16, sizeof(mem_222401.mem),
                                                    &mem_222401.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    17, sizeof(mem_222405.mem),
                                                    &mem_222405.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    18, sizeof(mem_222411.mem),
                                                    &mem_222411.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_201939,
                                                    19, sizeof(mem_222416.mem),
                                                    &mem_222416.mem));
            if (1 * ((size_t) segmap_usable_groups_201933 *
                     (size_t) segmap_group_sizze_201932) != 0) {
                const size_t global_work_sizze_229785[1] =
                             {(size_t) segmap_usable_groups_201933 *
                             (size_t) segmap_group_sizze_201932};
                const size_t local_work_sizze_229789[1] =
                             {(size_t) segmap_group_sizze_201932};
                int64_t time_start_229786 = 0, time_end_229787 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_201939", global_work_sizze_229785[0],
                            local_work_sizze_229789[0], (int) 0);
                    time_start_229786 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_201939,
                                                                1, NULL,
                                                                global_work_sizze_229785,
                                                                local_work_sizze_229789,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_201939_runs,
                                                                                                          &ctx->mainzisegmap_201939_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229787 = get_wall_time();
                    
                    long time_diff_229788 = time_end_229787 - time_start_229786;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_201939", time_diff_229788);
                }
            }
            ctx->failure_is_an_option = 1;
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_unref_device(ctx, &mem_222388, "mem_222388") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222393, "mem_222393") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222397, "mem_222397") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222401, "mem_222401") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222405, "mem_222405") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222418, &mem_222416,
                                    "mem_222416") != 0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_222417, &mem_222411,
                                    "mem_222411") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222416, "mem_222416") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222411, "mem_222411") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222405, "mem_222405") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222401, "mem_222401") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222397, "mem_222397") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222393, "mem_222393") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_222388, "mem_222388") != 0)
                return 1;
        }
        if (memblock_set_device(ctx, &ext_mem_222420, &ext_mem_222418,
                                "ext_mem_222418") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222419, &ext_mem_222417,
                                "ext_mem_222417") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222417, "ext_mem_222417") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222418, "ext_mem_222418") != 0)
            return 1;
    }
    
    int64_t min_res_196994 = smin64(n_196692, q_l_196697);
    bool bounds_invalid_upwards_196995 = slt64(l_n_m_196752, (int64_t) 0);
    bool valid_196996 = !bounds_invalid_upwards_196995;
    bool range_valid_c_196997;
    
    if (!valid_196996) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) l_n_m_196752, " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  loess.fut:442:3-469:10\n   #4  loess.fut:502:15-61\n   #5  stl.fut:150:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:148:5-151:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool loop_cond_196999 = slt64((int64_t) 1, min_res_196994);
    float i64_res_197000 = sitofp_i64_f32(q_l_196697);
    int64_t intra_avail_par_202154 = smin64(n_196692, l_n_m_196752);
    int64_t computed_group_sizze_202056 = smax64(n_196692, l_n_m_196752);
    bool fits_202160 = sle64(computed_group_sizze_202056,
                             max_group_sizze_199970);
    bool suff_intra_par_202158;
    
    suff_intra_par_202158 = *ctx->tuning_params.mainzisuff_intra_par_5 <=
        intra_avail_par_202154;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_5",
                (long) intra_avail_par_202154,
                suff_intra_par_202158 ? "true" : "false");
    
    bool intra_suff_and_fits_202161 = suff_intra_par_202158 && fits_202160;
    int64_t segmap_group_sizze_202544;
    
    segmap_group_sizze_202544 =
        *ctx->tuning_params.mainzisegmap_group_sizze_202520;
    
    int64_t segmap_group_sizze_202554;
    
    segmap_group_sizze_202554 =
        *ctx->tuning_params.mainzisegmap_group_sizze_202494;
    
    int64_t nest_sizze_202575 = m_196691 * l_n_m_196752;
    int64_t segmap_group_sizze_202576;
    
    segmap_group_sizze_202576 =
        *ctx->tuning_params.mainzisegmap_group_sizze_202290;
    
    int64_t binop_y_222434 = (int64_t) 8 * nest_sizze_202575;
    int64_t bytes_222435 = smax64((int64_t) 0, binop_y_222434);
    int64_t binop_y_222438 = (int64_t) 4 * nest_sizze_202575;
    int64_t bytes_222439 = smax64((int64_t) 0, binop_y_222438);
    int64_t binop_y_222427 = (int64_t) 4 * l_n_m_196752;
    int64_t bytes_222428 = smax64((int64_t) 0, binop_y_222427);
    int64_t binop_y_222430 = (int64_t) 8 * l_n_m_196752;
    int64_t bytes_222431 = smax64((int64_t) 0, binop_y_222430);
    int64_t binop_y_222456 = (int64_t) 4 * m_196691;
    int64_t bytes_222457 = smax64((int64_t) 0, binop_y_222456);
    struct memblock_device ext_mem_222469;
    
    ext_mem_222469.references = NULL;
    
    struct memblock_device ext_mem_222468;
    
    ext_mem_222468.references = NULL;
    
    int32_t local_memory_capacity_225740;
    
    local_memory_capacity_225740 = ctx->opencl.max_local_memory;
    if (sle64(bytes_222431 + srem64((int64_t) 8 - srem64(bytes_222431,
                                                         (int64_t) 8),
                                    (int64_t) 8) + (bytes_222428 +
                                                    srem64((int64_t) 8 -
                                                           srem64(bytes_222428,
                                                                  (int64_t) 8),
                                                           (int64_t) 8)) +
              (bytes_222229 + srem64((int64_t) 8 - srem64(bytes_222229,
                                                          (int64_t) 8),
                                     (int64_t) 8)),
              sext_i32_i64(local_memory_capacity_225740)) &&
        intra_suff_and_fits_202161) {
        struct memblock_device mem_222436;
        
        mem_222436.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222436, bytes_222435,
                                  "mem_222436")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222440;
        
        mem_222440.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222440, bytes_222439,
                                  "mem_222440")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                1,
                                                sizeof(ctx->failure_is_an_option),
                                                &ctx->failure_is_an_option));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                3, (size_t) bytes_222229,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                4, (size_t) bytes_222428,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                5, (size_t) bytes_222431,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                6, sizeof(m_196691),
                                                &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                7, sizeof(n_196692),
                                                &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                8, sizeof(q_l_196697),
                                                &q_l_196697));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                9, sizeof(jump_l_196703),
                                                &jump_l_196703));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                10, sizeof(l_n_m_196752),
                                                &l_n_m_196752));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                11, sizeof(i_196779),
                                                &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                12, sizeof(x_196780),
                                                &x_196780));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                13, sizeof(min_res_196994),
                                                &min_res_196994));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                14, sizeof(loop_cond_196999),
                                                &loop_cond_196999));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                15, sizeof(i64_res_197000),
                                                &i64_res_197000));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                16,
                                                sizeof(computed_group_sizze_202056),
                                                &computed_group_sizze_202056));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                17, sizeof(ext_mem_222256.mem),
                                                &ext_mem_222256.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                18, sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                19, sizeof(mem_222436.mem),
                                                &mem_222436.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202165,
                                                20, sizeof(mem_222440.mem),
                                                &mem_222440.mem));
        if (1 * ((size_t) m_196691 * (size_t) computed_group_sizze_202056) !=
            0) {
            const size_t global_work_sizze_229790[1] = {(size_t) m_196691 *
                         (size_t) computed_group_sizze_202056};
            const size_t local_work_sizze_229794[1] =
                         {(size_t) computed_group_sizze_202056};
            int64_t time_start_229791 = 0, time_end_229792 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_intragroup_202165",
                        global_work_sizze_229790[0], local_work_sizze_229794[0],
                        (int) (0 + bytes_222229 + bytes_222428 + bytes_222431));
                time_start_229791 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_intragroup_202165,
                                                            1, NULL,
                                                            global_work_sizze_229790,
                                                            local_work_sizze_229794,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_intragroup_202165_runs,
                                                                                                      &ctx->mainzisegmap_intragroup_202165_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229792 = get_wall_time();
                
                long time_diff_229793 = time_end_229792 - time_start_229791;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_202165", time_diff_229793);
            }
        }
        ctx->failure_is_an_option = 1;
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_set_device(ctx, &ext_mem_222469, &mem_222436,
                                "mem_222436") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222468, &mem_222440,
                                "mem_222440") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222440, "mem_222440") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222436, "mem_222436") != 0)
            return 1;
    } else {
        int64_t segmap_usable_groups_202545 = sdiv_up64(nest_sizze_200083,
                                                        segmap_group_sizze_202544);
        struct memblock_device mem_222445;
        
        mem_222445.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222445, bytes_222237,
                                  "mem_222445")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202549, 1,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202549, 2,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202549, 3,
                                                sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202549, 4,
                                                sizeof(mem_222445.mem),
                                                &mem_222445.mem));
        if (1 * ((size_t) segmap_usable_groups_202545 *
                 (size_t) segmap_group_sizze_202544) != 0) {
            const size_t global_work_sizze_229795[1] =
                         {(size_t) segmap_usable_groups_202545 *
                         (size_t) segmap_group_sizze_202544};
            const size_t local_work_sizze_229799[1] =
                         {(size_t) segmap_group_sizze_202544};
            int64_t time_start_229796 = 0, time_end_229797 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_202549", global_work_sizze_229795[0],
                        local_work_sizze_229799[0], (int) 0);
                time_start_229796 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_202549,
                                                            1, NULL,
                                                            global_work_sizze_229795,
                                                            local_work_sizze_229799,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_202549_runs,
                                                                                                      &ctx->mainzisegmap_202549_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229797 = get_wall_time();
                
                long time_diff_229798 = time_end_229797 - time_start_229796;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_202549", time_diff_229798);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        
        int64_t segmap_usable_groups_202555 = sdiv_up64(m_196691,
                                                        segmap_group_sizze_202554);
        struct memblock_device mem_222449;
        
        mem_222449.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222449, bytes_222240,
                                  "mem_222449")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222452;
        
        mem_222452.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222452, bytes_222240,
                                  "mem_222452")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222455;
        
        mem_222455.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222455, bytes_222240,
                                  "mem_222455")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222458;
        
        mem_222458.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222458, bytes_222457,
                                  "mem_222458")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 1,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 2,
                                                sizeof(q_l_196697),
                                                &q_l_196697));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 3,
                                                sizeof(min_res_196994),
                                                &min_res_196994));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 4,
                                                sizeof(i64_res_197000),
                                                &i64_res_197000));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 5,
                                                sizeof(ext_mem_222256.mem),
                                                &ext_mem_222256.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 6,
                                                sizeof(mem_222449.mem),
                                                &mem_222449.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 7,
                                                sizeof(mem_222452.mem),
                                                &mem_222452.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 8,
                                                sizeof(mem_222455.mem),
                                                &mem_222455.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202561, 9,
                                                sizeof(mem_222458.mem),
                                                &mem_222458.mem));
        if (1 * ((size_t) segmap_usable_groups_202555 *
                 (size_t) segmap_group_sizze_202554) != 0) {
            const size_t global_work_sizze_229800[1] =
                         {(size_t) segmap_usable_groups_202555 *
                         (size_t) segmap_group_sizze_202554};
            const size_t local_work_sizze_229804[1] =
                         {(size_t) segmap_group_sizze_202554};
            int64_t time_start_229801 = 0, time_end_229802 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_202561", global_work_sizze_229800[0],
                        local_work_sizze_229804[0], (int) 0);
                time_start_229801 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_202561,
                                                            1, NULL,
                                                            global_work_sizze_229800,
                                                            local_work_sizze_229804,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_202561_runs,
                                                                                                      &ctx->mainzisegmap_202561_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229802 = get_wall_time();
                
                long time_diff_229803 = time_end_229802 - time_start_229801;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_202561", time_diff_229803);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        
        int64_t segmap_usable_groups_202577 = sdiv_up64(nest_sizze_202575,
                                                        segmap_group_sizze_202576);
        struct memblock_device mem_222463;
        
        mem_222463.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222463, bytes_222439,
                                  "mem_222463")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222467;
        
        mem_222467.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222467, bytes_222435,
                                  "mem_222467")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 1,
                                                sizeof(ctx->failure_is_an_option),
                                                &ctx->failure_is_an_option));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 3,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 4,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 5,
                                                sizeof(jump_l_196703),
                                                &jump_l_196703));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 6,
                                                sizeof(l_n_m_196752),
                                                &l_n_m_196752));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 7,
                                                sizeof(i_196779), &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 8,
                                                sizeof(x_196780), &x_196780));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 9,
                                                sizeof(min_res_196994),
                                                &min_res_196994));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 10,
                                                sizeof(loop_cond_196999),
                                                &loop_cond_196999));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 11,
                                                sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 12,
                                                sizeof(mem_222445.mem),
                                                &mem_222445.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 13,
                                                sizeof(mem_222449.mem),
                                                &mem_222449.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 14,
                                                sizeof(mem_222452.mem),
                                                &mem_222452.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 15,
                                                sizeof(mem_222455.mem),
                                                &mem_222455.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 16,
                                                sizeof(mem_222458.mem),
                                                &mem_222458.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 17,
                                                sizeof(mem_222463.mem),
                                                &mem_222463.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_202582, 18,
                                                sizeof(mem_222467.mem),
                                                &mem_222467.mem));
        if (1 * ((size_t) segmap_usable_groups_202577 *
                 (size_t) segmap_group_sizze_202576) != 0) {
            const size_t global_work_sizze_229805[1] =
                         {(size_t) segmap_usable_groups_202577 *
                         (size_t) segmap_group_sizze_202576};
            const size_t local_work_sizze_229809[1] =
                         {(size_t) segmap_group_sizze_202576};
            int64_t time_start_229806 = 0, time_end_229807 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_202582", global_work_sizze_229805[0],
                        local_work_sizze_229809[0], (int) 0);
                time_start_229806 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_202582,
                                                            1, NULL,
                                                            global_work_sizze_229805,
                                                            local_work_sizze_229809,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_202582_runs,
                                                                                                      &ctx->mainzisegmap_202582_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229807 = get_wall_time();
                
                long time_diff_229808 = time_end_229807 - time_start_229806;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_202582", time_diff_229808);
            }
        }
        ctx->failure_is_an_option = 1;
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_unref_device(ctx, &mem_222445, "mem_222445") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222449, "mem_222449") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222452, "mem_222452") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222455, "mem_222455") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222458, "mem_222458") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222469, &mem_222467,
                                "mem_222467") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222468, &mem_222463,
                                "mem_222463") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222467, "mem_222467") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222463, "mem_222463") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222458, "mem_222458") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222455, "mem_222455") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222452, "mem_222452") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222449, "mem_222449") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222445, "mem_222445") != 0)
            return 1;
    }
    
    int64_t min_res_197106 = smin64(n_196692, q_t_196696);
    bool bounds_invalid_upwards_197107 = slt64(t_n_m_196759, (int64_t) 0);
    bool valid_197108 = !bounds_invalid_upwards_197107;
    bool range_valid_c_197109;
    
    if (!valid_197108) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) t_n_m_196759, " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  loess.fut:442:3-469:10\n   #4  loess.fut:502:15-61\n   #5  stl.fut:157:13-60\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:155:5-158:26\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool loop_cond_197111 = slt64((int64_t) 1, min_res_197106);
    float i64_res_197112 = sitofp_i64_f32(q_t_196696);
    int64_t intra_avail_par_202780 = smin64(n_196692, t_n_m_196759);
    int64_t computed_group_sizze_202682 = smax64(n_196692, t_n_m_196759);
    bool fits_202786 = sle64(computed_group_sizze_202682,
                             max_group_sizze_199970);
    bool suff_intra_par_202784;
    
    suff_intra_par_202784 = *ctx->tuning_params.mainzisuff_intra_par_6 <=
        intra_avail_par_202780;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_intra_par_6",
                (long) intra_avail_par_202780,
                suff_intra_par_202784 ? "true" : "false");
    
    bool intra_suff_and_fits_202787 = suff_intra_par_202784 && fits_202786;
    int64_t segmap_group_sizze_203170;
    
    segmap_group_sizze_203170 =
        *ctx->tuning_params.mainzisegmap_group_sizze_203146;
    
    int64_t segmap_group_sizze_203180;
    
    segmap_group_sizze_203180 =
        *ctx->tuning_params.mainzisegmap_group_sizze_203120;
    
    int64_t nest_sizze_203201 = m_196691 * t_n_m_196759;
    int64_t segmap_group_sizze_203202;
    
    segmap_group_sizze_203202 =
        *ctx->tuning_params.mainzisegmap_group_sizze_202916;
    
    int64_t binop_y_222483 = (int64_t) 8 * nest_sizze_203201;
    int64_t bytes_222484 = smax64((int64_t) 0, binop_y_222483);
    int64_t binop_y_222487 = (int64_t) 4 * nest_sizze_203201;
    int64_t bytes_222488 = smax64((int64_t) 0, binop_y_222487);
    int64_t binop_y_222476 = (int64_t) 4 * t_n_m_196759;
    int64_t bytes_222477 = smax64((int64_t) 0, binop_y_222476);
    int64_t binop_y_222479 = (int64_t) 8 * t_n_m_196759;
    int64_t bytes_222480 = smax64((int64_t) 0, binop_y_222479);
    struct memblock_device ext_mem_222518;
    
    ext_mem_222518.references = NULL;
    
    struct memblock_device ext_mem_222517;
    
    ext_mem_222517.references = NULL;
    
    int32_t local_memory_capacity_225800;
    
    local_memory_capacity_225800 = ctx->opencl.max_local_memory;
    if (sle64(bytes_222480 + srem64((int64_t) 8 - srem64(bytes_222480,
                                                         (int64_t) 8),
                                    (int64_t) 8) + (bytes_222477 +
                                                    srem64((int64_t) 8 -
                                                           srem64(bytes_222477,
                                                                  (int64_t) 8),
                                                           (int64_t) 8)) +
              (bytes_222229 + srem64((int64_t) 8 - srem64(bytes_222229,
                                                          (int64_t) 8),
                                     (int64_t) 8)),
              sext_i32_i64(local_memory_capacity_225800)) &&
        intra_suff_and_fits_202787) {
        struct memblock_device mem_222485;
        
        mem_222485.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222485, bytes_222484,
                                  "mem_222485")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222489;
        
        mem_222489.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222489, bytes_222488,
                                  "mem_222489")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                1,
                                                sizeof(ctx->failure_is_an_option),
                                                &ctx->failure_is_an_option));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                3, (size_t) bytes_222229,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                4, (size_t) bytes_222477,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                5, (size_t) bytes_222480,
                                                NULL));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                6, sizeof(m_196691),
                                                &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                7, sizeof(n_196692),
                                                &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                8, sizeof(q_t_196696),
                                                &q_t_196696));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                9, sizeof(jump_t_196702),
                                                &jump_t_196702));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                10, sizeof(t_n_m_196759),
                                                &t_n_m_196759));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                11, sizeof(i_196779),
                                                &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                12, sizeof(x_196780),
                                                &x_196780));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                13, sizeof(min_res_197106),
                                                &min_res_197106));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                14, sizeof(loop_cond_197111),
                                                &loop_cond_197111));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                15, sizeof(i64_res_197112),
                                                &i64_res_197112));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                16,
                                                sizeof(computed_group_sizze_202682),
                                                &computed_group_sizze_202682));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                17, sizeof(ext_mem_222256.mem),
                                                &ext_mem_222256.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                18, sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                19, sizeof(mem_222485.mem),
                                                &mem_222485.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_202791,
                                                20, sizeof(mem_222489.mem),
                                                &mem_222489.mem));
        if (1 * ((size_t) m_196691 * (size_t) computed_group_sizze_202682) !=
            0) {
            const size_t global_work_sizze_229810[1] = {(size_t) m_196691 *
                         (size_t) computed_group_sizze_202682};
            const size_t local_work_sizze_229814[1] =
                         {(size_t) computed_group_sizze_202682};
            int64_t time_start_229811 = 0, time_end_229812 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_intragroup_202791",
                        global_work_sizze_229810[0], local_work_sizze_229814[0],
                        (int) (0 + bytes_222229 + bytes_222477 + bytes_222480));
                time_start_229811 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_intragroup_202791,
                                                            1, NULL,
                                                            global_work_sizze_229810,
                                                            local_work_sizze_229814,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_intragroup_202791_runs,
                                                                                                      &ctx->mainzisegmap_intragroup_202791_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229812 = get_wall_time();
                
                long time_diff_229813 = time_end_229812 - time_start_229811;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_intragroup_202791", time_diff_229813);
            }
        }
        ctx->failure_is_an_option = 1;
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_set_device(ctx, &ext_mem_222518, &mem_222485,
                                "mem_222485") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222517, &mem_222489,
                                "mem_222489") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222489, "mem_222489") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222485, "mem_222485") != 0)
            return 1;
    } else {
        int64_t segmap_usable_groups_203171 = sdiv_up64(nest_sizze_200083,
                                                        segmap_group_sizze_203170);
        struct memblock_device mem_222494;
        
        mem_222494.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222494, bytes_222237,
                                  "mem_222494")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203175, 1,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203175, 2,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203175, 3,
                                                sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203175, 4,
                                                sizeof(mem_222494.mem),
                                                &mem_222494.mem));
        if (1 * ((size_t) segmap_usable_groups_203171 *
                 (size_t) segmap_group_sizze_203170) != 0) {
            const size_t global_work_sizze_229815[1] =
                         {(size_t) segmap_usable_groups_203171 *
                         (size_t) segmap_group_sizze_203170};
            const size_t local_work_sizze_229819[1] =
                         {(size_t) segmap_group_sizze_203170};
            int64_t time_start_229816 = 0, time_end_229817 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_203175", global_work_sizze_229815[0],
                        local_work_sizze_229819[0], (int) 0);
                time_start_229816 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_203175,
                                                            1, NULL,
                                                            global_work_sizze_229815,
                                                            local_work_sizze_229819,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_203175_runs,
                                                                                                      &ctx->mainzisegmap_203175_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229817 = get_wall_time();
                
                long time_diff_229818 = time_end_229817 - time_start_229816;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_203175", time_diff_229818);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        
        int64_t segmap_usable_groups_203181 = sdiv_up64(m_196691,
                                                        segmap_group_sizze_203180);
        struct memblock_device mem_222498;
        
        mem_222498.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222498, bytes_222240,
                                  "mem_222498")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222501;
        
        mem_222501.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222501, bytes_222240,
                                  "mem_222501")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222504;
        
        mem_222504.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222504, bytes_222240,
                                  "mem_222504")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222507;
        
        mem_222507.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222507, bytes_222457,
                                  "mem_222507")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 1,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 2,
                                                sizeof(q_t_196696),
                                                &q_t_196696));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 3,
                                                sizeof(min_res_197106),
                                                &min_res_197106));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 4,
                                                sizeof(i64_res_197112),
                                                &i64_res_197112));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 5,
                                                sizeof(ext_mem_222256.mem),
                                                &ext_mem_222256.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 6,
                                                sizeof(mem_222498.mem),
                                                &mem_222498.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 7,
                                                sizeof(mem_222501.mem),
                                                &mem_222501.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 8,
                                                sizeof(mem_222504.mem),
                                                &mem_222504.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203187, 9,
                                                sizeof(mem_222507.mem),
                                                &mem_222507.mem));
        if (1 * ((size_t) segmap_usable_groups_203181 *
                 (size_t) segmap_group_sizze_203180) != 0) {
            const size_t global_work_sizze_229820[1] =
                         {(size_t) segmap_usable_groups_203181 *
                         (size_t) segmap_group_sizze_203180};
            const size_t local_work_sizze_229824[1] =
                         {(size_t) segmap_group_sizze_203180};
            int64_t time_start_229821 = 0, time_end_229822 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_203187", global_work_sizze_229820[0],
                        local_work_sizze_229824[0], (int) 0);
                time_start_229821 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_203187,
                                                            1, NULL,
                                                            global_work_sizze_229820,
                                                            local_work_sizze_229824,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_203187_runs,
                                                                                                      &ctx->mainzisegmap_203187_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229822 = get_wall_time();
                
                long time_diff_229823 = time_end_229822 - time_start_229821;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_203187", time_diff_229823);
            }
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        
        int64_t segmap_usable_groups_203203 = sdiv_up64(nest_sizze_203201,
                                                        segmap_group_sizze_203202);
        struct memblock_device mem_222512;
        
        mem_222512.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222512, bytes_222488,
                                  "mem_222512")) {
            err = 1;
            goto cleanup;
        }
        
        struct memblock_device mem_222516;
        
        mem_222516.references = NULL;
        if (memblock_alloc_device(ctx, &mem_222516, bytes_222484,
                                  "mem_222516")) {
            err = 1;
            goto cleanup;
        }
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "\n# SegMap");
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 1,
                                                sizeof(ctx->failure_is_an_option),
                                                &ctx->failure_is_an_option));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 3,
                                                sizeof(m_196691), &m_196691));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 4,
                                                sizeof(n_196692), &n_196692));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 5,
                                                sizeof(jump_t_196702),
                                                &jump_t_196702));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 6,
                                                sizeof(t_n_m_196759),
                                                &t_n_m_196759));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 7,
                                                sizeof(i_196779), &i_196779));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 8,
                                                sizeof(x_196780), &x_196780));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 9,
                                                sizeof(min_res_197106),
                                                &min_res_197106));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 10,
                                                sizeof(loop_cond_197111),
                                                &loop_cond_197111));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 11,
                                                sizeof(ext_mem_222257.mem),
                                                &ext_mem_222257.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 12,
                                                sizeof(mem_222494.mem),
                                                &mem_222494.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 13,
                                                sizeof(mem_222498.mem),
                                                &mem_222498.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 14,
                                                sizeof(mem_222501.mem),
                                                &mem_222501.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 15,
                                                sizeof(mem_222504.mem),
                                                &mem_222504.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 16,
                                                sizeof(mem_222507.mem),
                                                &mem_222507.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 17,
                                                sizeof(mem_222512.mem),
                                                &mem_222512.mem));
        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203208, 18,
                                                sizeof(mem_222516.mem),
                                                &mem_222516.mem));
        if (1 * ((size_t) segmap_usable_groups_203203 *
                 (size_t) segmap_group_sizze_203202) != 0) {
            const size_t global_work_sizze_229825[1] =
                         {(size_t) segmap_usable_groups_203203 *
                         (size_t) segmap_group_sizze_203202};
            const size_t local_work_sizze_229829[1] =
                         {(size_t) segmap_group_sizze_203202};
            int64_t time_start_229826 = 0, time_end_229827 = 0;
            
            if (ctx->debugging) {
                fprintf(ctx->log,
                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                        "main.segmap_203208", global_work_sizze_229825[0],
                        local_work_sizze_229829[0], (int) 0);
                time_start_229826 = get_wall_time();
            }
            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                            ctx->mainzisegmap_203208,
                                                            1, NULL,
                                                            global_work_sizze_229825,
                                                            local_work_sizze_229829,
                                                            0, NULL,
                                                            ctx->profiling_paused ||
                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                      &ctx->mainzisegmap_203208_runs,
                                                                                                      &ctx->mainzisegmap_203208_total_runtime)));
            if (ctx->debugging) {
                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                time_end_229827 = get_wall_time();
                
                long time_diff_229828 = time_end_229827 - time_start_229826;
                
                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                        "main.segmap_203208", time_diff_229828);
            }
        }
        ctx->failure_is_an_option = 1;
        if (ctx->debugging)
            fprintf(ctx->log, "%s\n", "");
        if (memblock_unref_device(ctx, &mem_222494, "mem_222494") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222498, "mem_222498") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222501, "mem_222501") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222504, "mem_222504") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222507, "mem_222507") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222518, &mem_222516,
                                "mem_222516") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_222517, &mem_222512,
                                "mem_222512") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222516, "mem_222516") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222512, "mem_222512") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222507, "mem_222507") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222504, "mem_222504") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222501, "mem_222501") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222498, "mem_222498") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222494, "mem_222494") != 0)
            return 1;
    }
    
    int64_t binop_y_222520 = (int64_t) 4 * nest_sizze_200083;
    int64_t bytes_222521 = smax64((int64_t) 0, binop_y_222520);
    struct memblock_device mem_222522;
    
    mem_222522.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222522, bytes_222521, "mem_222522")) {
        err = 1;
        goto cleanup;
    }
    if (futrts_builtinzhreplicate_f32(ctx, mem_222522, m_196691 * n_196692,
                                      0.0F) != 0) {
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    struct memblock_device mem_222526;
    
    mem_222526.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222526, bytes_222521, "mem_222526")) {
        err = 1;
        goto cleanup;
    }
    if (futrts_builtinzhreplicate_f32(ctx, mem_222526, m_196691 * n_196692,
                                      1.0F) != 0) {
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool cond_197220 = slt64((int64_t) 1, jump_l_196703);
    bool cond_197221 = slt64((int64_t) 1, jump_t_196702);
    int64_t y_197222 = sub64(n_outer_196705, (int64_t) 1);
    int64_t css_results_l_197223;
    
    if (cond_196744) {
        css_results_l_197223 = s_n_m_196745;
    } else {
        css_results_l_197223 = pad_css_len_196741;
    }
    
    bool zzero_197224 = n_p_196694 == (int64_t) 0;
    bool nonzzero_197225 = !zzero_197224;
    bool loop_not_taken_197226 = !assert_cond_196732;
    bool protect_assert_disj_197227 = nonzzero_197225 || loop_not_taken_197226;
    bool loop_not_taken_197228 = !assert_cond_196734;
    bool protect_assert_disj_197229 = protect_assert_disj_197227 ||
         loop_not_taken_197228;
    bool nonzzero_cert_197230;
    
    if (!protect_assert_disj_197229) {
        ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                               "division by zero",
                               "-> #0  stl.fut:226:51-57\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  stl.fut:226:28-74\n   #5  stl.fut:225:21-227:39\n   #6  stl.fut:401:3-415:29\n   #7  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t j_197231 = add64(n_196692, n_p_196694);
    bool empty_slice_197232 = n_196692 == (int64_t) 0;
    int64_t i_p_m_t_s_197233 = add64(n_p_196694, i_196779);
    bool zzero_leq_i_p_m_t_s_197234 = sle64((int64_t) 0, i_p_m_t_s_197233);
    bool i_p_m_t_s_leq_w_197235 = slt64(i_p_m_t_s_197233, C_len_196743);
    bool zzero_lte_i_197236 = sle64((int64_t) 0, n_p_196694);
    bool i_lte_j_197237 = sle64(n_p_196694, j_197231);
    bool y_197238 = i_p_m_t_s_leq_w_197235 && zzero_lte_i_197236;
    bool y_197239 = zzero_leq_i_p_m_t_s_197234 && y_197238;
    bool y_197240 = i_lte_j_197237 && y_197239;
    bool forwards_ok_197241 = zzero_lte_i_197236 && y_197240;
    bool ok_or_empty_197242 = empty_slice_197232 || forwards_ok_197241;
    bool protect_assert_disj_197243 = loop_not_taken_197226 ||
         ok_or_empty_197242;
    bool protect_assert_disj_197244 = loop_not_taken_197228 ||
         protect_assert_disj_197243;
    bool index_certs_197245;
    
    if (!protect_assert_disj_197244) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [", (long long) n_p_196694, ":",
                               (long long) j_197231,
                               "] out of bounds for array of shape [",
                               (long long) C_len_196743, "].",
                               "-> #0  stl.fut:262:35-50\n   #1  /prelude/soacs.fut:67:19-23\n   #2  /prelude/soacs.fut:67:3-37\n   #3  stl.fut:260:13-265:26\n   #4  stl.fut:401:3-415:29\n   #5  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t j_m_i_197246 = sub64(stl_res_196774, stl_res_196773);
    int64_t lifted_single_ma_l_arg_197247 = add64((int64_t) 1, j_197231);
    int64_t m_197248 = sub64(n_p_196694, (int64_t) 1);
    bool zzero_leq_i_p_m_t_s_197249 = sle64((int64_t) 0, m_197248);
    bool i_p_m_t_s_leq_w_197250 = slt64(m_197248, C_len_196743);
    bool y_197251 = zzero_leq_i_p_m_t_s_197249 && i_p_m_t_s_leq_w_197250;
    bool y_197252 = zzero_lte_i_197236 && y_197251;
    bool ok_or_empty_197253 = zzero_197224 || y_197252;
    bool protect_assert_disj_197254 = loop_not_taken_197226 ||
         ok_or_empty_197253;
    bool protect_assert_disj_197255 = loop_not_taken_197228 ||
         protect_assert_disj_197254;
    bool index_certs_197256;
    
    if (!protect_assert_disj_197255) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [:", (long long) n_p_196694,
                               "] out of bounds for array of shape [",
                               (long long) C_len_196743, "].",
                               "-> #0  stl.fut:24:37-43\n   #1  stl.fut:24:20-48\n   #2  stl.fut:38:3-36\n   #3  stl.fut:231:23-47\n   #4  stl.fut:401:3-415:29\n   #5  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t dyn_lifted_single_ma_l_arg_197257 = add64((int64_t) 2, n_196692);
    bool i_p_m_t_s_leq_w_197258 = slt64(m_197248,
                                        lifted_single_ma_l_arg_197247);
    bool y_197259 = zzero_leq_i_p_m_t_s_197249 && i_p_m_t_s_leq_w_197258;
    bool y_197260 = zzero_lte_i_197236 && y_197259;
    bool ok_or_empty_197261 = zzero_197224 || y_197260;
    bool protect_assert_disj_197262 = loop_not_taken_197226 ||
         ok_or_empty_197261;
    bool protect_assert_disj_197263 = loop_not_taken_197228 ||
         protect_assert_disj_197262;
    bool index_certs_197264;
    
    if (!protect_assert_disj_197263) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [:", (long long) n_p_196694,
                               "] out of bounds for array of shape [",
                               (long long) lifted_single_ma_l_arg_197247, "].",
                               "-> #0  stl.fut:24:37-43\n   #1  stl.fut:24:20-48\n   #2  /prelude/functional.fut:9:42-44\n   #3  stl.fut:38:3-64\n   #4  stl.fut:231:23-47\n   #5  stl.fut:401:3-415:29\n   #6  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool i_p_m_t_s_leq_w_197265 = slt64((int64_t) 2,
                                        dyn_lifted_single_ma_l_arg_197257);
    bool protect_assert_disj_197266 = loop_not_taken_197226 ||
         i_p_m_t_s_leq_w_197265;
    bool protect_assert_disj_197267 = loop_not_taken_197228 ||
         protect_assert_disj_197266;
    bool index_certs_197268;
    
    if (!protect_assert_disj_197267) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Index [:", (long long) (int64_t) 3,
                               "] out of bounds for array of shape [",
                               (long long) dyn_lifted_single_ma_l_arg_197257,
                               "].",
                               "-> #0  stl.fut:24:37-43\n   #1  stl.fut:24:20-48\n   #2  /prelude/functional.fut:9:42-44\n   #3  stl.fut:38:3-84\n   #4  stl.fut:231:23-47\n   #5  stl.fut:401:3-415:29\n   #6  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool cond_197269 = slt64(jump_l_196703, jump_threshold_196706);
    bool cond_f_res_197270 = slt64(q_threshold_196707, q_l_196697);
    bool x_197271 = !cond_197269;
    bool y_197272 = cond_f_res_197270 && x_197271;
    bool cond_197273 = cond_197269 || y_197272;
    bool cond_197274 = slt64(jump_t_196702, jump_threshold_196706);
    bool cond_f_res_197275 = slt64(q_threshold_196707, q_t_196696);
    bool x_197276 = !cond_197274;
    bool y_197277 = cond_f_res_197275 && x_197276;
    bool cond_197278 = cond_197274 || y_197277;
    bool cond_197279 = slt64(jump_s_196701, jump_threshold_196706);
    bool cond_f_res_197280 = slt64(q_threshold_196707, q_s_196695);
    bool x_197281 = !cond_197279;
    bool y_197282 = cond_f_res_197280 && x_197281;
    bool cond_197283 = cond_197279 || y_197282;
    bool bounds_invalid_upwards_197284 = slt64(C_len_196743, (int64_t) 0);
    bool valid_197285 = !bounds_invalid_upwards_197284;
    bool protect_assert_disj_197286 = loop_not_taken_197226 || valid_197285;
    bool protect_assert_disj_197287 = loop_not_taken_197228 ||
         protect_assert_disj_197286;
    bool range_valid_c_197288;
    
    if (!protect_assert_disj_197287) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) C_len_196743, " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  stl.fut:226:28-74\n   #4  stl.fut:225:21-227:39\n   #5  stl.fut:401:3-415:29\n   #6  stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool bounds_invalid_upwards_197290 = slt64(lifted_single_ma_l_arg_197247,
                                               (int64_t) 0);
    bool valid_197291 = !bounds_invalid_upwards_197290;
    bool protect_assert_disj_197292 = loop_not_taken_197226 || valid_197291;
    bool protect_assert_disj_197293 = loop_not_taken_197228 ||
         protect_assert_disj_197292;
    bool range_valid_c_197294;
    
    if (!protect_assert_disj_197293) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) lifted_single_ma_l_arg_197247,
                               " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  stl.fut:27:13-33:19\n   #4  /prelude/soacs.fut:67:19-23\n   #5  /prelude/soacs.fut:67:3-37\n   #6  stl.fut:26:5-34:23\n   #7  stl.fut:38:3-36\n   #8  stl.fut:231:23-47\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    bool bounds_invalid_upwards_197296 =
         slt64(dyn_lifted_single_ma_l_arg_197257, (int64_t) 0);
    bool valid_197297 = !bounds_invalid_upwards_197296;
    bool protect_assert_disj_197298 = loop_not_taken_197226 || valid_197297;
    bool protect_assert_disj_197299 = loop_not_taken_197228 ||
         protect_assert_disj_197298;
    bool range_valid_c_197300;
    
    if (!protect_assert_disj_197299) {
        ctx->error = msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                               "Range ", (long long) (int64_t) 0, "..",
                               (long long) (int64_t) 1, "..<",
                               (long long) dyn_lifted_single_ma_l_arg_197257,
                               " is invalid.",
                               "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  stl.fut:27:13-33:19\n   #4  /prelude/soacs.fut:67:19-23\n   #5  /prelude/soacs.fut:67:3-37\n   #6  stl.fut:26:5-34:23\n   #7  /prelude/functional.fut:9:42-44\n   #8  stl.fut:38:3-64\n   #9  stl.fut:231:23-47\n   #10 stl.fut:401:3-415:29\n   #11 stl.fut:385:1-415:29\n");
        if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
            return 1;
        err = 1;
        goto cleanup;
    }
    
    int64_t segmap_group_sizze_203345;
    
    segmap_group_sizze_203345 =
        *ctx->tuning_params.mainzisegmap_group_sizze_203319;
    
    int64_t segmap_usable_groups_203346 = sdiv_up_safe64(nest_sizze_200083,
                                                         segmap_group_sizze_203345);
    int64_t segmap_group_sizze_203488;
    
    segmap_group_sizze_203488 =
        *ctx->tuning_params.mainzisegmap_group_sizze_203382;
    
    int64_t segmap_usable_groups_203489 = sdiv_up_safe64(nest_sizze_200246,
                                                         segmap_group_sizze_203488);
    int64_t nest_sizze_211639 = m_196691 * C_len_196743;
    int64_t segmap_group_sizze_211640;
    
    segmap_group_sizze_211640 =
        *ctx->tuning_params.mainzisegmap_group_sizze_211594;
    
    int64_t segmap_usable_groups_211641 = sdiv_up_safe64(nest_sizze_211639,
                                                         segmap_group_sizze_211640);
    bool suff_outer_par_211661;
    
    suff_outer_par_211661 = *ctx->tuning_params.mainzisuff_outer_par_19 <=
        m_196691;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_outer_par_19",
                (long) m_196691, suff_outer_par_211661 ? "true" : "false");
    
    int64_t segmap_group_sizze_211677;
    
    segmap_group_sizze_211677 =
        *ctx->tuning_params.mainzisegmap_group_sizze_211665;
    
    int64_t segred_group_sizze_211708;
    
    segred_group_sizze_211708 =
        *ctx->tuning_params.mainzisegred_group_sizze_211691;
    
    int64_t num_groups_211709;
    int32_t max_num_groups_225813;
    
    max_num_groups_225813 = *ctx->tuning_params.mainzisegred_num_groups_211693;
    num_groups_211709 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(binop_x_222259,
                                                             segred_group_sizze_211708),
                                                   sext_i32_i64(max_num_groups_225813))));
    
    int64_t nest_sizze_211759 = m_196691 * lifted_single_ma_l_arg_197247;
    int64_t segscan_group_sizze_211760;
    
    segscan_group_sizze_211760 =
        *ctx->tuning_params.mainzisegscan_group_sizze_211724;
    
    int64_t num_groups_211761;
    int32_t max_num_groups_225814;
    
    max_num_groups_225814 = *ctx->tuning_params.mainzisegscan_num_groups_211726;
    num_groups_211761 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(nest_sizze_211759,
                                                             segscan_group_sizze_211760),
                                                   sext_i32_i64(max_num_groups_225814))));
    
    bool suff_outer_par_211792;
    
    suff_outer_par_211792 = *ctx->tuning_params.mainzisuff_outer_par_20 <=
        m_196691;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_outer_par_20",
                (long) m_196691, suff_outer_par_211792 ? "true" : "false");
    
    int64_t segmap_group_sizze_211808;
    
    segmap_group_sizze_211808 =
        *ctx->tuning_params.mainzisegmap_group_sizze_211796;
    
    int64_t segred_group_sizze_211839;
    
    segred_group_sizze_211839 =
        *ctx->tuning_params.mainzisegred_group_sizze_211822;
    
    int64_t num_groups_211840;
    int32_t max_num_groups_225815;
    
    max_num_groups_225815 = *ctx->tuning_params.mainzisegred_num_groups_211824;
    num_groups_211840 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(binop_x_222259,
                                                             segred_group_sizze_211839),
                                                   sext_i32_i64(max_num_groups_225815))));
    
    int64_t nest_sizze_211890 = m_196691 * dyn_lifted_single_ma_l_arg_197257;
    int64_t segscan_group_sizze_211891;
    
    segscan_group_sizze_211891 =
        *ctx->tuning_params.mainzisegscan_group_sizze_211855;
    
    int64_t num_groups_211892;
    int32_t max_num_groups_225816;
    
    max_num_groups_225816 = *ctx->tuning_params.mainzisegscan_num_groups_211857;
    num_groups_211892 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(nest_sizze_211890,
                                                             segscan_group_sizze_211891),
                                                   sext_i32_i64(max_num_groups_225816))));
    
    bool suff_outer_par_211923;
    
    suff_outer_par_211923 = *ctx->tuning_params.mainzisuff_outer_par_21 <=
        m_196691;
    if (ctx->logging)
        fprintf(ctx->log, "Compared %s <= %ld: %s.\n", "main.suff_outer_par_21",
                (long) m_196691, suff_outer_par_211923 ? "true" : "false");
    
    int64_t segmap_group_sizze_211939;
    
    segmap_group_sizze_211939 =
        *ctx->tuning_params.mainzisegmap_group_sizze_211927;
    
    int64_t nest_sizze_211969 = (int64_t) 3 * m_196691;
    int64_t segred_group_sizze_211970;
    
    segred_group_sizze_211970 =
        *ctx->tuning_params.mainzisegred_group_sizze_211953;
    
    int64_t num_groups_211971;
    int32_t max_num_groups_225817;
    
    max_num_groups_225817 = *ctx->tuning_params.mainzisegred_num_groups_211955;
    num_groups_211971 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(nest_sizze_211969,
                                                             segred_group_sizze_211970),
                                                   sext_i32_i64(max_num_groups_225817))));
    
    int64_t segscan_group_sizze_212022;
    
    segscan_group_sizze_212022 =
        *ctx->tuning_params.mainzisegscan_group_sizze_211986;
    
    int64_t num_groups_212023;
    int32_t max_num_groups_225818;
    
    max_num_groups_225818 = *ctx->tuning_params.mainzisegscan_num_groups_211988;
    num_groups_212023 = sext_i64_i32(smax64((int64_t) 1,
                                            smin64(sdiv_up64(nest_sizze_200083,
                                                             segscan_group_sizze_212022),
                                                   sext_i32_i64(max_num_groups_225818))));
    
    int64_t segmap_group_sizze_215522;
    
    segmap_group_sizze_215522 =
        *ctx->tuning_params.mainzisegmap_group_sizze_215496;
    
    int64_t segmap_usable_groups_215523 = sdiv_up_safe64(nest_sizze_200083,
                                                         segmap_group_sizze_215522);
    int64_t segmap_usable_groups_211678 = sdiv_up_safe64(m_196691,
                                                         segmap_group_sizze_211677);
    int64_t segmap_usable_groups_211809 = sdiv_up_safe64(m_196691,
                                                         segmap_group_sizze_211808);
    int64_t segmap_usable_groups_211940 = sdiv_up_safe64(m_196691,
                                                         segmap_group_sizze_211939);
    struct memblock_device mem_222577;
    
    mem_222577.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222577, bytes_222521, "mem_222577")) {
        err = 1;
        goto cleanup;
    }
    
    struct memblock_device mem_222583;
    
    mem_222583.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222583, bytes_222262, "mem_222583")) {
        err = 1;
        goto cleanup;
    }
    
    struct memblock_device mem_222588;
    
    mem_222588.references = NULL;
    if (memblock_alloc_device(ctx, &mem_222588, bytes_222262, "mem_222588")) {
        err = 1;
        goto cleanup;
    }
    
    int64_t binop_x_223547 = pad_css_len_196741 * binop_x_222259;
    int64_t binop_y_223548 = (int64_t) 4 * binop_x_223547;
    int64_t bytes_223549 = smax64((int64_t) 0, binop_y_223548);
    int64_t binop_y_223555 = (int64_t) 4 * nest_sizze_211639;
    int64_t bytes_223556 = smax64((int64_t) 0, binop_y_223555);
    struct memblock_device mem_223557;
    
    mem_223557.references = NULL;
    if (memblock_alloc_device(ctx, &mem_223557, bytes_223556, "mem_223557")) {
        err = 1;
        goto cleanup;
    }
    
    int64_t binop_y_223572 = (int64_t) 4 * nest_sizze_211759;
    int64_t bytes_223573 = smax64((int64_t) 0, binop_y_223572);
    struct memblock_device mem_223574;
    
    mem_223574.references = NULL;
    if (memblock_alloc_device(ctx, &mem_223574, bytes_223573, "mem_223574")) {
        err = 1;
        goto cleanup;
    }
    
    int64_t binop_y_223589 = (int64_t) 4 * nest_sizze_211890;
    int64_t bytes_223590 = smax64((int64_t) 0, binop_y_223589);
    struct memblock_device mem_223591;
    
    mem_223591.references = NULL;
    if (memblock_alloc_device(ctx, &mem_223591, bytes_223590, "mem_223591")) {
        err = 1;
        goto cleanup;
    }
    
    struct memblock_device mem_223608;
    
    mem_223608.references = NULL;
    if (memblock_alloc_device(ctx, &mem_223608, bytes_222521, "mem_223608")) {
        err = 1;
        goto cleanup;
    }
    
    int64_t ext_223972;
    
    if (cond_197220) {
        ext_223972 = n_196692;
    } else {
        ext_223972 = l_n_m_196752;
    }
    
    int64_t ext_224578;
    
    if (cond_197221) {
        ext_224578 = n_196692;
    } else {
        ext_224578 = t_n_m_196759;
    }
    
    int64_t ext_224941;
    int64_t ext_224939;
    int64_t ext_224935;
    int64_t ext_224934;
    int64_t ext_224933;
    int64_t ext_224932;
    int64_t ext_224931;
    int64_t ext_224930;
    int64_t ext_224929;
    struct memblock_device ext_mem_224928;
    
    ext_mem_224928.references = NULL;
    
    struct memblock_device ext_mem_224927;
    
    ext_mem_224927.references = NULL;
    
    struct memblock_device ext_mem_224926;
    
    ext_mem_224926.references = NULL;
    
    struct memblock_device mem_param_222534;
    
    mem_param_222534.references = NULL;
    
    int64_t ctx_param_ext_222536;
    int64_t ctx_param_ext_222538;
    struct memblock_device mem_param_222542;
    
    mem_param_222542.references = NULL;
    
    int64_t ctx_param_ext_222543;
    int64_t ctx_param_ext_222544;
    int64_t ctx_param_ext_222545;
    int64_t ctx_param_ext_222546;
    int64_t ctx_param_ext_222547;
    int64_t ctx_param_ext_222548;
    int64_t ctx_param_ext_222549;
    struct memblock_device mem_param_222550;
    
    mem_param_222550.references = NULL;
    ctx_param_ext_222536 = n_196692;
    ctx_param_ext_222538 = n_196692;
    ctx_param_ext_222543 = m_196691;
    ctx_param_ext_222544 = n_196692;
    ctx_param_ext_222545 = (int64_t) 0;
    ctx_param_ext_222546 = n_196692;
    ctx_param_ext_222547 = m_196691;
    ctx_param_ext_222548 = (int64_t) 1;
    ctx_param_ext_222549 = n_196692;
    if (memblock_set_device(ctx, &mem_param_222534, &mem_222522,
                            "mem_222522") != 0)
        return 1;
    if (memblock_set_device(ctx, &mem_param_222542, &mem_222522,
                            "mem_222522") != 0)
        return 1;
    if (memblock_set_device(ctx, &mem_param_222550, &mem_222526,
                            "mem_222526") != 0)
        return 1;
    for (int64_t i_outer_197305 = 0; i_outer_197305 < n_outer_196705;
         i_outer_197305++) {
        int64_t ext_224590;
        int64_t ext_224588;
        struct memblock_device ext_mem_224584;
        
        ext_mem_224584.references = NULL;
        
        struct memblock_device ext_mem_224583;
        
        ext_mem_224583.references = NULL;
        
        struct memblock_device mem_param_222564;
        
        mem_param_222564.references = NULL;
        
        int64_t ctx_param_ext_222566;
        int64_t ctx_param_ext_222568;
        struct memblock_device mem_param_222572;
        
        mem_param_222572.references = NULL;
        ctx_param_ext_222566 = ctx_param_ext_222536;
        ctx_param_ext_222568 = ctx_param_ext_222538;
        if (memblock_set_device(ctx, &mem_param_222564, &mem_param_222534,
                                "mem_param_222534") != 0)
            return 1;
        if (memblock_set_device(ctx, &mem_param_222572, &mem_param_222542,
                                "mem_param_222542") != 0)
            return 1;
        for (int64_t _i_inner_197311 = 0; _i_inner_197311 < n_inner_196704;
             _i_inner_197311++) {
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 2,
                                                    sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 3,
                                                    sizeof(ctx_param_ext_222568),
                                                    &ctx_param_ext_222568));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 4,
                                                    sizeof(Y_mem_222225.mem),
                                                    &Y_mem_222225.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 5,
                                                    sizeof(mem_param_222572.mem),
                                                    &mem_param_222572.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203350, 6,
                                                    sizeof(mem_222577.mem),
                                                    &mem_222577.mem));
            if (1 * ((size_t) segmap_usable_groups_203346 *
                     (size_t) segmap_group_sizze_203345) != 0) {
                const size_t global_work_sizze_229830[1] =
                             {(size_t) segmap_usable_groups_203346 *
                             (size_t) segmap_group_sizze_203345};
                const size_t local_work_sizze_229834[1] =
                             {(size_t) segmap_group_sizze_203345};
                int64_t time_start_229831 = 0, time_end_229832 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_203350", global_work_sizze_229830[0],
                            local_work_sizze_229834[0], (int) 0);
                    time_start_229831 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_203350,
                                                                1, NULL,
                                                                global_work_sizze_229830,
                                                                local_work_sizze_229834,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_203350_runs,
                                                                                                          &ctx->mainzisegmap_203350_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229832 = get_wall_time();
                    
                    long time_diff_229833 = time_end_229832 - time_start_229831;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_203350", time_diff_229833);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 1,
                                                    sizeof(ctx->failure_is_an_option),
                                                    &ctx->failure_is_an_option));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 3,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 4,
                                                    sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 5,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 6,
                                                    sizeof(defunc_0_f_res_196740),
                                                    &defunc_0_f_res_196740));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 7,
                                                    sizeof(i_196779),
                                                    &i_196779));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 8,
                                                    sizeof(ctx_param_ext_222545),
                                                    &ctx_param_ext_222545));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495, 9,
                                                    sizeof(ctx_param_ext_222546),
                                                    &ctx_param_ext_222546));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    10,
                                                    sizeof(ctx_param_ext_222548),
                                                    &ctx_param_ext_222548));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    11,
                                                    sizeof(ext_mem_222322.mem),
                                                    &ext_mem_222322.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    12,
                                                    sizeof(mem_param_222550.mem),
                                                    &mem_param_222550.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    13, sizeof(mem_222577.mem),
                                                    &mem_222577.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    14, sizeof(mem_222583.mem),
                                                    &mem_222583.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203495,
                                                    15, sizeof(mem_222588.mem),
                                                    &mem_222588.mem));
            if (1 * ((size_t) segmap_usable_groups_203489 *
                     (size_t) segmap_group_sizze_203488) != 0) {
                const size_t global_work_sizze_229835[1] =
                             {(size_t) segmap_usable_groups_203489 *
                             (size_t) segmap_group_sizze_203488};
                const size_t local_work_sizze_229839[1] =
                             {(size_t) segmap_group_sizze_203488};
                int64_t time_start_229836 = 0, time_end_229837 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_203495", global_work_sizze_229835[0],
                            local_work_sizze_229839[0], (int) 0);
                    time_start_229836 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_203495,
                                                                1, NULL,
                                                                global_work_sizze_229835,
                                                                local_work_sizze_229839,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_203495_runs,
                                                                                                          &ctx->mainzisegmap_203495_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_229837 = get_wall_time();
                    
                    long time_diff_229838 = time_end_229837 - time_start_229836;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_203495", time_diff_229838);
                }
            }
            ctx->failure_is_an_option = 1;
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            
            struct memblock_device ext_mem_223544;
            
            ext_mem_223544.references = NULL;
            
            struct memblock_device ext_mem_223543;
            
            ext_mem_223543.references = NULL;
            if (cond_197283) {
                bool match_lit_197353 = (int64_t) 0 == d_s_196698;
                struct memblock_device ext_mem_223477;
                
                ext_mem_223477.references = NULL;
                
                struct memblock_device ext_mem_223476;
                
                ext_mem_223476.references = NULL;
                if (match_lit_197353) {
                    struct memblock_device mem_222593;
                    
                    mem_222593.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_222593, bytes_222359,
                                              "mem_222593")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_222593,
                                                      m_196691 * n_p_196694 *
                                                      s_n_m_196745, 0.0F) !=
                        0) {
                        if (memblock_unref_device(ctx, &mem_222593,
                                                  "mem_222593") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223476,
                                                  "ext_mem_223476") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223477,
                                                  "ext_mem_223477") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    bool suff_outer_par_203520;
                    
                    suff_outer_par_203520 =
                        *ctx->tuning_params.mainzisuff_outer_par_7 <= m_196691;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_7", (long) m_196691,
                                suff_outer_par_203520 ? "true" : "false");
                    
                    int64_t segmap_group_sizze_203620;
                    
                    segmap_group_sizze_203620 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_203524;
                    
                    int64_t num_groups_203621;
                    int32_t max_num_groups_225862;
                    
                    max_num_groups_225862 =
                        *ctx->tuning_params.mainzisegmap_num_groups_203526;
                    num_groups_203621 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(m_196691,
                                                                             segmap_group_sizze_203620),
                                                                   sext_i32_i64(max_num_groups_225862))));
                    
                    int64_t segmap_group_sizze_204744;
                    
                    segmap_group_sizze_204744 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_203719;
                    
                    int64_t num_groups_204745;
                    int32_t max_num_groups_225863;
                    
                    max_num_groups_225863 =
                        *ctx->tuning_params.mainzisegmap_num_groups_203721;
                    num_groups_204745 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(binop_x_222259,
                                                                             segmap_group_sizze_204744),
                                                                   sext_i32_i64(max_num_groups_225863))));
                    
                    bool suff_outer_par_204749;
                    
                    suff_outer_par_204749 =
                        *ctx->tuning_params.mainzisuff_outer_par_8 <=
                        binop_x_222259;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_8", (long) binop_x_222259,
                                suff_outer_par_204749 ? "true" : "false");
                    
                    int64_t one_intra_par_min_204750 = q_s_196695 *
                            s_n_m_196745;
                    int64_t intra_avail_par_204752 = smin64(s_n_m_196745,
                                                            one_intra_par_min_204750);
                    int64_t computed_group_sizze_204753 = smax64(s_n_m_196745,
                                                                 one_intra_par_min_204750);
                    bool fits_204757 = sle64(computed_group_sizze_204753,
                                             max_group_sizze_199970);
                    bool suff_intra_par_204759;
                    
                    suff_intra_par_204759 =
                        *ctx->tuning_params.mainzisuff_intra_par_9 <=
                        intra_avail_par_204752;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_intra_par_9",
                                (long) intra_avail_par_204752,
                                suff_intra_par_204759 ? "true" : "false");
                    
                    bool intra_suff_and_fits_204760 = fits_204757 &&
                         suff_intra_par_204759;
                    int64_t segmap_group_sizze_204962;
                    
                    segmap_group_sizze_204962 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_204054;
                    
                    bool suff_outer_par_204967;
                    
                    suff_outer_par_204967 =
                        *ctx->tuning_params.mainzisuff_outer_par_10 <=
                        nest_sizze_201931;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_10",
                                (long) nest_sizze_201931,
                                suff_outer_par_204967 ? "true" : "false");
                    
                    int64_t segmap_group_sizze_205055;
                    
                    segmap_group_sizze_205055 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_204315;
                    
                    int64_t nest_sizze_205077 = q_s_196695 * nest_sizze_201931;
                    int64_t segred_group_sizze_205078;
                    
                    segred_group_sizze_205078 =
                        *ctx->tuning_params.mainzisegred_group_sizze_204259;
                    
                    int64_t num_groups_205079;
                    int32_t max_num_groups_225864;
                    
                    max_num_groups_225864 =
                        *ctx->tuning_params.mainzisegred_num_groups_204261;
                    num_groups_205079 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_205077,
                                                                             segred_group_sizze_205078),
                                                                   sext_i32_i64(max_num_groups_225864))));
                    
                    int64_t segmap_group_sizze_205127;
                    
                    segmap_group_sizze_205127 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_204229;
                    
                    int64_t segred_group_sizze_205152;
                    
                    segred_group_sizze_205152 =
                        *ctx->tuning_params.mainzisegred_group_sizze_204157;
                    
                    int64_t num_groups_205153;
                    int32_t max_num_groups_225865;
                    
                    max_num_groups_225865 =
                        *ctx->tuning_params.mainzisegred_num_groups_204159;
                    num_groups_205153 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_205077,
                                                                             segred_group_sizze_205152),
                                                                   sext_i32_i64(max_num_groups_225865))));
                    
                    int64_t bytes_222596 = (int64_t) 4 * nest_sizze_201931;
                    int64_t bytes_222603 = (int64_t) 4 * nest_sizze_200246;
                    int64_t bytes_222607 = (int64_t) 8 * nest_sizze_201931;
                    int64_t bytes_222615 = (int64_t) 8 * nest_sizze_200246;
                    int64_t binop_x_222666 = m_196691 * s_n_m_196745;
                    int64_t binop_x_222667 = n_p_196694 * binop_x_222666;
                    int64_t bytes_222668 = (int64_t) 8 * binop_x_222667;
                    int64_t bytes_222672 = (int64_t) 4 * binop_x_222667;
                    int64_t binop_x_222674 = m_196691 * defunc_0_f_res_196740;
                    int64_t binop_x_222675 = n_p_196694 * binop_x_222674;
                    int64_t bytes_222676 = (int64_t) 8 * binop_x_222675;
                    int64_t bytes_222680 = (int64_t) 4 * binop_x_222675;
                    int64_t bytes_222711 = smax64((int64_t) 0, s_n_m_196745);
                    int64_t bytes_222747 = smax64((int64_t) 0, binop_x_222352);
                    int64_t num_threads_225153 = segmap_group_sizze_203620 *
                            num_groups_203621;
                    int64_t total_sizze_225154 = bytes_222345 *
                            num_threads_225153;
                    int64_t num_threads_225155 = segmap_group_sizze_204744 *
                            num_groups_204745;
                    int64_t total_sizze_225156 = bytes_222368 *
                            num_threads_225155;
                    struct memblock_device ext_mem_222787;
                    
                    ext_mem_222787.references = NULL;
                    
                    int32_t local_memory_capacity_226151;
                    
                    local_memory_capacity_226151 = ctx->opencl.max_local_memory;
                    if (sle64((int64_t) 0,
                              sext_i32_i64(local_memory_capacity_226151)) &&
                        suff_outer_par_203520) {
                        struct memblock_device mem_222597;
                        
                        mem_222597.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222597,
                                                  bytes_222596, "mem_222597")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_222597,
                                                                  (int64_t) 0,
                                                                  ext_mem_222419,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694 *
                                                                  s_n_m_196745,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222600;
                        
                        mem_222600.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222600,
                                                  binop_y_222281,
                                                  "mem_222600")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_222600,
                                                                  (int64_t) 0,
                                                                  ext_mem_222321,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222604;
                        
                        mem_222604.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222604,
                                                  bytes_222603, "mem_222604")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_222604,
                                                                  (int64_t) 0,
                                                                  mem_222588,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694 *
                                                                  defunc_0_f_res_196740,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222604,
                                                      "mem_222604") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222608;
                        
                        mem_222608.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222608,
                                                  bytes_222607, "mem_222608")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_222608,
                                                                  (int64_t) 0,
                                                                  ext_mem_222420,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694 *
                                                                  s_n_m_196745,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222608,
                                                      "mem_222608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222604,
                                                      "mem_222604") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222612;
                        
                        mem_222612.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222612,
                                                  bytes_222603, "mem_222612")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_222612,
                                                                  (int64_t) 0,
                                                                  mem_222583,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694 *
                                                                  defunc_0_f_res_196740,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222612,
                                                      "mem_222612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222608,
                                                      "mem_222608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222604,
                                                      "mem_222604") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222616;
                        
                        mem_222616.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222616,
                                                  bytes_222615, "mem_222616")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_222616,
                                                                  (int64_t) 0,
                                                                  ext_mem_222322,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_p_196694 *
                                                                  defunc_0_f_res_196740,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222616,
                                                      "mem_222616") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222612,
                                                      "mem_222612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222608,
                                                      "mem_222608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222604,
                                                      "mem_222604") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_222665;
                        
                        mem_222665.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222665,
                                                  bytes_222596, "mem_222665")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device color_225033;
                        
                        color_225033.references = NULL;
                        if (memblock_alloc_device(ctx, &color_225033,
                                                  total_sizze_225154,
                                                  "color_225033")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                1,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                2,
                                                                sizeof(n_p_196694),
                                                                &n_p_196694));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                3,
                                                                sizeof(q_s_196695),
                                                                &q_s_196695));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                4,
                                                                sizeof(jump_s_196701),
                                                                &jump_s_196701));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                5,
                                                                sizeof(defunc_0_f_res_196740),
                                                                &defunc_0_f_res_196740));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                6,
                                                                sizeof(pad_css_len_196741),
                                                                &pad_css_len_196741));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                7,
                                                                sizeof(s_n_m_196745),
                                                                &s_n_m_196745));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                8,
                                                                sizeof(num_groups_203621),
                                                                &num_groups_203621));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                9,
                                                                sizeof(num_threads_225153),
                                                                &num_threads_225153));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                10,
                                                                sizeof(mem_222597.mem),
                                                                &mem_222597.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                11,
                                                                sizeof(mem_222600.mem),
                                                                &mem_222600.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                12,
                                                                sizeof(mem_222604.mem),
                                                                &mem_222604.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                13,
                                                                sizeof(mem_222608.mem),
                                                                &mem_222608.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                14,
                                                                sizeof(mem_222612.mem),
                                                                &mem_222612.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                15,
                                                                sizeof(mem_222616.mem),
                                                                &mem_222616.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                16,
                                                                sizeof(mem_222665.mem),
                                                                &mem_222665.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_203625,
                                                                17,
                                                                sizeof(color_225033.mem),
                                                                &color_225033.mem));
                        if (1 * ((size_t) num_groups_203621 *
                                 (size_t) segmap_group_sizze_203620) != 0) {
                            const size_t global_work_sizze_229840[1] =
                                         {(size_t) num_groups_203621 *
                                         (size_t) segmap_group_sizze_203620};
                            const size_t local_work_sizze_229844[1] =
                                         {(size_t) segmap_group_sizze_203620};
                            int64_t time_start_229841 = 0, time_end_229842 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_203625",
                                        global_work_sizze_229840[0],
                                        local_work_sizze_229844[0], (int) 0);
                                time_start_229841 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_203625,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_229840,
                                                                            local_work_sizze_229844,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_203625_runs,
                                                                                                                      &ctx->mainzisegmap_203625_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_229842 = get_wall_time();
                                
                                long time_diff_229843 = time_end_229842 -
                                     time_start_229841;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_203625", time_diff_229843);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_222597,
                                                  "mem_222597") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222600,
                                                  "mem_222600") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222604,
                                                  "mem_222604") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222608,
                                                  "mem_222608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222612,
                                                  "mem_222612") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222616,
                                                  "mem_222616") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225033,
                                                  "color_225033") != 0)
                            return 1;
                        
                        struct memblock_device mem_222785;
                        
                        mem_222785.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_222785,
                                                  bytes_222359, "mem_222785")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_222785,
                                                                  (int64_t) 0,
                                                                  mem_222665,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  m_196691,
                                                                  n_p_196694 *
                                                                  s_n_m_196745) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_222785,
                                                      "mem_222785") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225033,
                                                      "color_225033") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222665,
                                                      "mem_222665") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222616,
                                                      "mem_222616") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222612,
                                                      "mem_222612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222608,
                                                      "mem_222608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222604,
                                                      "mem_222604") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222600,
                                                      "mem_222600") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222597,
                                                      "mem_222597") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222787,
                                                      "ext_mem_222787") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222593,
                                                      "mem_222593") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223476,
                                                      "ext_mem_223476") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223477,
                                                      "ext_mem_223477") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        if (memblock_unref_device(ctx, &mem_222665,
                                                  "mem_222665") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_222787,
                                                &mem_222785, "mem_222785") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222785,
                                                  "mem_222785") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225033,
                                                  "color_225033") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222665,
                                                  "mem_222665") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222616,
                                                  "mem_222616") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222612,
                                                  "mem_222612") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222608,
                                                  "mem_222608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222604,
                                                  "mem_222604") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222600,
                                                  "mem_222600") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222597,
                                                  "mem_222597") != 0)
                            return 1;
                    } else {
                        struct memblock_device ext_mem_222780;
                        
                        ext_mem_222780.references = NULL;
                        
                        int32_t local_memory_capacity_226150;
                        
                        local_memory_capacity_226150 =
                            ctx->opencl.max_local_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_226150)) &&
                            suff_outer_par_204749) {
                            struct memblock_device mem_222669;
                            
                            mem_222669.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222669,
                                                      bytes_222668,
                                                      "mem_222669")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_222669,
                                                                      (int64_t) 0,
                                                                      ext_mem_222420,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      s_n_m_196745,
                                                                      m_196691 *
                                                                      n_p_196694) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222673;
                            
                            mem_222673.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222673,
                                                      bytes_222672,
                                                      "mem_222673")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222673,
                                                                      (int64_t) 0,
                                                                      ext_mem_222419,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      s_n_m_196745,
                                                                      m_196691 *
                                                                      n_p_196694) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222673,
                                                          "mem_222673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222677;
                            
                            mem_222677.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222677,
                                                      bytes_222676,
                                                      "mem_222677")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_222677,
                                                                      (int64_t) 0,
                                                                      ext_mem_222322,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      defunc_0_f_res_196740,
                                                                      m_196691 *
                                                                      n_p_196694) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222677,
                                                          "mem_222677") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222673,
                                                          "mem_222673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222681;
                            
                            mem_222681.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222681,
                                                      bytes_222680,
                                                      "mem_222681")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222681,
                                                                      (int64_t) 0,
                                                                      mem_222588,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      defunc_0_f_res_196740,
                                                                      m_196691 *
                                                                      n_p_196694) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222681,
                                                          "mem_222681") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222677,
                                                          "mem_222677") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222673,
                                                          "mem_222673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222685;
                            
                            mem_222685.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222685,
                                                      bytes_222680,
                                                      "mem_222685")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222685,
                                                                      (int64_t) 0,
                                                                      mem_222583,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      defunc_0_f_res_196740,
                                                                      m_196691 *
                                                                      n_p_196694) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222685,
                                                          "mem_222685") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222681,
                                                          "mem_222681") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222677,
                                                          "mem_222677") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222673,
                                                          "mem_222673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222705;
                            
                            mem_222705.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222705,
                                                      bytes_222672,
                                                      "mem_222705")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225034;
                            
                            color_225034.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225034,
                                                      total_sizze_225156,
                                                      "color_225034")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    2,
                                                                    sizeof(n_p_196694),
                                                                    &n_p_196694));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    3,
                                                                    sizeof(q_s_196695),
                                                                    &q_s_196695));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    4,
                                                                    sizeof(jump_s_196701),
                                                                    &jump_s_196701));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    5,
                                                                    sizeof(defunc_0_f_res_196740),
                                                                    &defunc_0_f_res_196740));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    6,
                                                                    sizeof(pad_css_len_196741),
                                                                    &pad_css_len_196741));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    7,
                                                                    sizeof(s_n_m_196745),
                                                                    &s_n_m_196745));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    8,
                                                                    sizeof(num_groups_204745),
                                                                    &num_groups_204745));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    9,
                                                                    sizeof(num_threads_225155),
                                                                    &num_threads_225155));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    10,
                                                                    sizeof(ext_mem_222321.mem),
                                                                    &ext_mem_222321.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    11,
                                                                    sizeof(mem_222669.mem),
                                                                    &mem_222669.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    12,
                                                                    sizeof(mem_222673.mem),
                                                                    &mem_222673.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    13,
                                                                    sizeof(mem_222677.mem),
                                                                    &mem_222677.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    14,
                                                                    sizeof(mem_222681.mem),
                                                                    &mem_222681.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    15,
                                                                    sizeof(mem_222685.mem),
                                                                    &mem_222685.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    16,
                                                                    sizeof(mem_222705.mem),
                                                                    &mem_222705.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204765,
                                                                    17,
                                                                    sizeof(color_225034.mem),
                                                                    &color_225034.mem));
                            if (1 * ((size_t) num_groups_204745 *
                                     (size_t) segmap_group_sizze_204744) != 0) {
                                const size_t global_work_sizze_229845[1] =
                                             {(size_t) num_groups_204745 *
                                             (size_t) segmap_group_sizze_204744};
                                const size_t local_work_sizze_229849[1] =
                                             {(size_t) segmap_group_sizze_204744};
                                int64_t time_start_229846 = 0, time_end_229847 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_204765",
                                            global_work_sizze_229845[0],
                                            local_work_sizze_229849[0],
                                            (int) 0);
                                    time_start_229846 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_204765,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_229845,
                                                                                local_work_sizze_229849,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_204765_runs,
                                                                                                                          &ctx->mainzisegmap_204765_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_229847 = get_wall_time();
                                    
                                    long time_diff_229848 = time_end_229847 -
                                         time_start_229846;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_204765",
                                            time_diff_229848);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_222669,
                                                      "mem_222669") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222673,
                                                      "mem_222673") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222677,
                                                      "mem_222677") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222681,
                                                      "mem_222681") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222685,
                                                      "mem_222685") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225034,
                                                      "color_225034") != 0)
                                return 1;
                            
                            struct memblock_device mem_222778;
                            
                            mem_222778.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222778,
                                                      bytes_222359,
                                                      "mem_222778")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222778,
                                                                      (int64_t) 0,
                                                                      mem_222705,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691 *
                                                                      n_p_196694,
                                                                      s_n_m_196745) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222778,
                                                          "mem_222778") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225034,
                                                          "color_225034") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222705,
                                                          "mem_222705") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222685,
                                                          "mem_222685") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222681,
                                                          "mem_222681") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222677,
                                                          "mem_222677") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222673,
                                                          "mem_222673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222669,
                                                          "mem_222669") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222780,
                                                          "ext_mem_222780") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222787,
                                                          "ext_mem_222787") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222593,
                                                          "mem_222593") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_222705,
                                                      "mem_222705") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_222780,
                                                    &mem_222778,
                                                    "mem_222778") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222778,
                                                      "mem_222778") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225034,
                                                      "color_225034") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222705,
                                                      "mem_222705") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222685,
                                                      "mem_222685") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222681,
                                                      "mem_222681") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222677,
                                                      "mem_222677") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222673,
                                                      "mem_222673") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222669,
                                                      "mem_222669") != 0)
                                return 1;
                        } else {
                            struct memblock_device ext_mem_222773;
                            
                            ext_mem_222773.references = NULL;
                            
                            int32_t local_memory_capacity_226149;
                            
                            local_memory_capacity_226149 =
                                ctx->opencl.max_local_memory;
                            if (sle64(bytes_222368 + srem64((int64_t) 8 -
                                                            srem64(bytes_222368,
                                                                   (int64_t) 8),
                                                            (int64_t) 8) +
                                      (bytes_222371 + srem64((int64_t) 8 -
                                                             srem64(bytes_222371,
                                                                    (int64_t) 8),
                                                             (int64_t) 8)) +
                                      (bytes_222368 + srem64((int64_t) 8 -
                                                             srem64(bytes_222368,
                                                                    (int64_t) 8),
                                                             (int64_t) 8)) +
                                      (bytes_222711 + srem64((int64_t) 8 -
                                                             srem64(bytes_222711,
                                                                    (int64_t) 8),
                                                             (int64_t) 8)) +
                                      ((int64_t) 4 * (s_n_m_196745 *
                                                      q_s_196695) +
                                       srem64((int64_t) 8 - srem64((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695),
                                                                   (int64_t) 8),
                                              (int64_t) 8)) + ((int64_t) 4 *
                                                               (s_n_m_196745 *
                                                                q_s_196695) +
                                                               srem64((int64_t) 8 -
                                                                      srem64((int64_t) 4 *
                                                                             (s_n_m_196745 *
                                                                              q_s_196695),
                                                                             (int64_t) 8),
                                                                      (int64_t) 8)),
                                      sext_i32_i64(local_memory_capacity_226149)) &&
                                intra_suff_and_fits_204760) {
                                struct memblock_device mem_222732;
                                
                                mem_222732.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222732,
                                                          bytes_222359,
                                                          "mem_222732")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        1,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  (s_n_m_196745 *
                                                                                   q_s_196695)),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        2,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  (s_n_m_196745 *
                                                                                   q_s_196695)),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        3,
                                                                        (size_t) bytes_222711,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        4,
                                                                        (size_t) bytes_222368,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        5,
                                                                        (size_t) bytes_222371,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        6,
                                                                        (size_t) bytes_222368,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        7,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        8,
                                                                        sizeof(n_p_196694),
                                                                        &n_p_196694));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        9,
                                                                        sizeof(q_s_196695),
                                                                        &q_s_196695));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        10,
                                                                        sizeof(jump_s_196701),
                                                                        &jump_s_196701));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        11,
                                                                        sizeof(defunc_0_f_res_196740),
                                                                        &defunc_0_f_res_196740));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        12,
                                                                        sizeof(pad_css_len_196741),
                                                                        &pad_css_len_196741));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        13,
                                                                        sizeof(s_n_m_196745),
                                                                        &s_n_m_196745));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        14,
                                                                        sizeof(computed_group_sizze_204753),
                                                                        &computed_group_sizze_204753));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        15,
                                                                        sizeof(ext_mem_222321.mem),
                                                                        &ext_mem_222321.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        16,
                                                                        sizeof(ext_mem_222322.mem),
                                                                        &ext_mem_222322.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        17,
                                                                        sizeof(ext_mem_222419.mem),
                                                                        &ext_mem_222419.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        18,
                                                                        sizeof(ext_mem_222420.mem),
                                                                        &ext_mem_222420.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        19,
                                                                        sizeof(mem_222583.mem),
                                                                        &mem_222583.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        20,
                                                                        sizeof(mem_222588.mem),
                                                                        &mem_222588.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_204851,
                                                                        21,
                                                                        sizeof(mem_222732.mem),
                                                                        &mem_222732.mem));
                                if (1 * ((size_t) binop_x_222259 *
                                         (size_t) computed_group_sizze_204753) !=
                                    0) {
                                    const size_t global_work_sizze_229850[1] =
                                                 {(size_t) binop_x_222259 *
                                                 (size_t) computed_group_sizze_204753};
                                    const size_t local_work_sizze_229854[1] =
                                                 {(size_t) computed_group_sizze_204753};
                                    int64_t time_start_229851 = 0,
                                            time_end_229852 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_intragroup_204851",
                                                global_work_sizze_229850[0],
                                                local_work_sizze_229854[0],
                                                (int) (0 + (int64_t) 4 *
                                                       (s_n_m_196745 *
                                                        q_s_196695) +
                                                       (int64_t) 4 *
                                                       (s_n_m_196745 *
                                                        q_s_196695) +
                                                       bytes_222711 +
                                                       bytes_222368 +
                                                       bytes_222371 +
                                                       bytes_222368));
                                        time_start_229851 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_intragroup_204851,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_229850,
                                                                                    local_work_sizze_229854,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_intragroup_204851_runs,
                                                                                                                              &ctx->mainzisegmap_intragroup_204851_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_229852 = get_wall_time();
                                        
                                        long time_diff_229853 =
                                             time_end_229852 -
                                             time_start_229851;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_intragroup_204851",
                                                time_diff_229853);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_set_device(ctx, &ext_mem_222773,
                                                        &mem_222732,
                                                        "mem_222732") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222732,
                                                          "mem_222732") != 0)
                                    return 1;
                            } else {
                                int64_t segmap_usable_groups_204963 =
                                        sdiv_up64(nest_sizze_201931,
                                                  segmap_group_sizze_204962);
                                struct memblock_device ext_mem_222772;
                                
                                ext_mem_222772.references = NULL;
                                
                                int32_t local_memory_capacity_226148;
                                
                                local_memory_capacity_226148 =
                                    ctx->opencl.max_local_memory;
                                if (sle64((int64_t) 0,
                                          sext_i32_i64(local_memory_capacity_226148)) &&
                                    suff_outer_par_204967) {
                                    struct memblock_device mem_222738;
                                    
                                    mem_222738.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222738,
                                                              bytes_222359,
                                                              "mem_222738")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            1,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            2,
                                                                            sizeof(n_p_196694),
                                                                            &n_p_196694));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            3,
                                                                            sizeof(q_s_196695),
                                                                            &q_s_196695));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            4,
                                                                            sizeof(jump_s_196701),
                                                                            &jump_s_196701));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            5,
                                                                            sizeof(defunc_0_f_res_196740),
                                                                            &defunc_0_f_res_196740));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            6,
                                                                            sizeof(pad_css_len_196741),
                                                                            &pad_css_len_196741));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            7,
                                                                            sizeof(s_n_m_196745),
                                                                            &s_n_m_196745));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            8,
                                                                            sizeof(ext_mem_222321.mem),
                                                                            &ext_mem_222321.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            9,
                                                                            sizeof(ext_mem_222322.mem),
                                                                            &ext_mem_222322.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            10,
                                                                            sizeof(ext_mem_222419.mem),
                                                                            &ext_mem_222419.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            11,
                                                                            sizeof(ext_mem_222420.mem),
                                                                            &ext_mem_222420.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            12,
                                                                            sizeof(mem_222583.mem),
                                                                            &mem_222583.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            13,
                                                                            sizeof(mem_222588.mem),
                                                                            &mem_222588.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_204973,
                                                                            14,
                                                                            sizeof(mem_222738.mem),
                                                                            &mem_222738.mem));
                                    if (1 *
                                        ((size_t) segmap_usable_groups_204963 *
                                         (size_t) segmap_group_sizze_204962) !=
                                        0) {
                                        const size_t global_work_sizze_229855[1]
                                                     =
                                                     {(size_t) segmap_usable_groups_204963 *
                                                     (size_t) segmap_group_sizze_204962};
                                        const size_t local_work_sizze_229859[1]
                                                     =
                                                     {(size_t) segmap_group_sizze_204962};
                                        int64_t time_start_229856 = 0,
                                                time_end_229857 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segmap_204973",
                                                    global_work_sizze_229855[0],
                                                    local_work_sizze_229859[0],
                                                    (int) 0);
                                            time_start_229856 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegmap_204973,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_229855,
                                                                                        local_work_sizze_229859,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegmap_204973_runs,
                                                                                                                                  &ctx->mainzisegmap_204973_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_229857 = get_wall_time();
                                            
                                            long time_diff_229858 =
                                                 time_end_229857 -
                                                 time_start_229856;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segmap_204973",
                                                    time_diff_229858);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_222772,
                                                            &mem_222738,
                                                            "mem_222738") != 0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222738,
                                                              "mem_222738") !=
                                        0)
                                        return 1;
                                } else {
                                    int64_t segmap_usable_groups_205056 =
                                            sdiv_up64(nest_sizze_201931,
                                                      segmap_group_sizze_205055);
                                    struct memblock_device mem_222744;
                                    
                                    mem_222744.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222744,
                                                              bytes_222354,
                                                              "mem_222744")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device mem_222748;
                                    
                                    mem_222748.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222748,
                                                              bytes_222747,
                                                              "mem_222748")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            1,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            2,
                                                                            sizeof(n_p_196694),
                                                                            &n_p_196694));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            3,
                                                                            sizeof(jump_s_196701),
                                                                            &jump_s_196701));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            4,
                                                                            sizeof(defunc_0_f_res_196740),
                                                                            &defunc_0_f_res_196740));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            5,
                                                                            sizeof(pad_css_len_196741),
                                                                            &pad_css_len_196741));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            6,
                                                                            sizeof(s_n_m_196745),
                                                                            &s_n_m_196745));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            7,
                                                                            sizeof(mem_222744.mem),
                                                                            &mem_222744.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205062,
                                                                            8,
                                                                            sizeof(mem_222748.mem),
                                                                            &mem_222748.mem));
                                    if (1 *
                                        ((size_t) segmap_usable_groups_205056 *
                                         (size_t) segmap_group_sizze_205055) !=
                                        0) {
                                        const size_t global_work_sizze_229860[1]
                                                     =
                                                     {(size_t) segmap_usable_groups_205056 *
                                                     (size_t) segmap_group_sizze_205055};
                                        const size_t local_work_sizze_229864[1]
                                                     =
                                                     {(size_t) segmap_group_sizze_205055};
                                        int64_t time_start_229861 = 0,
                                                time_end_229862 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segmap_205062",
                                                    global_work_sizze_229860[0],
                                                    local_work_sizze_229864[0],
                                                    (int) 0);
                                            time_start_229861 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegmap_205062,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_229860,
                                                                                        local_work_sizze_229864,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegmap_205062_runs,
                                                                                                                                  &ctx->mainzisegmap_205062_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_229862 = get_wall_time();
                                            
                                            long time_diff_229863 =
                                                 time_end_229862 -
                                                 time_start_229861;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segmap_205062",
                                                    time_diff_229863);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx, &mem_222748,
                                                              "mem_222748") !=
                                        0)
                                        return 1;
                                    
                                    struct memblock_device mem_222754;
                                    
                                    mem_222754.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222754,
                                                              bytes_222359,
                                                              "mem_222754")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (slt64(q_s_196695 * (int64_t) 2,
                                              segred_group_sizze_205078)) {
                                        int64_t segment_sizze_nonzzero_225984 =
                                                smax64((int64_t) 1, q_s_196695);
                                        int64_t num_threads_225985 =
                                                num_groups_205079 *
                                                segred_group_sizze_205078;
                                        
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegRed-small");
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_segments",
                                                    (long long) (m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segment_size",
                                                    (long long) q_s_196695,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segments_per_group",
                                                    (long long) squot64(segred_group_sizze_205078,
                                                                        segment_sizze_nonzzero_225984),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "required_groups",
                                                    (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                       n_p_196694 *
                                                                                       s_n_m_196745,
                                                                                       squot64(segred_group_sizze_205078,
                                                                                               segment_sizze_nonzzero_225984))),
                                                    '\n');
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                1,
                                                                                (size_t) ((int64_t) 4 *
                                                                                          segred_group_sizze_205078),
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                2,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                3,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                4,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                5,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                7,
                                                                                sizeof(num_groups_205079),
                                                                                &num_groups_205079));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                8,
                                                                                sizeof(segment_sizze_nonzzero_225984),
                                                                                &segment_sizze_nonzzero_225984));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                9,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                10,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                11,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                12,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                13,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                14,
                                                                                sizeof(mem_222744.mem),
                                                                                &mem_222744.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205086,
                                                                                15,
                                                                                sizeof(mem_222754.mem),
                                                                                &mem_222754.mem));
                                        if (1 * ((size_t) num_groups_205079 *
                                                 (size_t) segred_group_sizze_205078) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229865[1] =
                                            {(size_t) num_groups_205079 *
                                            (size_t) segred_group_sizze_205078};
                                            const size_t
                                            local_work_sizze_229869[1] =
                                            {(size_t) segred_group_sizze_205078};
                                            int64_t time_start_229866 = 0,
                                                    time_end_229867 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segred_small_205086",
                                                        global_work_sizze_229865[0],
                                                        local_work_sizze_229869[0],
                                                        (int) (0 + (int64_t) 4 *
                                                               segred_group_sizze_205078));
                                                time_start_229866 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegred_small_205086,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229865,
                                                                                            local_work_sizze_229869,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegred_small_205086_runs,
                                                                                                                                      &ctx->mainzisegred_small_205086_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229867 =
                                                    get_wall_time();
                                                
                                                long time_diff_229868 =
                                                     time_end_229867 -
                                                     time_start_229866;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segred_small_205086",
                                                        time_diff_229868);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                    } else {
                                        int64_t groups_per_segment_226015 =
                                                sdiv_up64(num_groups_205079,
                                                          smax64((int64_t) 1,
                                                                 m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745));
                                        int64_t elements_per_thread_226016 =
                                                sdiv_up64(q_s_196695,
                                                          segred_group_sizze_205078 *
                                                          groups_per_segment_226015);
                                        int64_t virt_num_groups_226017 =
                                                groups_per_segment_226015 *
                                                (m_196691 * n_p_196694 *
                                                 s_n_m_196745);
                                        int64_t num_threads_226018 =
                                                num_groups_205079 *
                                                segred_group_sizze_205078;
                                        int64_t threads_per_segment_226019 =
                                                groups_per_segment_226015 *
                                                segred_group_sizze_205078;
                                        
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegRed-large");
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_segments",
                                                    (long long) (m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segment_size",
                                                    (long long) q_s_196695,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "virt_num_groups",
                                                    (long long) virt_num_groups_226017,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_groups",
                                                    (long long) num_groups_205079,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "group_size",
                                                    (long long) segred_group_sizze_205078,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "elems_per_thread",
                                                    (long long) elements_per_thread_226016,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "groups_per_segment",
                                                    (long long) groups_per_segment_226015,
                                                    '\n');
                                        
                                        struct memblock_device
                                        segred_tmp_mem_226020;
                                        
                                        segred_tmp_mem_226020.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &segred_tmp_mem_226020,
                                                                  (int64_t) 4 *
                                                                  virt_num_groups_226017,
                                                                  "segred_tmp_mem_226020")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device
                                        mainzicounter_mem_226022 =
                                        ctx->mainzicounter_mem_226022;
                                        
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                1,
                                                                                (size_t) 1,
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                2,
                                                                                (size_t) ((int64_t) 4 *
                                                                                          segred_group_sizze_205078),
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                3,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                4,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                5,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                6,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                7,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                8,
                                                                                sizeof(num_groups_205079),
                                                                                &num_groups_205079));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                9,
                                                                                sizeof(groups_per_segment_226015),
                                                                                &groups_per_segment_226015));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                10,
                                                                                sizeof(elements_per_thread_226016),
                                                                                &elements_per_thread_226016));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                11,
                                                                                sizeof(virt_num_groups_226017),
                                                                                &virt_num_groups_226017));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                12,
                                                                                sizeof(threads_per_segment_226019),
                                                                                &threads_per_segment_226019));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                13,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                14,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                15,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                16,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                17,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                18,
                                                                                sizeof(mem_222744.mem),
                                                                                &mem_222744.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                19,
                                                                                sizeof(mem_222754.mem),
                                                                                &mem_222754.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                20,
                                                                                sizeof(segred_tmp_mem_226020.mem),
                                                                                &segred_tmp_mem_226020.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205086,
                                                                                21,
                                                                                sizeof(mainzicounter_mem_226022.mem),
                                                                                &mainzicounter_mem_226022.mem));
                                        if (1 * ((size_t) num_groups_205079 *
                                                 (size_t) segred_group_sizze_205078) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229871[1] =
                                            {(size_t) num_groups_205079 *
                                            (size_t) segred_group_sizze_205078};
                                            const size_t
                                            local_work_sizze_229875[1] =
                                            {(size_t) segred_group_sizze_205078};
                                            int64_t time_start_229872 = 0,
                                                    time_end_229873 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segred_large_205086",
                                                        global_work_sizze_229871[0],
                                                        local_work_sizze_229875[0],
                                                        (int) (0 + 1 +
                                                               (int64_t) 4 *
                                                               segred_group_sizze_205078));
                                                time_start_229872 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegred_large_205086,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229871,
                                                                                            local_work_sizze_229875,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegred_large_205086_runs,
                                                                                                                                      &ctx->mainzisegred_large_205086_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229873 =
                                                    get_wall_time();
                                                
                                                long time_diff_229874 =
                                                     time_end_229873 -
                                                     time_start_229872;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segred_large_205086",
                                                        time_diff_229874);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &segred_tmp_mem_226020,
                                                                  "segred_tmp_mem_226020") !=
                                            0)
                                            return 1;
                                    }
                                    if (memblock_unref_device(ctx, &mem_222744,
                                                              "mem_222744") !=
                                        0)
                                        return 1;
                                    
                                    int64_t segmap_usable_groups_205128 =
                                            sdiv_up64(nest_sizze_201931,
                                                      segmap_group_sizze_205127);
                                    struct memblock_device mem_222760;
                                    
                                    mem_222760.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222760,
                                                              bytes_222359,
                                                              "mem_222760")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device mem_222765;
                                    
                                    mem_222765.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222765,
                                                              bytes_222354,
                                                              "mem_222765")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            1,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            2,
                                                                            sizeof(n_p_196694),
                                                                            &n_p_196694));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            3,
                                                                            sizeof(jump_s_196701),
                                                                            &jump_s_196701));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            4,
                                                                            sizeof(defunc_0_f_res_196740),
                                                                            &defunc_0_f_res_196740));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            5,
                                                                            sizeof(pad_css_len_196741),
                                                                            &pad_css_len_196741));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            6,
                                                                            sizeof(s_n_m_196745),
                                                                            &s_n_m_196745));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            7,
                                                                            sizeof(mem_222754.mem),
                                                                            &mem_222754.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            8,
                                                                            sizeof(mem_222760.mem),
                                                                            &mem_222760.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205134,
                                                                            9,
                                                                            sizeof(mem_222765.mem),
                                                                            &mem_222765.mem));
                                    if (1 *
                                        ((size_t) segmap_usable_groups_205128 *
                                         (size_t) segmap_group_sizze_205127) !=
                                        0) {
                                        const size_t global_work_sizze_229876[1]
                                                     =
                                                     {(size_t) segmap_usable_groups_205128 *
                                                     (size_t) segmap_group_sizze_205127};
                                        const size_t local_work_sizze_229880[1]
                                                     =
                                                     {(size_t) segmap_group_sizze_205127};
                                        int64_t time_start_229877 = 0,
                                                time_end_229878 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segmap_205134",
                                                    global_work_sizze_229876[0],
                                                    local_work_sizze_229880[0],
                                                    (int) 0);
                                            time_start_229877 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegmap_205134,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_229876,
                                                                                        local_work_sizze_229880,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegmap_205134_runs,
                                                                                                                                  &ctx->mainzisegmap_205134_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_229878 = get_wall_time();
                                            
                                            long time_diff_229879 =
                                                 time_end_229878 -
                                                 time_start_229877;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segmap_205134",
                                                    time_diff_229879);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx, &mem_222754,
                                                              "mem_222754") !=
                                        0)
                                        return 1;
                                    
                                    struct memblock_device mem_222771;
                                    
                                    mem_222771.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_222771,
                                                              bytes_222359,
                                                              "mem_222771")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (slt64(q_s_196695 * (int64_t) 2,
                                              segred_group_sizze_205152)) {
                                        int64_t segment_sizze_nonzzero_226072 =
                                                smax64((int64_t) 1, q_s_196695);
                                        int64_t num_threads_226073 =
                                                num_groups_205153 *
                                                segred_group_sizze_205152;
                                        
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegRed-small");
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_segments",
                                                    (long long) (m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segment_size",
                                                    (long long) q_s_196695,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segments_per_group",
                                                    (long long) squot64(segred_group_sizze_205152,
                                                                        segment_sizze_nonzzero_226072),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "required_groups",
                                                    (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                       n_p_196694 *
                                                                                       s_n_m_196745,
                                                                                       squot64(segred_group_sizze_205152,
                                                                                               segment_sizze_nonzzero_226072))),
                                                    '\n');
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                1,
                                                                                (size_t) ((int64_t) 4 *
                                                                                          segred_group_sizze_205152),
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                2,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                3,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                4,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                5,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                7,
                                                                                sizeof(num_groups_205153),
                                                                                &num_groups_205153));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                8,
                                                                                sizeof(segment_sizze_nonzzero_226072),
                                                                                &segment_sizze_nonzzero_226072));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                9,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                10,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                11,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                12,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                13,
                                                                                sizeof(mem_222583.mem),
                                                                                &mem_222583.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                14,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                15,
                                                                                sizeof(mem_222760.mem),
                                                                                &mem_222760.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                16,
                                                                                sizeof(mem_222765.mem),
                                                                                &mem_222765.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_205160,
                                                                                17,
                                                                                sizeof(mem_222771.mem),
                                                                                &mem_222771.mem));
                                        if (1 * ((size_t) num_groups_205153 *
                                                 (size_t) segred_group_sizze_205152) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229881[1] =
                                            {(size_t) num_groups_205153 *
                                            (size_t) segred_group_sizze_205152};
                                            const size_t
                                            local_work_sizze_229885[1] =
                                            {(size_t) segred_group_sizze_205152};
                                            int64_t time_start_229882 = 0,
                                                    time_end_229883 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segred_small_205160",
                                                        global_work_sizze_229881[0],
                                                        local_work_sizze_229885[0],
                                                        (int) (0 + (int64_t) 4 *
                                                               segred_group_sizze_205152));
                                                time_start_229882 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegred_small_205160,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229881,
                                                                                            local_work_sizze_229885,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegred_small_205160_runs,
                                                                                                                                      &ctx->mainzisegred_small_205160_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229883 =
                                                    get_wall_time();
                                                
                                                long time_diff_229884 =
                                                     time_end_229883 -
                                                     time_start_229882;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segred_small_205160",
                                                        time_diff_229884);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                    } else {
                                        int64_t groups_per_segment_226103 =
                                                sdiv_up64(num_groups_205153,
                                                          smax64((int64_t) 1,
                                                                 m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745));
                                        int64_t elements_per_thread_226104 =
                                                sdiv_up64(q_s_196695,
                                                          segred_group_sizze_205152 *
                                                          groups_per_segment_226103);
                                        int64_t virt_num_groups_226105 =
                                                groups_per_segment_226103 *
                                                (m_196691 * n_p_196694 *
                                                 s_n_m_196745);
                                        int64_t num_threads_226106 =
                                                num_groups_205153 *
                                                segred_group_sizze_205152;
                                        int64_t threads_per_segment_226107 =
                                                groups_per_segment_226103 *
                                                segred_group_sizze_205152;
                                        
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegRed-large");
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_segments",
                                                    (long long) (m_196691 *
                                                                 n_p_196694 *
                                                                 s_n_m_196745),
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "segment_size",
                                                    (long long) q_s_196695,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "virt_num_groups",
                                                    (long long) virt_num_groups_226105,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "num_groups",
                                                    (long long) num_groups_205153,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "group_size",
                                                    (long long) segred_group_sizze_205152,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "elems_per_thread",
                                                    (long long) elements_per_thread_226104,
                                                    '\n');
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s: %llu%c",
                                                    "groups_per_segment",
                                                    (long long) groups_per_segment_226103,
                                                    '\n');
                                        
                                        struct memblock_device
                                        segred_tmp_mem_226108;
                                        
                                        segred_tmp_mem_226108.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &segred_tmp_mem_226108,
                                                                  (int64_t) 4 *
                                                                  virt_num_groups_226105,
                                                                  "segred_tmp_mem_226108")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device
                                        mainzicounter_mem_226110 =
                                        ctx->mainzicounter_mem_226110;
                                        
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                1,
                                                                                (size_t) 1,
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                2,
                                                                                (size_t) ((int64_t) 4 *
                                                                                          segred_group_sizze_205152),
                                                                                NULL));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                3,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                4,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                5,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                6,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                7,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                8,
                                                                                sizeof(num_groups_205153),
                                                                                &num_groups_205153));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                9,
                                                                                sizeof(groups_per_segment_226103),
                                                                                &groups_per_segment_226103));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                10,
                                                                                sizeof(elements_per_thread_226104),
                                                                                &elements_per_thread_226104));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                11,
                                                                                sizeof(virt_num_groups_226105),
                                                                                &virt_num_groups_226105));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                12,
                                                                                sizeof(threads_per_segment_226107),
                                                                                &threads_per_segment_226107));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                13,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                14,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                15,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                16,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                17,
                                                                                sizeof(mem_222583.mem),
                                                                                &mem_222583.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                18,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                19,
                                                                                sizeof(mem_222760.mem),
                                                                                &mem_222760.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                20,
                                                                                sizeof(mem_222765.mem),
                                                                                &mem_222765.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                21,
                                                                                sizeof(mem_222771.mem),
                                                                                &mem_222771.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                22,
                                                                                sizeof(segred_tmp_mem_226108.mem),
                                                                                &segred_tmp_mem_226108.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_205160,
                                                                                23,
                                                                                sizeof(mainzicounter_mem_226110.mem),
                                                                                &mainzicounter_mem_226110.mem));
                                        if (1 * ((size_t) num_groups_205153 *
                                                 (size_t) segred_group_sizze_205152) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229887[1] =
                                            {(size_t) num_groups_205153 *
                                            (size_t) segred_group_sizze_205152};
                                            const size_t
                                            local_work_sizze_229891[1] =
                                            {(size_t) segred_group_sizze_205152};
                                            int64_t time_start_229888 = 0,
                                                    time_end_229889 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segred_large_205160",
                                                        global_work_sizze_229887[0],
                                                        local_work_sizze_229891[0],
                                                        (int) (0 + 1 +
                                                               (int64_t) 4 *
                                                               segred_group_sizze_205152));
                                                time_start_229888 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegred_large_205160,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229887,
                                                                                            local_work_sizze_229891,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegred_large_205160_runs,
                                                                                                                                      &ctx->mainzisegred_large_205160_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229889 =
                                                    get_wall_time();
                                                
                                                long time_diff_229890 =
                                                     time_end_229889 -
                                                     time_start_229888;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segred_large_205160",
                                                        time_diff_229890);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &segred_tmp_mem_226108,
                                                                  "segred_tmp_mem_226108") !=
                                            0)
                                            return 1;
                                    }
                                    if (memblock_unref_device(ctx, &mem_222760,
                                                              "mem_222760") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222765,
                                                              "mem_222765") !=
                                        0)
                                        return 1;
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_222772,
                                                            &mem_222771,
                                                            "mem_222771") != 0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222771,
                                                              "mem_222771") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222765,
                                                              "mem_222765") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222760,
                                                              "mem_222760") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222754,
                                                              "mem_222754") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222748,
                                                              "mem_222748") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222744,
                                                              "mem_222744") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_set_device(ctx, &ext_mem_222773,
                                                        &ext_mem_222772,
                                                        "ext_mem_222772") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222772,
                                                          "ext_mem_222772") !=
                                    0)
                                    return 1;
                            }
                            if (memblock_set_device(ctx, &ext_mem_222780,
                                                    &ext_mem_222773,
                                                    "ext_mem_222773") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222773,
                                                      "ext_mem_222773") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_222787,
                                                &ext_mem_222780,
                                                "ext_mem_222780") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222780,
                                                  "ext_mem_222780") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223477,
                                            &ext_mem_222787,
                                            "ext_mem_222787") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223476, &mem_222593,
                                            "mem_222593") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222787,
                                              "ext_mem_222787") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222593, "mem_222593") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_197449 = (int64_t) 1 == d_s_196698;
                    struct memblock_device ext_mem_223475;
                    
                    ext_mem_223475.references = NULL;
                    
                    struct memblock_device ext_mem_223474;
                    
                    ext_mem_223474.references = NULL;
                    if (match_lit_197449) {
                        bool suff_outer_par_205212;
                        
                        suff_outer_par_205212 =
                            *ctx->tuning_params.mainzisuff_outer_par_11 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_11", (long) m_196691,
                                    suff_outer_par_205212 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_205342;
                        
                        segmap_group_sizze_205342 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_205216;
                        
                        int64_t num_groups_205343;
                        int32_t max_num_groups_226152;
                        
                        max_num_groups_226152 =
                            *ctx->tuning_params.mainzisegmap_num_groups_205218;
                        num_groups_205343 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_205342),
                                                                       sext_i32_i64(max_num_groups_226152))));
                        
                        int64_t segmap_group_sizze_206779;
                        
                        segmap_group_sizze_206779 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_205472;
                        
                        int64_t num_groups_206780;
                        int32_t max_num_groups_226153;
                        
                        max_num_groups_226153 =
                            *ctx->tuning_params.mainzisegmap_num_groups_205474;
                        num_groups_206780 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(binop_x_222259,
                                                                                 segmap_group_sizze_206779),
                                                                       sext_i32_i64(max_num_groups_226153))));
                        
                        bool suff_outer_par_206784;
                        
                        suff_outer_par_206784 =
                            *ctx->tuning_params.mainzisuff_outer_par_12 <=
                            binop_x_222259;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_12",
                                    (long) binop_x_222259,
                                    suff_outer_par_206784 ? "true" : "false");
                        
                        int64_t one_intra_par_min_206785 = q_s_196695 *
                                s_n_m_196745;
                        int64_t intra_avail_par_206787 = smin64(s_n_m_196745,
                                                                one_intra_par_min_206785);
                        int64_t computed_group_sizze_206788 =
                                smax64(s_n_m_196745, one_intra_par_min_206785);
                        bool fits_206792 = sle64(computed_group_sizze_206788,
                                                 max_group_sizze_199970);
                        bool suff_intra_par_206794;
                        
                        suff_intra_par_206794 =
                            *ctx->tuning_params.mainzisuff_intra_par_13 <=
                            intra_avail_par_206787;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_intra_par_13",
                                    (long) intra_avail_par_206787,
                                    suff_intra_par_206794 ? "true" : "false");
                        
                        bool intra_suff_and_fits_206795 = fits_206792 &&
                             suff_intra_par_206794;
                        int64_t segmap_group_sizze_207064;
                        
                        segmap_group_sizze_207064 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_205905;
                        
                        bool suff_outer_par_207069;
                        
                        suff_outer_par_207069 =
                            *ctx->tuning_params.mainzisuff_outer_par_14 <=
                            nest_sizze_201931;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_14",
                                    (long) nest_sizze_201931,
                                    suff_outer_par_207069 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_207187;
                        
                        segmap_group_sizze_207187 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_206240;
                        
                        int64_t nest_sizze_207209 = q_s_196695 *
                                nest_sizze_201931;
                        int64_t segred_group_sizze_207210;
                        
                        segred_group_sizze_207210 =
                            *ctx->tuning_params.mainzisegred_group_sizze_206176;
                        
                        int64_t num_groups_207211;
                        int32_t max_num_groups_226154;
                        
                        max_num_groups_226154 =
                            *ctx->tuning_params.mainzisegred_num_groups_206178;
                        num_groups_207211 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_207209,
                                                                                 segred_group_sizze_207210),
                                                                       sext_i32_i64(max_num_groups_226154))));
                        
                        int64_t segmap_group_sizze_207269;
                        
                        segmap_group_sizze_207269 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_206137;
                        
                        int64_t segred_group_sizze_207305;
                        
                        segred_group_sizze_207305 =
                            *ctx->tuning_params.mainzisegred_group_sizze_206043;
                        
                        int64_t num_groups_207306;
                        int32_t max_num_groups_226155;
                        
                        max_num_groups_226155 =
                            *ctx->tuning_params.mainzisegred_num_groups_206045;
                        num_groups_207306 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_207209,
                                                                                 segred_group_sizze_207305),
                                                                       sext_i32_i64(max_num_groups_226155))));
                        
                        int64_t bytes_222790 = (int64_t) 4 * nest_sizze_201931;
                        int64_t bytes_222797 = (int64_t) 4 * nest_sizze_200246;
                        int64_t bytes_222801 = (int64_t) 8 * nest_sizze_201931;
                        int64_t bytes_222809 = (int64_t) 8 * nest_sizze_200246;
                        int64_t binop_x_222908 = m_196691 * s_n_m_196745;
                        int64_t binop_x_222909 = n_p_196694 * binop_x_222908;
                        int64_t bytes_222910 = (int64_t) 8 * binop_x_222909;
                        int64_t bytes_222914 = (int64_t) 4 * binop_x_222909;
                        int64_t binop_x_222916 = m_196691 *
                                defunc_0_f_res_196740;
                        int64_t binop_x_222917 = n_p_196694 * binop_x_222916;
                        int64_t bytes_222918 = (int64_t) 8 * binop_x_222917;
                        int64_t bytes_222922 = (int64_t) 4 * binop_x_222917;
                        int64_t bytes_222972 = smax64((int64_t) 0,
                                                      s_n_m_196745);
                        int64_t bytes_223033 = smax64((int64_t) 0,
                                                      binop_x_222352);
                        int64_t num_threads_225163 = segmap_group_sizze_205342 *
                                num_groups_205343;
                        int64_t total_sizze_225164 = bytes_222345 *
                                num_threads_225163;
                        int64_t total_sizze_225165 = bytes_222345 *
                                num_threads_225163;
                        int64_t num_threads_225166 = segmap_group_sizze_206779 *
                                num_groups_206780;
                        int64_t total_sizze_225167 = bytes_222368 *
                                num_threads_225166;
                        int64_t total_sizze_225168 = bytes_222368 *
                                num_threads_225166;
                        struct memblock_device ext_mem_223114;
                        
                        ext_mem_223114.references = NULL;
                        
                        struct memblock_device ext_mem_223113;
                        
                        ext_mem_223113.references = NULL;
                        
                        int32_t local_memory_capacity_226526;
                        
                        local_memory_capacity_226526 =
                            ctx->opencl.max_local_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_226526)) &&
                            suff_outer_par_205212) {
                            struct memblock_device mem_222791;
                            
                            mem_222791.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222791,
                                                      bytes_222790,
                                                      "mem_222791")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222791,
                                                                      (int64_t) 0,
                                                                      ext_mem_222419,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      s_n_m_196745,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222794;
                            
                            mem_222794.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222794,
                                                      binop_y_222281,
                                                      "mem_222794")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_222794,
                                                                      (int64_t) 0,
                                                                      ext_mem_222321,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222798;
                            
                            mem_222798.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222798,
                                                      bytes_222797,
                                                      "mem_222798")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222798,
                                                                      (int64_t) 0,
                                                                      mem_222588,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222802;
                            
                            mem_222802.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222802,
                                                      bytes_222801,
                                                      "mem_222802")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_222802,
                                                                      (int64_t) 0,
                                                                      ext_mem_222420,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      s_n_m_196745,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222802,
                                                          "mem_222802") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222806;
                            
                            mem_222806.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222806,
                                                      bytes_222797,
                                                      "mem_222806")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_222806,
                                                                      (int64_t) 0,
                                                                      mem_222583,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222806,
                                                          "mem_222806") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222802,
                                                          "mem_222802") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222810;
                            
                            mem_222810.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222810,
                                                      bytes_222809,
                                                      "mem_222810")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_222810,
                                                                      (int64_t) 0,
                                                                      ext_mem_222322,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_222810,
                                                          "mem_222810") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222806,
                                                          "mem_222806") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222802,
                                                          "mem_222802") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222903;
                            
                            mem_222903.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222903,
                                                      bytes_222790,
                                                      "mem_222903")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_222907;
                            
                            mem_222907.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_222907,
                                                      bytes_222790,
                                                      "mem_222907")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225039;
                            
                            color_225039.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225039,
                                                      total_sizze_225164,
                                                      "color_225039")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225040;
                            
                            color_225040.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225040,
                                                      total_sizze_225165,
                                                      "color_225040")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    2,
                                                                    sizeof(n_p_196694),
                                                                    &n_p_196694));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    3,
                                                                    sizeof(q_s_196695),
                                                                    &q_s_196695));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    4,
                                                                    sizeof(jump_s_196701),
                                                                    &jump_s_196701));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    5,
                                                                    sizeof(defunc_0_f_res_196740),
                                                                    &defunc_0_f_res_196740));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    6,
                                                                    sizeof(pad_css_len_196741),
                                                                    &pad_css_len_196741));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    7,
                                                                    sizeof(s_n_m_196745),
                                                                    &s_n_m_196745));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    8,
                                                                    sizeof(num_groups_205343),
                                                                    &num_groups_205343));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    9,
                                                                    sizeof(num_threads_225163),
                                                                    &num_threads_225163));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    10,
                                                                    sizeof(mem_222791.mem),
                                                                    &mem_222791.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    11,
                                                                    sizeof(mem_222794.mem),
                                                                    &mem_222794.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    12,
                                                                    sizeof(mem_222798.mem),
                                                                    &mem_222798.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    13,
                                                                    sizeof(mem_222802.mem),
                                                                    &mem_222802.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    14,
                                                                    sizeof(mem_222806.mem),
                                                                    &mem_222806.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    15,
                                                                    sizeof(mem_222810.mem),
                                                                    &mem_222810.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    16,
                                                                    sizeof(mem_222903.mem),
                                                                    &mem_222903.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    17,
                                                                    sizeof(mem_222907.mem),
                                                                    &mem_222907.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    18,
                                                                    sizeof(color_225039.mem),
                                                                    &color_225039.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_205348,
                                                                    19,
                                                                    sizeof(color_225040.mem),
                                                                    &color_225040.mem));
                            if (1 * ((size_t) num_groups_205343 *
                                     (size_t) segmap_group_sizze_205342) != 0) {
                                const size_t global_work_sizze_229892[1] =
                                             {(size_t) num_groups_205343 *
                                             (size_t) segmap_group_sizze_205342};
                                const size_t local_work_sizze_229896[1] =
                                             {(size_t) segmap_group_sizze_205342};
                                int64_t time_start_229893 = 0, time_end_229894 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_205348",
                                            global_work_sizze_229892[0],
                                            local_work_sizze_229896[0],
                                            (int) 0);
                                    time_start_229893 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_205348,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_229892,
                                                                                local_work_sizze_229896,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_205348_runs,
                                                                                                                          &ctx->mainzisegmap_205348_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_229894 = get_wall_time();
                                    
                                    long time_diff_229895 = time_end_229894 -
                                         time_start_229893;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_205348",
                                            time_diff_229895);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_222791,
                                                      "mem_222791") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222794,
                                                      "mem_222794") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222798,
                                                      "mem_222798") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222802,
                                                      "mem_222802") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222806,
                                                      "mem_222806") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222810,
                                                      "mem_222810") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225039,
                                                      "color_225039") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225040,
                                                      "color_225040") != 0)
                                return 1;
                            
                            struct memblock_device mem_223105;
                            
                            mem_223105.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223105,
                                                      bytes_222359,
                                                      "mem_223105")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223105,
                                                                      (int64_t) 0,
                                                                      mem_222903,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      n_p_196694 *
                                                                      s_n_m_196745) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223105,
                                                          "mem_223105") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225040,
                                                          "color_225040") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225039,
                                                          "color_225039") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222907,
                                                          "mem_222907") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222903,
                                                          "mem_222903") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222810,
                                                          "mem_222810") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222806,
                                                          "mem_222806") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222802,
                                                          "mem_222802") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_222903,
                                                      "mem_222903") != 0)
                                return 1;
                            
                            struct memblock_device mem_223111;
                            
                            mem_223111.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223111,
                                                      bytes_222359,
                                                      "mem_223111")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223111,
                                                                      (int64_t) 0,
                                                                      mem_222907,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      n_p_196694 *
                                                                      s_n_m_196745) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223111,
                                                          "mem_223111") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223105,
                                                          "mem_223105") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225040,
                                                          "color_225040") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225039,
                                                          "color_225039") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222907,
                                                          "mem_222907") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222903,
                                                          "mem_222903") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222810,
                                                          "mem_222810") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222806,
                                                          "mem_222806") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222802,
                                                          "mem_222802") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222798,
                                                          "mem_222798") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222794,
                                                          "mem_222794") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222791,
                                                          "mem_222791") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223113,
                                                          "ext_mem_223113") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223114,
                                                          "ext_mem_223114") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_222907,
                                                      "mem_222907") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223114,
                                                    &mem_223105,
                                                    "mem_223105") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223113,
                                                    &mem_223111,
                                                    "mem_223111") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223111,
                                                      "mem_223111") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223105,
                                                      "mem_223105") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225040,
                                                      "color_225040") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225039,
                                                      "color_225039") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222907,
                                                      "mem_222907") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222903,
                                                      "mem_222903") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222810,
                                                      "mem_222810") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222806,
                                                      "mem_222806") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222802,
                                                      "mem_222802") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222798,
                                                      "mem_222798") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222794,
                                                      "mem_222794") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222791,
                                                      "mem_222791") != 0)
                                return 1;
                        } else {
                            struct memblock_device ext_mem_223100;
                            
                            ext_mem_223100.references = NULL;
                            
                            struct memblock_device ext_mem_223099;
                            
                            ext_mem_223099.references = NULL;
                            
                            int32_t local_memory_capacity_226525;
                            
                            local_memory_capacity_226525 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_226525)) &&
                                suff_outer_par_206784) {
                                struct memblock_device mem_222911;
                                
                                mem_222911.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222911,
                                                          bytes_222910,
                                                          "mem_222911")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                          mem_222911,
                                                                          (int64_t) 0,
                                                                          ext_mem_222420,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          s_n_m_196745,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222915;
                                
                                mem_222915.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222915,
                                                          bytes_222914,
                                                          "mem_222915")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_222915,
                                                                          (int64_t) 0,
                                                                          ext_mem_222419,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          s_n_m_196745,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222919;
                                
                                mem_222919.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222919,
                                                          bytes_222918,
                                                          "mem_222919")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                          mem_222919,
                                                                          (int64_t) 0,
                                                                          ext_mem_222322,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_222919,
                                                              "mem_222919") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222923;
                                
                                mem_222923.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222923,
                                                          bytes_222922,
                                                          "mem_222923")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_222923,
                                                                          (int64_t) 0,
                                                                          mem_222588,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_222923,
                                                              "mem_222923") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222919,
                                                              "mem_222919") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222927;
                                
                                mem_222927.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222927,
                                                          bytes_222922,
                                                          "mem_222927")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_222927,
                                                                          (int64_t) 0,
                                                                          mem_222583,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_222927,
                                                              "mem_222927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222923,
                                                              "mem_222923") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222919,
                                                              "mem_222919") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222962;
                                
                                mem_222962.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222962,
                                                          bytes_222914,
                                                          "mem_222962")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_222966;
                                
                                mem_222966.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_222966,
                                                          bytes_222914,
                                                          "mem_222966")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device color_225041;
                                
                                color_225041.references = NULL;
                                if (memblock_alloc_device(ctx, &color_225041,
                                                          total_sizze_225167,
                                                          "color_225041")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device color_225042;
                                
                                color_225042.references = NULL;
                                if (memblock_alloc_device(ctx, &color_225042,
                                                          total_sizze_225168,
                                                          "color_225042")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        2,
                                                                        sizeof(n_p_196694),
                                                                        &n_p_196694));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        3,
                                                                        sizeof(q_s_196695),
                                                                        &q_s_196695));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        4,
                                                                        sizeof(jump_s_196701),
                                                                        &jump_s_196701));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        5,
                                                                        sizeof(defunc_0_f_res_196740),
                                                                        &defunc_0_f_res_196740));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        6,
                                                                        sizeof(pad_css_len_196741),
                                                                        &pad_css_len_196741));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        7,
                                                                        sizeof(s_n_m_196745),
                                                                        &s_n_m_196745));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        8,
                                                                        sizeof(num_groups_206780),
                                                                        &num_groups_206780));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        9,
                                                                        sizeof(num_threads_225166),
                                                                        &num_threads_225166));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        10,
                                                                        sizeof(ext_mem_222321.mem),
                                                                        &ext_mem_222321.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        11,
                                                                        sizeof(mem_222911.mem),
                                                                        &mem_222911.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        12,
                                                                        sizeof(mem_222915.mem),
                                                                        &mem_222915.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        13,
                                                                        sizeof(mem_222919.mem),
                                                                        &mem_222919.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        14,
                                                                        sizeof(mem_222923.mem),
                                                                        &mem_222923.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        15,
                                                                        sizeof(mem_222927.mem),
                                                                        &mem_222927.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        16,
                                                                        sizeof(mem_222962.mem),
                                                                        &mem_222962.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        17,
                                                                        sizeof(mem_222966.mem),
                                                                        &mem_222966.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        18,
                                                                        sizeof(color_225041.mem),
                                                                        &color_225041.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_206802,
                                                                        19,
                                                                        sizeof(color_225042.mem),
                                                                        &color_225042.mem));
                                if (1 * ((size_t) num_groups_206780 *
                                         (size_t) segmap_group_sizze_206779) !=
                                    0) {
                                    const size_t global_work_sizze_229897[1] =
                                                 {(size_t) num_groups_206780 *
                                                 (size_t) segmap_group_sizze_206779};
                                    const size_t local_work_sizze_229901[1] =
                                                 {(size_t) segmap_group_sizze_206779};
                                    int64_t time_start_229898 = 0,
                                            time_end_229899 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_206802",
                                                global_work_sizze_229897[0],
                                                local_work_sizze_229901[0],
                                                (int) 0);
                                        time_start_229898 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_206802,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_229897,
                                                                                    local_work_sizze_229901,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_206802_runs,
                                                                                                                              &ctx->mainzisegmap_206802_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_229899 = get_wall_time();
                                        
                                        long time_diff_229900 =
                                             time_end_229899 -
                                             time_start_229898;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_206802",
                                                time_diff_229900);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_222911,
                                                          "mem_222911") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222915,
                                                          "mem_222915") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222919,
                                                          "mem_222919") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222923,
                                                          "mem_222923") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222927,
                                                          "mem_222927") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225041,
                                                          "color_225041") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225042,
                                                          "color_225042") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223091;
                                
                                mem_223091.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223091,
                                                          bytes_222359,
                                                          "mem_223091")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223091,
                                                                          (int64_t) 0,
                                                                          mem_222962,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          m_196691 *
                                                                          n_p_196694,
                                                                          s_n_m_196745) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223091,
                                                              "mem_223091") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225042,
                                                              "color_225042") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225041,
                                                              "color_225041") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222966,
                                                              "mem_222966") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222962,
                                                              "mem_222962") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222927,
                                                              "mem_222927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222923,
                                                              "mem_222923") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222919,
                                                              "mem_222919") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                if (memblock_unref_device(ctx, &mem_222962,
                                                          "mem_222962") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223097;
                                
                                mem_223097.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223097,
                                                          bytes_222359,
                                                          "mem_223097")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223097,
                                                                          (int64_t) 0,
                                                                          mem_222966,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          m_196691 *
                                                                          n_p_196694,
                                                                          s_n_m_196745) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223097,
                                                              "mem_223097") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223091,
                                                              "mem_223091") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225042,
                                                              "color_225042") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225041,
                                                              "color_225041") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222966,
                                                              "mem_222966") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222962,
                                                              "mem_222962") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222927,
                                                              "mem_222927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222923,
                                                              "mem_222923") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222919,
                                                              "mem_222919") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222915,
                                                              "mem_222915") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222911,
                                                              "mem_222911") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223099,
                                                              "ext_mem_223099") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223100,
                                                              "ext_mem_223100") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223113,
                                                              "ext_mem_223113") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223114,
                                                              "ext_mem_223114") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                if (memblock_unref_device(ctx, &mem_222966,
                                                          "mem_222966") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223100,
                                                        &mem_223091,
                                                        "mem_223091") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223099,
                                                        &mem_223097,
                                                        "mem_223097") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223097,
                                                          "mem_223097") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223091,
                                                          "mem_223091") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225042,
                                                          "color_225042") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225041,
                                                          "color_225041") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222966,
                                                          "mem_222966") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222962,
                                                          "mem_222962") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222927,
                                                          "mem_222927") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222923,
                                                          "mem_222923") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222919,
                                                          "mem_222919") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222915,
                                                          "mem_222915") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222911,
                                                          "mem_222911") != 0)
                                    return 1;
                            } else {
                                struct memblock_device ext_mem_223086;
                                
                                ext_mem_223086.references = NULL;
                                
                                struct memblock_device ext_mem_223085;
                                
                                ext_mem_223085.references = NULL;
                                
                                int32_t local_memory_capacity_226524;
                                
                                local_memory_capacity_226524 =
                                    ctx->opencl.max_local_memory;
                                if (sle64(bytes_222368 + srem64((int64_t) 8 -
                                                                srem64(bytes_222368,
                                                                       (int64_t) 8),
                                                                (int64_t) 8) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222371 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222371,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222972 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222972,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)) + ((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695) +
                                                                   srem64((int64_t) 8 -
                                                                          srem64((int64_t) 4 *
                                                                                 (s_n_m_196745 *
                                                                                  q_s_196695),
                                                                                 (int64_t) 8),
                                                                          (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)) + ((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695) +
                                                                   srem64((int64_t) 8 -
                                                                          srem64((int64_t) 4 *
                                                                                 (s_n_m_196745 *
                                                                                  q_s_196695),
                                                                                 (int64_t) 8),
                                                                          (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)),
                                          sext_i32_i64(local_memory_capacity_226524)) &&
                                    intra_suff_and_fits_206795) {
                                    struct memblock_device mem_223008;
                                    
                                    mem_223008.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_223008,
                                                              bytes_222359,
                                                              "mem_223008")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device mem_223013;
                                    
                                    mem_223013.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_223013,
                                                              bytes_222359,
                                                              "mem_223013")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            6,
                                                                            (size_t) bytes_222972,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            7,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            8,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            9,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            10,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            11,
                                                                            (size_t) bytes_222371,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            12,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            13,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            14,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            15,
                                                                            sizeof(n_p_196694),
                                                                            &n_p_196694));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            16,
                                                                            sizeof(q_s_196695),
                                                                            &q_s_196695));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            17,
                                                                            sizeof(jump_s_196701),
                                                                            &jump_s_196701));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            18,
                                                                            sizeof(defunc_0_f_res_196740),
                                                                            &defunc_0_f_res_196740));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            19,
                                                                            sizeof(pad_css_len_196741),
                                                                            &pad_css_len_196741));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            20,
                                                                            sizeof(s_n_m_196745),
                                                                            &s_n_m_196745));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            21,
                                                                            sizeof(computed_group_sizze_206788),
                                                                            &computed_group_sizze_206788));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            22,
                                                                            sizeof(ext_mem_222321.mem),
                                                                            &ext_mem_222321.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            23,
                                                                            sizeof(ext_mem_222322.mem),
                                                                            &ext_mem_222322.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            24,
                                                                            sizeof(ext_mem_222419.mem),
                                                                            &ext_mem_222419.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            25,
                                                                            sizeof(ext_mem_222420.mem),
                                                                            &ext_mem_222420.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            26,
                                                                            sizeof(mem_222583.mem),
                                                                            &mem_222583.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            27,
                                                                            sizeof(mem_222588.mem),
                                                                            &mem_222588.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            28,
                                                                            sizeof(mem_223008.mem),
                                                                            &mem_223008.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_206919,
                                                                            29,
                                                                            sizeof(mem_223013.mem),
                                                                            &mem_223013.mem));
                                    if (1 * ((size_t) binop_x_222259 *
                                             (size_t) computed_group_sizze_206788) !=
                                        0) {
                                        const size_t global_work_sizze_229902[1]
                                                     =
                                                     {(size_t) binop_x_222259 *
                                                     (size_t) computed_group_sizze_206788};
                                        const size_t local_work_sizze_229906[1]
                                                     =
                                                     {(size_t) computed_group_sizze_206788};
                                        int64_t time_start_229903 = 0,
                                                time_end_229904 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segmap_intragroup_206919",
                                                    global_work_sizze_229902[0],
                                                    local_work_sizze_229906[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           bytes_222972 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222371 +
                                                           bytes_222368 +
                                                           bytes_222368));
                                            time_start_229903 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegmap_intragroup_206919,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_229902,
                                                                                        local_work_sizze_229906,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegmap_intragroup_206919_runs,
                                                                                                                                  &ctx->mainzisegmap_intragroup_206919_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_229904 = get_wall_time();
                                            
                                            long time_diff_229905 =
                                                 time_end_229904 -
                                                 time_start_229903;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segmap_intragroup_206919",
                                                    time_diff_229905);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223086,
                                                            &mem_223008,
                                                            "mem_223008") != 0)
                                        return 1;
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223085,
                                                            &mem_223013,
                                                            "mem_223013") != 0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223013,
                                                              "mem_223013") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223008,
                                                              "mem_223008") !=
                                        0)
                                        return 1;
                                } else {
                                    int64_t segmap_usable_groups_207065 =
                                            sdiv_up64(nest_sizze_201931,
                                                      segmap_group_sizze_207064);
                                    struct memblock_device ext_mem_223084;
                                    
                                    ext_mem_223084.references = NULL;
                                    
                                    struct memblock_device ext_mem_223083;
                                    
                                    ext_mem_223083.references = NULL;
                                    
                                    int32_t local_memory_capacity_226523;
                                    
                                    local_memory_capacity_226523 =
                                        ctx->opencl.max_local_memory;
                                    if (sle64((int64_t) 0,
                                              sext_i32_i64(local_memory_capacity_226523)) &&
                                        suff_outer_par_207069) {
                                        struct memblock_device mem_223019;
                                        
                                        mem_223019.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223019,
                                                                  bytes_222359,
                                                                  "mem_223019")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223024;
                                        
                                        mem_223024.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223024,
                                                                  bytes_222359,
                                                                  "mem_223024")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                3,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                4,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                5,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                6,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                7,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                8,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                9,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                10,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                11,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                12,
                                                                                sizeof(mem_222583.mem),
                                                                                &mem_222583.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                13,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                14,
                                                                                sizeof(mem_223019.mem),
                                                                                &mem_223019.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207077,
                                                                                15,
                                                                                sizeof(mem_223024.mem),
                                                                                &mem_223024.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_207065 *
                                             (size_t) segmap_group_sizze_207064) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229907[1] =
                                            {(size_t) segmap_usable_groups_207065 *
                                            (size_t) segmap_group_sizze_207064};
                                            const size_t
                                            local_work_sizze_229911[1] =
                                            {(size_t) segmap_group_sizze_207064};
                                            int64_t time_start_229908 = 0,
                                                    time_end_229909 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_207077",
                                                        global_work_sizze_229907[0],
                                                        local_work_sizze_229911[0],
                                                        (int) 0);
                                                time_start_229908 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_207077,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229907,
                                                                                            local_work_sizze_229911,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_207077_runs,
                                                                                                                                      &ctx->mainzisegmap_207077_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229909 =
                                                    get_wall_time();
                                                
                                                long time_diff_229910 =
                                                     time_end_229909 -
                                                     time_start_229908;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_207077",
                                                        time_diff_229910);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223084,
                                                                &mem_223019,
                                                                "mem_223019") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223083,
                                                                &mem_223024,
                                                                "mem_223024") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223024,
                                                                  "mem_223024") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223019,
                                                                  "mem_223019") !=
                                            0)
                                            return 1;
                                    } else {
                                        int64_t segmap_usable_groups_207188 =
                                                sdiv_up64(nest_sizze_201931,
                                                          segmap_group_sizze_207187);
                                        struct memblock_device mem_223030;
                                        
                                        mem_223030.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223030,
                                                                  bytes_222354,
                                                                  "mem_223030")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223034;
                                        
                                        mem_223034.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223034,
                                                                  bytes_223033,
                                                                  "mem_223034")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                3,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                4,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                5,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                7,
                                                                                sizeof(mem_223030.mem),
                                                                                &mem_223030.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207194,
                                                                                8,
                                                                                sizeof(mem_223034.mem),
                                                                                &mem_223034.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_207188 *
                                             (size_t) segmap_group_sizze_207187) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229912[1] =
                                            {(size_t) segmap_usable_groups_207188 *
                                            (size_t) segmap_group_sizze_207187};
                                            const size_t
                                            local_work_sizze_229916[1] =
                                            {(size_t) segmap_group_sizze_207187};
                                            int64_t time_start_229913 = 0,
                                                    time_end_229914 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_207194",
                                                        global_work_sizze_229912[0],
                                                        local_work_sizze_229916[0],
                                                        (int) 0);
                                                time_start_229913 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_207194,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229912,
                                                                                            local_work_sizze_229916,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_207194_runs,
                                                                                                                                      &ctx->mainzisegmap_207194_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229914 =
                                                    get_wall_time();
                                                
                                                long time_diff_229915 =
                                                     time_end_229914 -
                                                     time_start_229913;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_207194",
                                                        time_diff_229915);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223034,
                                                                  "mem_223034") !=
                                            0)
                                            return 1;
                                        
                                        struct memblock_device mem_223040;
                                        
                                        mem_223040.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223040,
                                                                  bytes_222359,
                                                                  "mem_223040")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223045;
                                        
                                        mem_223045.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223045,
                                                                  bytes_222359,
                                                                  "mem_223045")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223050;
                                        
                                        mem_223050.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223050,
                                                                  bytes_222359,
                                                                  "mem_223050")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (slt64(q_s_196695 * (int64_t) 2,
                                                  segred_group_sizze_207210)) {
                                            int64_t
                                            segment_sizze_nonzzero_226317 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226318 =
                                                    num_groups_207211 *
                                                    segred_group_sizze_207210;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-small");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segments_per_group",
                                                        (long long) squot64(segred_group_sizze_207210,
                                                                            segment_sizze_nonzzero_226317),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "required_groups",
                                                        (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                           n_p_196694 *
                                                                                           s_n_m_196745,
                                                                                           squot64(segred_group_sizze_207210,
                                                                                                   segment_sizze_nonzzero_226317))),
                                                        '\n');
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    1,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    4,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    5,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    6,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    7,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    8,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    9,
                                                                                    sizeof(num_groups_207211),
                                                                                    &num_groups_207211));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    10,
                                                                                    sizeof(segment_sizze_nonzzero_226317),
                                                                                    &segment_sizze_nonzzero_226317));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    11,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    12,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    13,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    14,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    15,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    16,
                                                                                    sizeof(mem_223030.mem),
                                                                                    &mem_223030.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    17,
                                                                                    sizeof(mem_223040.mem),
                                                                                    &mem_223040.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    18,
                                                                                    sizeof(mem_223045.mem),
                                                                                    &mem_223045.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207220,
                                                                                    19,
                                                                                    sizeof(mem_223050.mem),
                                                                                    &mem_223050.mem));
                                            if (1 *
                                                ((size_t) num_groups_207211 *
                                                 (size_t) segred_group_sizze_207210) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229917[1] =
                                                {(size_t) num_groups_207211 *
                                                (size_t) segred_group_sizze_207210};
                                                const size_t
                                                local_work_sizze_229921[1] =
                                                {(size_t) segred_group_sizze_207210};
                                                int64_t time_start_229918 = 0,
                                                        time_end_229919 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_small_207220",
                                                            global_work_sizze_229917[0],
                                                            local_work_sizze_229921[0],
                                                            (int) (0 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210));
                                                    time_start_229918 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_small_207220,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229917,
                                                                                                local_work_sizze_229921,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_small_207220_runs,
                                                                                                                                          &ctx->mainzisegred_small_207220_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229919 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229920 =
                                                         time_end_229919 -
                                                         time_start_229918;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_small_207220",
                                                            time_diff_229920);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226360 =
                                                    sdiv_up64(num_groups_207211,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226361 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_207210 *
                                                              groups_per_segment_226360);
                                            int64_t virt_num_groups_226362 =
                                                    groups_per_segment_226360 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226363 =
                                                    num_groups_207211 *
                                                    segred_group_sizze_207210;
                                            int64_t threads_per_segment_226364 =
                                                    groups_per_segment_226360 *
                                                    segred_group_sizze_207210;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-large");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "virt_num_groups",
                                                        (long long) virt_num_groups_226362,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_groups",
                                                        (long long) num_groups_207211,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "group_size",
                                                        (long long) segred_group_sizze_207210,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "elems_per_thread",
                                                        (long long) elements_per_thread_226361,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226360,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226365;
                                            
                                            segred_tmp_mem_226365.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226365,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226362,
                                                                      "segred_tmp_mem_226365")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226367;
                                            
                                            segred_tmp_mem_226367.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226367,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226362,
                                                                      "segred_tmp_mem_226367")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226369;
                                            
                                            segred_tmp_mem_226369.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226369,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226362,
                                                                      "segred_tmp_mem_226369")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226371 =
                                            ctx->mainzicounter_mem_226371;
                                            
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    1,
                                                                                    (size_t) 1,
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    4,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207210),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    5,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    6,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    7,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    8,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    9,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    10,
                                                                                    sizeof(num_groups_207211),
                                                                                    &num_groups_207211));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    11,
                                                                                    sizeof(groups_per_segment_226360),
                                                                                    &groups_per_segment_226360));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    12,
                                                                                    sizeof(elements_per_thread_226361),
                                                                                    &elements_per_thread_226361));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    13,
                                                                                    sizeof(virt_num_groups_226362),
                                                                                    &virt_num_groups_226362));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    14,
                                                                                    sizeof(threads_per_segment_226364),
                                                                                    &threads_per_segment_226364));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    15,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    16,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    17,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    18,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    19,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    20,
                                                                                    sizeof(mem_223030.mem),
                                                                                    &mem_223030.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    21,
                                                                                    sizeof(mem_223040.mem),
                                                                                    &mem_223040.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    22,
                                                                                    sizeof(mem_223045.mem),
                                                                                    &mem_223045.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    23,
                                                                                    sizeof(mem_223050.mem),
                                                                                    &mem_223050.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    24,
                                                                                    sizeof(segred_tmp_mem_226365.mem),
                                                                                    &segred_tmp_mem_226365.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    25,
                                                                                    sizeof(segred_tmp_mem_226367.mem),
                                                                                    &segred_tmp_mem_226367.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    26,
                                                                                    sizeof(segred_tmp_mem_226369.mem),
                                                                                    &segred_tmp_mem_226369.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207220,
                                                                                    27,
                                                                                    sizeof(mainzicounter_mem_226371.mem),
                                                                                    &mainzicounter_mem_226371.mem));
                                            if (1 *
                                                ((size_t) num_groups_207211 *
                                                 (size_t) segred_group_sizze_207210) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229923[1] =
                                                {(size_t) num_groups_207211 *
                                                (size_t) segred_group_sizze_207210};
                                                const size_t
                                                local_work_sizze_229927[1] =
                                                {(size_t) segred_group_sizze_207210};
                                                int64_t time_start_229924 = 0,
                                                        time_end_229925 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_large_207220",
                                                            global_work_sizze_229923[0],
                                                            local_work_sizze_229927[0],
                                                            (int) (0 + 1 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207210));
                                                    time_start_229924 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_large_207220,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229923,
                                                                                                local_work_sizze_229927,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_large_207220_runs,
                                                                                                                                          &ctx->mainzisegred_large_207220_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229925 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229926 =
                                                         time_end_229925 -
                                                         time_start_229924;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_large_207220",
                                                            time_diff_229926);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226369,
                                                                      "segred_tmp_mem_226369") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226367,
                                                                      "segred_tmp_mem_226367") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226365,
                                                                      "segred_tmp_mem_226365") !=
                                                0)
                                                return 1;
                                        }
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223030,
                                                                  "mem_223030") !=
                                            0)
                                            return 1;
                                        
                                        int64_t segmap_usable_groups_207270 =
                                                sdiv_up64(nest_sizze_201931,
                                                          segmap_group_sizze_207269);
                                        struct memblock_device mem_223056;
                                        
                                        mem_223056.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223056,
                                                                  bytes_222359,
                                                                  "mem_223056")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223061;
                                        
                                        mem_223061.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223061,
                                                                  bytes_222359,
                                                                  "mem_223061")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223066;
                                        
                                        mem_223066.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223066,
                                                                  bytes_222359,
                                                                  "mem_223066")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223071;
                                        
                                        mem_223071.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223071,
                                                                  bytes_222354,
                                                                  "mem_223071")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                3,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                4,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                5,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                7,
                                                                                sizeof(mem_223040.mem),
                                                                                &mem_223040.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                8,
                                                                                sizeof(mem_223045.mem),
                                                                                &mem_223045.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                9,
                                                                                sizeof(mem_223050.mem),
                                                                                &mem_223050.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                10,
                                                                                sizeof(mem_223056.mem),
                                                                                &mem_223056.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                11,
                                                                                sizeof(mem_223061.mem),
                                                                                &mem_223061.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                12,
                                                                                sizeof(mem_223066.mem),
                                                                                &mem_223066.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207278,
                                                                                13,
                                                                                sizeof(mem_223071.mem),
                                                                                &mem_223071.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_207270 *
                                             (size_t) segmap_group_sizze_207269) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229928[1] =
                                            {(size_t) segmap_usable_groups_207270 *
                                            (size_t) segmap_group_sizze_207269};
                                            const size_t
                                            local_work_sizze_229932[1] =
                                            {(size_t) segmap_group_sizze_207269};
                                            int64_t time_start_229929 = 0,
                                                    time_end_229930 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_207278",
                                                        global_work_sizze_229928[0],
                                                        local_work_sizze_229932[0],
                                                        (int) 0);
                                                time_start_229929 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_207278,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229928,
                                                                                            local_work_sizze_229932,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_207278_runs,
                                                                                                                                      &ctx->mainzisegmap_207278_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229930 =
                                                    get_wall_time();
                                                
                                                long time_diff_229931 =
                                                     time_end_229930 -
                                                     time_start_229929;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_207278",
                                                        time_diff_229931);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223040,
                                                                  "mem_223040") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223045,
                                                                  "mem_223045") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223050,
                                                                  "mem_223050") !=
                                            0)
                                            return 1;
                                        
                                        struct memblock_device mem_223077;
                                        
                                        mem_223077.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223077,
                                                                  bytes_222359,
                                                                  "mem_223077")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223082;
                                        
                                        mem_223082.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223082,
                                                                  bytes_222359,
                                                                  "mem_223082")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (slt64(q_s_196695 * (int64_t) 2,
                                                  segred_group_sizze_207305)) {
                                            int64_t
                                            segment_sizze_nonzzero_226433 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226434 =
                                                    num_groups_207306 *
                                                    segred_group_sizze_207305;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-small");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segments_per_group",
                                                        (long long) squot64(segred_group_sizze_207305,
                                                                            segment_sizze_nonzzero_226433),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "required_groups",
                                                        (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                           n_p_196694 *
                                                                                           s_n_m_196745,
                                                                                           squot64(segred_group_sizze_207305,
                                                                                                   segment_sizze_nonzzero_226433))),
                                                        '\n');
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    1,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207305),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207305),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    3,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    4,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    5,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    6,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    7,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    8,
                                                                                    sizeof(num_groups_207306),
                                                                                    &num_groups_207306));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    9,
                                                                                    sizeof(segment_sizze_nonzzero_226433),
                                                                                    &segment_sizze_nonzzero_226433));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    10,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    11,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    12,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    13,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    14,
                                                                                    sizeof(mem_222583.mem),
                                                                                    &mem_222583.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    15,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    16,
                                                                                    sizeof(mem_223056.mem),
                                                                                    &mem_223056.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    17,
                                                                                    sizeof(mem_223061.mem),
                                                                                    &mem_223061.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    18,
                                                                                    sizeof(mem_223066.mem),
                                                                                    &mem_223066.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    19,
                                                                                    sizeof(mem_223071.mem),
                                                                                    &mem_223071.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    20,
                                                                                    sizeof(mem_223077.mem),
                                                                                    &mem_223077.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_207314,
                                                                                    21,
                                                                                    sizeof(mem_223082.mem),
                                                                                    &mem_223082.mem));
                                            if (1 *
                                                ((size_t) num_groups_207306 *
                                                 (size_t) segred_group_sizze_207305) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229933[1] =
                                                {(size_t) num_groups_207306 *
                                                (size_t) segred_group_sizze_207305};
                                                const size_t
                                                local_work_sizze_229937[1] =
                                                {(size_t) segred_group_sizze_207305};
                                                int64_t time_start_229934 = 0,
                                                        time_end_229935 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_small_207314",
                                                            global_work_sizze_229933[0],
                                                            local_work_sizze_229937[0],
                                                            (int) (0 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207305 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207305));
                                                    time_start_229934 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_small_207314,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229933,
                                                                                                local_work_sizze_229937,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_small_207314_runs,
                                                                                                                                          &ctx->mainzisegred_small_207314_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229935 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229936 =
                                                         time_end_229935 -
                                                         time_start_229934;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_small_207314",
                                                            time_diff_229936);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226470 =
                                                    sdiv_up64(num_groups_207306,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226471 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_207305 *
                                                              groups_per_segment_226470);
                                            int64_t virt_num_groups_226472 =
                                                    groups_per_segment_226470 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226473 =
                                                    num_groups_207306 *
                                                    segred_group_sizze_207305;
                                            int64_t threads_per_segment_226474 =
                                                    groups_per_segment_226470 *
                                                    segred_group_sizze_207305;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-large");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "virt_num_groups",
                                                        (long long) virt_num_groups_226472,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_groups",
                                                        (long long) num_groups_207306,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "group_size",
                                                        (long long) segred_group_sizze_207305,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "elems_per_thread",
                                                        (long long) elements_per_thread_226471,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226470,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226475;
                                            
                                            segred_tmp_mem_226475.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226475,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226472,
                                                                      "segred_tmp_mem_226475")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226477;
                                            
                                            segred_tmp_mem_226477.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226477,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226472,
                                                                      "segred_tmp_mem_226477")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226479 =
                                            ctx->mainzicounter_mem_226479;
                                            
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    1,
                                                                                    (size_t) 1,
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207305),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_207305),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    4,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    5,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    6,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    7,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    8,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    9,
                                                                                    sizeof(num_groups_207306),
                                                                                    &num_groups_207306));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    10,
                                                                                    sizeof(groups_per_segment_226470),
                                                                                    &groups_per_segment_226470));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    11,
                                                                                    sizeof(elements_per_thread_226471),
                                                                                    &elements_per_thread_226471));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    12,
                                                                                    sizeof(virt_num_groups_226472),
                                                                                    &virt_num_groups_226472));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    13,
                                                                                    sizeof(threads_per_segment_226474),
                                                                                    &threads_per_segment_226474));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    14,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    15,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    16,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    17,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    18,
                                                                                    sizeof(mem_222583.mem),
                                                                                    &mem_222583.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    19,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    20,
                                                                                    sizeof(mem_223056.mem),
                                                                                    &mem_223056.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    21,
                                                                                    sizeof(mem_223061.mem),
                                                                                    &mem_223061.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    22,
                                                                                    sizeof(mem_223066.mem),
                                                                                    &mem_223066.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    23,
                                                                                    sizeof(mem_223071.mem),
                                                                                    &mem_223071.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    24,
                                                                                    sizeof(mem_223077.mem),
                                                                                    &mem_223077.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    25,
                                                                                    sizeof(mem_223082.mem),
                                                                                    &mem_223082.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    26,
                                                                                    sizeof(segred_tmp_mem_226475.mem),
                                                                                    &segred_tmp_mem_226475.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    27,
                                                                                    sizeof(segred_tmp_mem_226477.mem),
                                                                                    &segred_tmp_mem_226477.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_207314,
                                                                                    28,
                                                                                    sizeof(mainzicounter_mem_226479.mem),
                                                                                    &mainzicounter_mem_226479.mem));
                                            if (1 *
                                                ((size_t) num_groups_207306 *
                                                 (size_t) segred_group_sizze_207305) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229939[1] =
                                                {(size_t) num_groups_207306 *
                                                (size_t) segred_group_sizze_207305};
                                                const size_t
                                                local_work_sizze_229943[1] =
                                                {(size_t) segred_group_sizze_207305};
                                                int64_t time_start_229940 = 0,
                                                        time_end_229941 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_large_207314",
                                                            global_work_sizze_229939[0],
                                                            local_work_sizze_229943[0],
                                                            (int) (0 + 1 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207305 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_207305));
                                                    time_start_229940 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_large_207314,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229939,
                                                                                                local_work_sizze_229943,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_large_207314_runs,
                                                                                                                                          &ctx->mainzisegred_large_207314_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229941 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229942 =
                                                         time_end_229941 -
                                                         time_start_229940;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_large_207314",
                                                            time_diff_229942);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226477,
                                                                      "segred_tmp_mem_226477") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226475,
                                                                      "segred_tmp_mem_226475") !=
                                                0)
                                                return 1;
                                        }
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223056,
                                                                  "mem_223056") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223061,
                                                                  "mem_223061") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223066,
                                                                  "mem_223066") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223071,
                                                                  "mem_223071") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223084,
                                                                &mem_223077,
                                                                "mem_223077") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223083,
                                                                &mem_223082,
                                                                "mem_223082") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223082,
                                                                  "mem_223082") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223077,
                                                                  "mem_223077") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223071,
                                                                  "mem_223071") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223066,
                                                                  "mem_223066") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223061,
                                                                  "mem_223061") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223056,
                                                                  "mem_223056") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223050,
                                                                  "mem_223050") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223045,
                                                                  "mem_223045") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223040,
                                                                  "mem_223040") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223034,
                                                                  "mem_223034") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223030,
                                                                  "mem_223030") !=
                                            0)
                                            return 1;
                                    }
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223086,
                                                            &ext_mem_223084,
                                                            "ext_mem_223084") !=
                                        0)
                                        return 1;
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223085,
                                                            &ext_mem_223083,
                                                            "ext_mem_223083") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223083,
                                                              "ext_mem_223083") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223084,
                                                              "ext_mem_223084") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_set_device(ctx, &ext_mem_223100,
                                                        &ext_mem_223086,
                                                        "ext_mem_223086") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223099,
                                                        &ext_mem_223085,
                                                        "ext_mem_223085") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223085,
                                                          "ext_mem_223085") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223086,
                                                          "ext_mem_223086") !=
                                    0)
                                    return 1;
                            }
                            if (memblock_set_device(ctx, &ext_mem_223114,
                                                    &ext_mem_223100,
                                                    "ext_mem_223100") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223113,
                                                    &ext_mem_223099,
                                                    "ext_mem_223099") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223099,
                                                      "ext_mem_223099") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223100,
                                                      "ext_mem_223100") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_223475,
                                                &ext_mem_223114,
                                                "ext_mem_223114") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223474,
                                                &ext_mem_223113,
                                                "ext_mem_223113") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223113,
                                                  "ext_mem_223113") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223114,
                                                  "ext_mem_223114") != 0)
                            return 1;
                    } else {
                        bool suff_outer_par_207385;
                        
                        suff_outer_par_207385 =
                            *ctx->tuning_params.mainzisuff_outer_par_15 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_15", (long) m_196691,
                                    suff_outer_par_207385 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_207547;
                        
                        segmap_group_sizze_207547 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_207389;
                        
                        int64_t num_groups_207548;
                        int32_t max_num_groups_226527;
                        
                        max_num_groups_226527 =
                            *ctx->tuning_params.mainzisegmap_num_groups_207391;
                        num_groups_207548 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_207547),
                                                                       sext_i32_i64(max_num_groups_226527))));
                        
                        int64_t segmap_group_sizze_209322;
                        
                        segmap_group_sizze_209322 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_207709;
                        
                        int64_t num_groups_209323;
                        int32_t max_num_groups_226528;
                        
                        max_num_groups_226528 =
                            *ctx->tuning_params.mainzisegmap_num_groups_207711;
                        num_groups_209323 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(binop_x_222259,
                                                                                 segmap_group_sizze_209322),
                                                                       sext_i32_i64(max_num_groups_226528))));
                        
                        bool suff_outer_par_209327;
                        
                        suff_outer_par_209327 =
                            *ctx->tuning_params.mainzisuff_outer_par_16 <=
                            binop_x_222259;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_16",
                                    (long) binop_x_222259,
                                    suff_outer_par_209327 ? "true" : "false");
                        
                        int64_t one_intra_par_min_209328 = q_s_196695 *
                                s_n_m_196745;
                        int64_t intra_avail_par_209330 = smin64(s_n_m_196745,
                                                                one_intra_par_min_209328);
                        int64_t computed_group_sizze_209331 =
                                smax64(s_n_m_196745, one_intra_par_min_209328);
                        bool fits_209335 = sle64(computed_group_sizze_209331,
                                                 max_group_sizze_199970);
                        bool suff_intra_par_209337;
                        
                        suff_intra_par_209337 =
                            *ctx->tuning_params.mainzisuff_intra_par_17 <=
                            intra_avail_par_209330;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_intra_par_17",
                                    (long) intra_avail_par_209330,
                                    suff_intra_par_209337 ? "true" : "false");
                        
                        bool intra_suff_and_fits_209338 = fits_209335 &&
                             suff_intra_par_209337;
                        int64_t segmap_group_sizze_209677;
                        
                        segmap_group_sizze_209677 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_208250;
                        
                        bool suff_outer_par_209682;
                        
                        suff_outer_par_209682 =
                            *ctx->tuning_params.mainzisuff_outer_par_18 <=
                            nest_sizze_201931;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_18",
                                    (long) nest_sizze_201931,
                                    suff_outer_par_209682 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_209832;
                        
                        segmap_group_sizze_209832 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_208667;
                        
                        int64_t nest_sizze_209854 = q_s_196695 *
                                nest_sizze_201931;
                        int64_t segred_group_sizze_209855;
                        
                        segred_group_sizze_209855 =
                            *ctx->tuning_params.mainzisegred_group_sizze_208595;
                        
                        int64_t num_groups_209856;
                        int32_t max_num_groups_226529;
                        
                        max_num_groups_226529 =
                            *ctx->tuning_params.mainzisegred_num_groups_208597;
                        num_groups_209856 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_209854,
                                                                                 segred_group_sizze_209855),
                                                                       sext_i32_i64(max_num_groups_226529))));
                        
                        int64_t segmap_group_sizze_209924;
                        
                        segmap_group_sizze_209924 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_208537;
                        
                        int64_t segred_group_sizze_209981;
                        
                        segred_group_sizze_209981 =
                            *ctx->tuning_params.mainzisegred_group_sizze_208426;
                        
                        int64_t num_groups_209982;
                        int32_t max_num_groups_226530;
                        
                        max_num_groups_226530 =
                            *ctx->tuning_params.mainzisegred_num_groups_208428;
                        num_groups_209982 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_209854,
                                                                                 segred_group_sizze_209981),
                                                                       sext_i32_i64(max_num_groups_226530))));
                        
                        int64_t bytes_223117 = (int64_t) 4 * nest_sizze_201931;
                        int64_t bytes_223124 = (int64_t) 4 * nest_sizze_200246;
                        int64_t bytes_223128 = (int64_t) 8 * nest_sizze_201931;
                        int64_t bytes_223136 = (int64_t) 8 * nest_sizze_200246;
                        int64_t binop_x_223235 = m_196691 * s_n_m_196745;
                        int64_t binop_x_223236 = n_p_196694 * binop_x_223235;
                        int64_t bytes_223237 = (int64_t) 8 * binop_x_223236;
                        int64_t bytes_223241 = (int64_t) 4 * binop_x_223236;
                        int64_t binop_x_223243 = m_196691 *
                                defunc_0_f_res_196740;
                        int64_t binop_x_223244 = n_p_196694 * binop_x_223243;
                        int64_t bytes_223245 = (int64_t) 8 * binop_x_223244;
                        int64_t bytes_223249 = (int64_t) 4 * binop_x_223244;
                        int64_t bytes_223299 = smax64((int64_t) 0,
                                                      s_n_m_196745);
                        int64_t bytes_223372 = smax64((int64_t) 0,
                                                      binop_x_222352);
                        int64_t num_threads_225175 = segmap_group_sizze_207547 *
                                num_groups_207548;
                        int64_t total_sizze_225176 = bytes_222345 *
                                num_threads_225175;
                        int64_t total_sizze_225177 = bytes_222345 *
                                num_threads_225175;
                        int64_t num_threads_225178 = segmap_group_sizze_209322 *
                                num_groups_209323;
                        int64_t total_sizze_225179 = bytes_222368 *
                                num_threads_225178;
                        int64_t total_sizze_225180 = bytes_222368 *
                                num_threads_225178;
                        struct memblock_device ext_mem_223473;
                        
                        ext_mem_223473.references = NULL;
                        
                        struct memblock_device ext_mem_223472;
                        
                        ext_mem_223472.references = NULL;
                        
                        int32_t local_memory_capacity_226951;
                        
                        local_memory_capacity_226951 =
                            ctx->opencl.max_local_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_226951)) &&
                            suff_outer_par_207385) {
                            struct memblock_device mem_223118;
                            
                            mem_223118.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223118,
                                                      bytes_223117,
                                                      "mem_223118")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223118,
                                                                      (int64_t) 0,
                                                                      ext_mem_222419,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      s_n_m_196745,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223121;
                            
                            mem_223121.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223121,
                                                      binop_y_222281,
                                                      "mem_223121")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_223121,
                                                                      (int64_t) 0,
                                                                      ext_mem_222321,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223125;
                            
                            mem_223125.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223125,
                                                      bytes_223124,
                                                      "mem_223125")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223125,
                                                                      (int64_t) 0,
                                                                      mem_222588,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223129;
                            
                            mem_223129.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223129,
                                                      bytes_223128,
                                                      "mem_223129")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_223129,
                                                                      (int64_t) 0,
                                                                      ext_mem_222420,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      s_n_m_196745,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223129,
                                                          "mem_223129") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223133;
                            
                            mem_223133.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223133,
                                                      bytes_223124,
                                                      "mem_223133")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223133,
                                                                      (int64_t) 0,
                                                                      mem_222583,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223133,
                                                          "mem_223133") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223129,
                                                          "mem_223129") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223137;
                            
                            mem_223137.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223137,
                                                      bytes_223136,
                                                      "mem_223137")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_223137,
                                                                      (int64_t) 0,
                                                                      ext_mem_222322,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_p_196694 *
                                                                      defunc_0_f_res_196740,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223137,
                                                          "mem_223137") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223133,
                                                          "mem_223133") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223129,
                                                          "mem_223129") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223230;
                            
                            mem_223230.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223230,
                                                      bytes_223117,
                                                      "mem_223230")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223234;
                            
                            mem_223234.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223234,
                                                      bytes_223117,
                                                      "mem_223234")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225051;
                            
                            color_225051.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225051,
                                                      total_sizze_225176,
                                                      "color_225051")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225052;
                            
                            color_225052.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225052,
                                                      total_sizze_225177,
                                                      "color_225052")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    2,
                                                                    sizeof(n_p_196694),
                                                                    &n_p_196694));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    3,
                                                                    sizeof(q_s_196695),
                                                                    &q_s_196695));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    4,
                                                                    sizeof(jump_s_196701),
                                                                    &jump_s_196701));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    5,
                                                                    sizeof(defunc_0_f_res_196740),
                                                                    &defunc_0_f_res_196740));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    6,
                                                                    sizeof(pad_css_len_196741),
                                                                    &pad_css_len_196741));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    7,
                                                                    sizeof(s_n_m_196745),
                                                                    &s_n_m_196745));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    8,
                                                                    sizeof(num_groups_207548),
                                                                    &num_groups_207548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    9,
                                                                    sizeof(num_threads_225175),
                                                                    &num_threads_225175));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    10,
                                                                    sizeof(mem_223118.mem),
                                                                    &mem_223118.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    11,
                                                                    sizeof(mem_223121.mem),
                                                                    &mem_223121.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    12,
                                                                    sizeof(mem_223125.mem),
                                                                    &mem_223125.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    13,
                                                                    sizeof(mem_223129.mem),
                                                                    &mem_223129.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    14,
                                                                    sizeof(mem_223133.mem),
                                                                    &mem_223133.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    15,
                                                                    sizeof(mem_223137.mem),
                                                                    &mem_223137.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    16,
                                                                    sizeof(mem_223230.mem),
                                                                    &mem_223230.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    17,
                                                                    sizeof(mem_223234.mem),
                                                                    &mem_223234.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    18,
                                                                    sizeof(color_225051.mem),
                                                                    &color_225051.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_207553,
                                                                    19,
                                                                    sizeof(color_225052.mem),
                                                                    &color_225052.mem));
                            if (1 * ((size_t) num_groups_207548 *
                                     (size_t) segmap_group_sizze_207547) != 0) {
                                const size_t global_work_sizze_229944[1] =
                                             {(size_t) num_groups_207548 *
                                             (size_t) segmap_group_sizze_207547};
                                const size_t local_work_sizze_229948[1] =
                                             {(size_t) segmap_group_sizze_207547};
                                int64_t time_start_229945 = 0, time_end_229946 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_207553",
                                            global_work_sizze_229944[0],
                                            local_work_sizze_229948[0],
                                            (int) 0);
                                    time_start_229945 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_207553,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_229944,
                                                                                local_work_sizze_229948,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_207553_runs,
                                                                                                                          &ctx->mainzisegmap_207553_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_229946 = get_wall_time();
                                    
                                    long time_diff_229947 = time_end_229946 -
                                         time_start_229945;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_207553",
                                            time_diff_229947);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_223118,
                                                      "mem_223118") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223121,
                                                      "mem_223121") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223125,
                                                      "mem_223125") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223129,
                                                      "mem_223129") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223133,
                                                      "mem_223133") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223137,
                                                      "mem_223137") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225051,
                                                      "color_225051") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225052,
                                                      "color_225052") != 0)
                                return 1;
                            
                            struct memblock_device mem_223464;
                            
                            mem_223464.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223464,
                                                      bytes_222359,
                                                      "mem_223464")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223464,
                                                                      (int64_t) 0,
                                                                      mem_223230,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      n_p_196694 *
                                                                      s_n_m_196745) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223464,
                                                          "mem_223464") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225052,
                                                          "color_225052") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225051,
                                                          "color_225051") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223234,
                                                          "mem_223234") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223230,
                                                          "mem_223230") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223137,
                                                          "mem_223137") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223133,
                                                          "mem_223133") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223129,
                                                          "mem_223129") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223230,
                                                      "mem_223230") != 0)
                                return 1;
                            
                            struct memblock_device mem_223470;
                            
                            mem_223470.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223470,
                                                      bytes_222359,
                                                      "mem_223470")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223470,
                                                                      (int64_t) 0,
                                                                      mem_223234,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      n_p_196694 *
                                                                      s_n_m_196745) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223470,
                                                          "mem_223470") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223464,
                                                          "mem_223464") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225052,
                                                          "color_225052") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225051,
                                                          "color_225051") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223234,
                                                          "mem_223234") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223230,
                                                          "mem_223230") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223137,
                                                          "mem_223137") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223133,
                                                          "mem_223133") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223129,
                                                          "mem_223129") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223125,
                                                          "mem_223125") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223121,
                                                          "mem_223121") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223118,
                                                          "mem_223118") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223472,
                                                          "ext_mem_223472") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223473,
                                                          "ext_mem_223473") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223474,
                                                          "ext_mem_223474") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223475,
                                                          "ext_mem_223475") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223476,
                                                          "ext_mem_223476") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223477,
                                                          "ext_mem_223477") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223234,
                                                      "mem_223234") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223473,
                                                    &mem_223464,
                                                    "mem_223464") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223472,
                                                    &mem_223470,
                                                    "mem_223470") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223470,
                                                      "mem_223470") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223464,
                                                      "mem_223464") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225052,
                                                      "color_225052") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225051,
                                                      "color_225051") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223234,
                                                      "mem_223234") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223230,
                                                      "mem_223230") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223137,
                                                      "mem_223137") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223133,
                                                      "mem_223133") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223129,
                                                      "mem_223129") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223125,
                                                      "mem_223125") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223121,
                                                      "mem_223121") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223118,
                                                      "mem_223118") != 0)
                                return 1;
                        } else {
                            struct memblock_device ext_mem_223459;
                            
                            ext_mem_223459.references = NULL;
                            
                            struct memblock_device ext_mem_223458;
                            
                            ext_mem_223458.references = NULL;
                            
                            int32_t local_memory_capacity_226950;
                            
                            local_memory_capacity_226950 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_226950)) &&
                                suff_outer_par_209327) {
                                struct memblock_device mem_223238;
                                
                                mem_223238.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223238,
                                                          bytes_223237,
                                                          "mem_223238")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                          mem_223238,
                                                                          (int64_t) 0,
                                                                          ext_mem_222420,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          s_n_m_196745,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223242;
                                
                                mem_223242.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223242,
                                                          bytes_223241,
                                                          "mem_223242")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223242,
                                                                          (int64_t) 0,
                                                                          ext_mem_222419,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          s_n_m_196745,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223246;
                                
                                mem_223246.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223246,
                                                          bytes_223245,
                                                          "mem_223246")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                          mem_223246,
                                                                          (int64_t) 0,
                                                                          ext_mem_222322,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223246,
                                                              "mem_223246") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223250;
                                
                                mem_223250.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223250,
                                                          bytes_223249,
                                                          "mem_223250")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223250,
                                                                          (int64_t) 0,
                                                                          mem_222588,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223250,
                                                              "mem_223250") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223246,
                                                              "mem_223246") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223254;
                                
                                mem_223254.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223254,
                                                          bytes_223249,
                                                          "mem_223254")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223254,
                                                                          (int64_t) 0,
                                                                          mem_222583,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          defunc_0_f_res_196740,
                                                                          m_196691 *
                                                                          n_p_196694) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223254,
                                                              "mem_223254") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223250,
                                                              "mem_223250") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223246,
                                                              "mem_223246") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223289;
                                
                                mem_223289.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223289,
                                                          bytes_223241,
                                                          "mem_223289")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223293;
                                
                                mem_223293.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223293,
                                                          bytes_223241,
                                                          "mem_223293")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device color_225053;
                                
                                color_225053.references = NULL;
                                if (memblock_alloc_device(ctx, &color_225053,
                                                          total_sizze_225179,
                                                          "color_225053")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device color_225054;
                                
                                color_225054.references = NULL;
                                if (memblock_alloc_device(ctx, &color_225054,
                                                          total_sizze_225180,
                                                          "color_225054")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        2,
                                                                        sizeof(n_p_196694),
                                                                        &n_p_196694));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        3,
                                                                        sizeof(q_s_196695),
                                                                        &q_s_196695));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        4,
                                                                        sizeof(jump_s_196701),
                                                                        &jump_s_196701));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        5,
                                                                        sizeof(defunc_0_f_res_196740),
                                                                        &defunc_0_f_res_196740));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        6,
                                                                        sizeof(pad_css_len_196741),
                                                                        &pad_css_len_196741));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        7,
                                                                        sizeof(s_n_m_196745),
                                                                        &s_n_m_196745));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        8,
                                                                        sizeof(num_groups_209323),
                                                                        &num_groups_209323));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        9,
                                                                        sizeof(num_threads_225178),
                                                                        &num_threads_225178));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        10,
                                                                        sizeof(ext_mem_222321.mem),
                                                                        &ext_mem_222321.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        11,
                                                                        sizeof(mem_223238.mem),
                                                                        &mem_223238.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        12,
                                                                        sizeof(mem_223242.mem),
                                                                        &mem_223242.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        13,
                                                                        sizeof(mem_223246.mem),
                                                                        &mem_223246.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        14,
                                                                        sizeof(mem_223250.mem),
                                                                        &mem_223250.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        15,
                                                                        sizeof(mem_223254.mem),
                                                                        &mem_223254.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        16,
                                                                        sizeof(mem_223289.mem),
                                                                        &mem_223289.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        17,
                                                                        sizeof(mem_223293.mem),
                                                                        &mem_223293.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        18,
                                                                        sizeof(color_225053.mem),
                                                                        &color_225053.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209345,
                                                                        19,
                                                                        sizeof(color_225054.mem),
                                                                        &color_225054.mem));
                                if (1 * ((size_t) num_groups_209323 *
                                         (size_t) segmap_group_sizze_209322) !=
                                    0) {
                                    const size_t global_work_sizze_229949[1] =
                                                 {(size_t) num_groups_209323 *
                                                 (size_t) segmap_group_sizze_209322};
                                    const size_t local_work_sizze_229953[1] =
                                                 {(size_t) segmap_group_sizze_209322};
                                    int64_t time_start_229950 = 0,
                                            time_end_229951 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_209345",
                                                global_work_sizze_229949[0],
                                                local_work_sizze_229953[0],
                                                (int) 0);
                                        time_start_229950 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_209345,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_229949,
                                                                                    local_work_sizze_229953,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_209345_runs,
                                                                                                                              &ctx->mainzisegmap_209345_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_229951 = get_wall_time();
                                        
                                        long time_diff_229952 =
                                             time_end_229951 -
                                             time_start_229950;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_209345",
                                                time_diff_229952);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_223238,
                                                          "mem_223238") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223242,
                                                          "mem_223242") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223246,
                                                          "mem_223246") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223250,
                                                          "mem_223250") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223254,
                                                          "mem_223254") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225053,
                                                          "color_225053") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225054,
                                                          "color_225054") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223450;
                                
                                mem_223450.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223450,
                                                          bytes_222359,
                                                          "mem_223450")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223450,
                                                                          (int64_t) 0,
                                                                          mem_223289,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          m_196691 *
                                                                          n_p_196694,
                                                                          s_n_m_196745) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223450,
                                                              "mem_223450") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225054,
                                                              "color_225054") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225053,
                                                              "color_225053") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223293,
                                                              "mem_223293") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223289,
                                                              "mem_223289") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223254,
                                                              "mem_223254") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223250,
                                                              "mem_223250") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223246,
                                                              "mem_223246") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                if (memblock_unref_device(ctx, &mem_223289,
                                                          "mem_223289") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223456;
                                
                                mem_223456.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223456,
                                                          bytes_222359,
                                                          "mem_223456")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                          mem_223456,
                                                                          (int64_t) 0,
                                                                          mem_223293,
                                                                          (int64_t) 0,
                                                                          (int64_t) 1,
                                                                          m_196691 *
                                                                          n_p_196694,
                                                                          s_n_m_196745) !=
                                    0) {
                                    if (memblock_unref_device(ctx, &mem_223456,
                                                              "mem_223456") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223450,
                                                              "mem_223450") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225054,
                                                              "color_225054") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &color_225053,
                                                              "color_225053") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223293,
                                                              "mem_223293") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223289,
                                                              "mem_223289") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223254,
                                                              "mem_223254") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223250,
                                                              "mem_223250") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223246,
                                                              "mem_223246") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223242,
                                                              "mem_223242") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223238,
                                                              "mem_223238") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223458,
                                                              "ext_mem_223458") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223459,
                                                              "ext_mem_223459") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223472,
                                                              "ext_mem_223472") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223473,
                                                              "ext_mem_223473") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223474,
                                                              "ext_mem_223474") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223475,
                                                              "ext_mem_223475") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223476,
                                                              "ext_mem_223476") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223477,
                                                              "ext_mem_223477") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223543,
                                                              "ext_mem_223543") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223544,
                                                              "ext_mem_223544") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222572,
                                                              "mem_param_222572") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222564,
                                                              "mem_param_222564") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224583,
                                                              "ext_mem_224583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224584,
                                                              "ext_mem_224584") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222550,
                                                              "mem_param_222550") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222542,
                                                              "mem_param_222542") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_param_222534,
                                                              "mem_param_222534") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224926,
                                                              "ext_mem_224926") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224927,
                                                              "ext_mem_224927") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_224928,
                                                              "ext_mem_224928") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223608,
                                                              "mem_223608") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223591,
                                                              "mem_223591") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223574,
                                                              "mem_223574") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223557,
                                                              "mem_223557") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222588,
                                                              "mem_222588") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222583,
                                                              "mem_222583") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222577,
                                                              "mem_222577") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222526,
                                                              "mem_222526") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222522,
                                                              "mem_222522") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222517,
                                                              "ext_mem_222517") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222518,
                                                              "ext_mem_222518") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222468,
                                                              "ext_mem_222468") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222469,
                                                              "ext_mem_222469") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222419,
                                                              "ext_mem_222419") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222420,
                                                              "ext_mem_222420") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222321,
                                                              "ext_mem_222321") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222322,
                                                              "ext_mem_222322") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_222263,
                                                              "mem_222263") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222256,
                                                              "ext_mem_222256") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_222257,
                                                              "ext_mem_222257") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225292,
                                                              "mem_out_225292") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225291,
                                                              "mem_out_225291") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &mem_out_225290,
                                                              "mem_out_225290") !=
                                        0)
                                        return 1;
                                    err = 1;
                                    goto cleanup;
                                }
                                if (memblock_unref_device(ctx, &mem_223293,
                                                          "mem_223293") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223459,
                                                        &mem_223450,
                                                        "mem_223450") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223458,
                                                        &mem_223456,
                                                        "mem_223456") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223456,
                                                          "mem_223456") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223450,
                                                          "mem_223450") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225054,
                                                          "color_225054") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225053,
                                                          "color_225053") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223293,
                                                          "mem_223293") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223289,
                                                          "mem_223289") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223254,
                                                          "mem_223254") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223250,
                                                          "mem_223250") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223246,
                                                          "mem_223246") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223242,
                                                          "mem_223242") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223238,
                                                          "mem_223238") != 0)
                                    return 1;
                            } else {
                                struct memblock_device ext_mem_223445;
                                
                                ext_mem_223445.references = NULL;
                                
                                struct memblock_device ext_mem_223444;
                                
                                ext_mem_223444.references = NULL;
                                
                                int32_t local_memory_capacity_226949;
                                
                                local_memory_capacity_226949 =
                                    ctx->opencl.max_local_memory;
                                if (sle64(bytes_222368 + srem64((int64_t) 8 -
                                                                srem64(bytes_222368,
                                                                       (int64_t) 8),
                                                                (int64_t) 8) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222371 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222371,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_222368 + srem64((int64_t) 8 -
                                                                 srem64(bytes_222368,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          (bytes_223299 + srem64((int64_t) 8 -
                                                                 srem64(bytes_223299,
                                                                        (int64_t) 8),
                                                                 (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)) + ((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695) +
                                                                   srem64((int64_t) 8 -
                                                                          srem64((int64_t) 4 *
                                                                                 (s_n_m_196745 *
                                                                                  q_s_196695),
                                                                                 (int64_t) 8),
                                                                          (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)) + ((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695) +
                                                                   srem64((int64_t) 8 -
                                                                          srem64((int64_t) 4 *
                                                                                 (s_n_m_196745 *
                                                                                  q_s_196695),
                                                                                 (int64_t) 8),
                                                                          (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)) + ((int64_t) 4 *
                                                                   (s_n_m_196745 *
                                                                    q_s_196695) +
                                                                   srem64((int64_t) 8 -
                                                                          srem64((int64_t) 4 *
                                                                                 (s_n_m_196745 *
                                                                                  q_s_196695),
                                                                                 (int64_t) 8),
                                                                          (int64_t) 8)) +
                                          ((int64_t) 4 * (s_n_m_196745 *
                                                          q_s_196695) +
                                           srem64((int64_t) 8 -
                                                  srem64((int64_t) 4 *
                                                         (s_n_m_196745 *
                                                          q_s_196695),
                                                         (int64_t) 8),
                                                  (int64_t) 8)),
                                          sext_i32_i64(local_memory_capacity_226949)) &&
                                    intra_suff_and_fits_209338) {
                                    struct memblock_device mem_223347;
                                    
                                    mem_223347.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_223347,
                                                              bytes_222359,
                                                              "mem_223347")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device mem_223352;
                                    
                                    mem_223352.references = NULL;
                                    if (memblock_alloc_device(ctx, &mem_223352,
                                                              bytes_222359,
                                                              "mem_223352")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            6,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            7,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      (s_n_m_196745 *
                                                                                       q_s_196695)),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            8,
                                                                            (size_t) bytes_223299,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            9,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            10,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            11,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            12,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            13,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            14,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            15,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            16,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            17,
                                                                            (size_t) bytes_222371,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            18,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            19,
                                                                            (size_t) bytes_222368,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            20,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            21,
                                                                            sizeof(n_p_196694),
                                                                            &n_p_196694));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            22,
                                                                            sizeof(q_s_196695),
                                                                            &q_s_196695));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            23,
                                                                            sizeof(jump_s_196701),
                                                                            &jump_s_196701));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            24,
                                                                            sizeof(defunc_0_f_res_196740),
                                                                            &defunc_0_f_res_196740));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            25,
                                                                            sizeof(pad_css_len_196741),
                                                                            &pad_css_len_196741));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            26,
                                                                            sizeof(s_n_m_196745),
                                                                            &s_n_m_196745));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            27,
                                                                            sizeof(computed_group_sizze_209331),
                                                                            &computed_group_sizze_209331));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            28,
                                                                            sizeof(ext_mem_222321.mem),
                                                                            &ext_mem_222321.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            29,
                                                                            sizeof(ext_mem_222322.mem),
                                                                            &ext_mem_222322.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            30,
                                                                            sizeof(ext_mem_222419.mem),
                                                                            &ext_mem_222419.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            31,
                                                                            sizeof(ext_mem_222420.mem),
                                                                            &ext_mem_222420.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            32,
                                                                            sizeof(mem_222583.mem),
                                                                            &mem_222583.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            33,
                                                                            sizeof(mem_222588.mem),
                                                                            &mem_222588.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            34,
                                                                            sizeof(mem_223347.mem),
                                                                            &mem_223347.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_209494,
                                                                            35,
                                                                            sizeof(mem_223352.mem),
                                                                            &mem_223352.mem));
                                    if (1 * ((size_t) binop_x_222259 *
                                             (size_t) computed_group_sizze_209331) !=
                                        0) {
                                        const size_t global_work_sizze_229954[1]
                                                     =
                                                     {(size_t) binop_x_222259 *
                                                     (size_t) computed_group_sizze_209331};
                                        const size_t local_work_sizze_229958[1]
                                                     =
                                                     {(size_t) computed_group_sizze_209331};
                                        int64_t time_start_229955 = 0,
                                                time_end_229956 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segmap_intragroup_209494",
                                                    global_work_sizze_229954[0],
                                                    local_work_sizze_229958[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           (int64_t) 4 *
                                                           (s_n_m_196745 *
                                                            q_s_196695) +
                                                           bytes_223299 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222368 +
                                                           bytes_222371 +
                                                           bytes_222368 +
                                                           bytes_222368));
                                            time_start_229955 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegmap_intragroup_209494,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_229954,
                                                                                        local_work_sizze_229958,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegmap_intragroup_209494_runs,
                                                                                                                                  &ctx->mainzisegmap_intragroup_209494_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_229956 = get_wall_time();
                                            
                                            long time_diff_229957 =
                                                 time_end_229956 -
                                                 time_start_229955;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segmap_intragroup_209494",
                                                    time_diff_229957);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223445,
                                                            &mem_223347,
                                                            "mem_223347") != 0)
                                        return 1;
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223444,
                                                            &mem_223352,
                                                            "mem_223352") != 0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223352,
                                                              "mem_223352") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx, &mem_223347,
                                                              "mem_223347") !=
                                        0)
                                        return 1;
                                } else {
                                    int64_t segmap_usable_groups_209678 =
                                            sdiv_up64(nest_sizze_201931,
                                                      segmap_group_sizze_209677);
                                    struct memblock_device ext_mem_223443;
                                    
                                    ext_mem_223443.references = NULL;
                                    
                                    struct memblock_device ext_mem_223442;
                                    
                                    ext_mem_223442.references = NULL;
                                    
                                    int32_t local_memory_capacity_226948;
                                    
                                    local_memory_capacity_226948 =
                                        ctx->opencl.max_local_memory;
                                    if (sle64((int64_t) 0,
                                              sext_i32_i64(local_memory_capacity_226948)) &&
                                        suff_outer_par_209682) {
                                        struct memblock_device mem_223358;
                                        
                                        mem_223358.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223358,
                                                                  bytes_222359,
                                                                  "mem_223358")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223363;
                                        
                                        mem_223363.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223363,
                                                                  bytes_222359,
                                                                  "mem_223363")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                3,
                                                                                sizeof(q_s_196695),
                                                                                &q_s_196695));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                4,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                5,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                6,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                7,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                8,
                                                                                sizeof(ext_mem_222321.mem),
                                                                                &ext_mem_222321.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                9,
                                                                                sizeof(ext_mem_222322.mem),
                                                                                &ext_mem_222322.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                10,
                                                                                sizeof(ext_mem_222419.mem),
                                                                                &ext_mem_222419.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                11,
                                                                                sizeof(ext_mem_222420.mem),
                                                                                &ext_mem_222420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                12,
                                                                                sizeof(mem_222583.mem),
                                                                                &mem_222583.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                13,
                                                                                sizeof(mem_222588.mem),
                                                                                &mem_222588.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                14,
                                                                                sizeof(mem_223358.mem),
                                                                                &mem_223358.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209690,
                                                                                15,
                                                                                sizeof(mem_223363.mem),
                                                                                &mem_223363.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_209678 *
                                             (size_t) segmap_group_sizze_209677) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229959[1] =
                                            {(size_t) segmap_usable_groups_209678 *
                                            (size_t) segmap_group_sizze_209677};
                                            const size_t
                                            local_work_sizze_229963[1] =
                                            {(size_t) segmap_group_sizze_209677};
                                            int64_t time_start_229960 = 0,
                                                    time_end_229961 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_209690",
                                                        global_work_sizze_229959[0],
                                                        local_work_sizze_229963[0],
                                                        (int) 0);
                                                time_start_229960 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_209690,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229959,
                                                                                            local_work_sizze_229963,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_209690_runs,
                                                                                                                                      &ctx->mainzisegmap_209690_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229961 =
                                                    get_wall_time();
                                                
                                                long time_diff_229962 =
                                                     time_end_229961 -
                                                     time_start_229960;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_209690",
                                                        time_diff_229962);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223443,
                                                                &mem_223358,
                                                                "mem_223358") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223442,
                                                                &mem_223363,
                                                                "mem_223363") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223363,
                                                                  "mem_223363") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223358,
                                                                  "mem_223358") !=
                                            0)
                                            return 1;
                                    } else {
                                        int64_t segmap_usable_groups_209833 =
                                                sdiv_up64(nest_sizze_201931,
                                                          segmap_group_sizze_209832);
                                        struct memblock_device mem_223369;
                                        
                                        mem_223369.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223369,
                                                                  bytes_222354,
                                                                  "mem_223369")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223373;
                                        
                                        mem_223373.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223373,
                                                                  bytes_223372,
                                                                  "mem_223373")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                3,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                4,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                5,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                7,
                                                                                sizeof(mem_223369.mem),
                                                                                &mem_223369.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209839,
                                                                                8,
                                                                                sizeof(mem_223373.mem),
                                                                                &mem_223373.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_209833 *
                                             (size_t) segmap_group_sizze_209832) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229964[1] =
                                            {(size_t) segmap_usable_groups_209833 *
                                            (size_t) segmap_group_sizze_209832};
                                            const size_t
                                            local_work_sizze_229968[1] =
                                            {(size_t) segmap_group_sizze_209832};
                                            int64_t time_start_229965 = 0,
                                                    time_end_229966 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_209839",
                                                        global_work_sizze_229964[0],
                                                        local_work_sizze_229968[0],
                                                        (int) 0);
                                                time_start_229965 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_209839,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229964,
                                                                                            local_work_sizze_229968,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_209839_runs,
                                                                                                                                      &ctx->mainzisegmap_209839_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229966 =
                                                    get_wall_time();
                                                
                                                long time_diff_229967 =
                                                     time_end_229966 -
                                                     time_start_229965;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_209839",
                                                        time_diff_229967);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223373,
                                                                  "mem_223373") !=
                                            0)
                                            return 1;
                                        
                                        struct memblock_device mem_223379;
                                        
                                        mem_223379.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223379,
                                                                  bytes_222359,
                                                                  "mem_223379")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223384;
                                        
                                        mem_223384.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223384,
                                                                  bytes_222359,
                                                                  "mem_223384")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223389;
                                        
                                        mem_223389.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223389,
                                                                  bytes_222359,
                                                                  "mem_223389")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223394;
                                        
                                        mem_223394.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223394,
                                                                  bytes_222359,
                                                                  "mem_223394")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223399;
                                        
                                        mem_223399.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223399,
                                                                  bytes_222359,
                                                                  "mem_223399")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (slt64(q_s_196695 * (int64_t) 2,
                                                  segred_group_sizze_209855)) {
                                            int64_t
                                            segment_sizze_nonzzero_226714 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226715 =
                                                    num_groups_209856 *
                                                    segred_group_sizze_209855;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-small");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segments_per_group",
                                                        (long long) squot64(segred_group_sizze_209855,
                                                                            segment_sizze_nonzzero_226714),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "required_groups",
                                                        (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                           n_p_196694 *
                                                                                           s_n_m_196745,
                                                                                           squot64(segred_group_sizze_209855,
                                                                                                   segment_sizze_nonzzero_226714))),
                                                        '\n');
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    1,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    4,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    5,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    6,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    7,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    8,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    9,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    10,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    11,
                                                                                    sizeof(num_groups_209856),
                                                                                    &num_groups_209856));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    12,
                                                                                    sizeof(segment_sizze_nonzzero_226714),
                                                                                    &segment_sizze_nonzzero_226714));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    13,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    14,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    15,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    16,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    17,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    18,
                                                                                    sizeof(mem_223369.mem),
                                                                                    &mem_223369.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    19,
                                                                                    sizeof(mem_223379.mem),
                                                                                    &mem_223379.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    20,
                                                                                    sizeof(mem_223384.mem),
                                                                                    &mem_223384.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    21,
                                                                                    sizeof(mem_223389.mem),
                                                                                    &mem_223389.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    22,
                                                                                    sizeof(mem_223394.mem),
                                                                                    &mem_223394.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209867,
                                                                                    23,
                                                                                    sizeof(mem_223399.mem),
                                                                                    &mem_223399.mem));
                                            if (1 *
                                                ((size_t) num_groups_209856 *
                                                 (size_t) segred_group_sizze_209855) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229969[1] =
                                                {(size_t) num_groups_209856 *
                                                (size_t) segred_group_sizze_209855};
                                                const size_t
                                                local_work_sizze_229973[1] =
                                                {(size_t) segred_group_sizze_209855};
                                                int64_t time_start_229970 = 0,
                                                        time_end_229971 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_small_209867",
                                                            global_work_sizze_229969[0],
                                                            local_work_sizze_229973[0],
                                                            (int) (0 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855));
                                                    time_start_229970 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_small_209867,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229969,
                                                                                                local_work_sizze_229973,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_small_209867_runs,
                                                                                                                                          &ctx->mainzisegred_small_209867_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229971 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229972 =
                                                         time_end_229971 -
                                                         time_start_229970;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_small_209867",
                                                            time_diff_229972);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226769 =
                                                    sdiv_up64(num_groups_209856,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226770 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_209855 *
                                                              groups_per_segment_226769);
                                            int64_t virt_num_groups_226771 =
                                                    groups_per_segment_226769 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226772 =
                                                    num_groups_209856 *
                                                    segred_group_sizze_209855;
                                            int64_t threads_per_segment_226773 =
                                                    groups_per_segment_226769 *
                                                    segred_group_sizze_209855;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-large");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "virt_num_groups",
                                                        (long long) virt_num_groups_226771,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_groups",
                                                        (long long) num_groups_209856,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "group_size",
                                                        (long long) segred_group_sizze_209855,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "elems_per_thread",
                                                        (long long) elements_per_thread_226770,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226769,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226774;
                                            
                                            segred_tmp_mem_226774.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226774,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226771,
                                                                      "segred_tmp_mem_226774")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226776;
                                            
                                            segred_tmp_mem_226776.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226776,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226771,
                                                                      "segred_tmp_mem_226776")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226778;
                                            
                                            segred_tmp_mem_226778.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226778,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226771,
                                                                      "segred_tmp_mem_226778")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226780;
                                            
                                            segred_tmp_mem_226780.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226780,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226771,
                                                                      "segred_tmp_mem_226780")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226782;
                                            
                                            segred_tmp_mem_226782.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226782,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226771,
                                                                      "segred_tmp_mem_226782")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226784 =
                                            ctx->mainzicounter_mem_226784;
                                            
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    1,
                                                                                    (size_t) 1,
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    4,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    5,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    6,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209855),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    7,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    8,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    9,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    10,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    11,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    12,
                                                                                    sizeof(num_groups_209856),
                                                                                    &num_groups_209856));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    13,
                                                                                    sizeof(groups_per_segment_226769),
                                                                                    &groups_per_segment_226769));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    14,
                                                                                    sizeof(elements_per_thread_226770),
                                                                                    &elements_per_thread_226770));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    15,
                                                                                    sizeof(virt_num_groups_226771),
                                                                                    &virt_num_groups_226771));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    16,
                                                                                    sizeof(threads_per_segment_226773),
                                                                                    &threads_per_segment_226773));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    17,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    18,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    19,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    20,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    21,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    22,
                                                                                    sizeof(mem_223369.mem),
                                                                                    &mem_223369.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    23,
                                                                                    sizeof(mem_223379.mem),
                                                                                    &mem_223379.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    24,
                                                                                    sizeof(mem_223384.mem),
                                                                                    &mem_223384.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    25,
                                                                                    sizeof(mem_223389.mem),
                                                                                    &mem_223389.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    26,
                                                                                    sizeof(mem_223394.mem),
                                                                                    &mem_223394.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    27,
                                                                                    sizeof(mem_223399.mem),
                                                                                    &mem_223399.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    28,
                                                                                    sizeof(segred_tmp_mem_226774.mem),
                                                                                    &segred_tmp_mem_226774.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    29,
                                                                                    sizeof(segred_tmp_mem_226776.mem),
                                                                                    &segred_tmp_mem_226776.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    30,
                                                                                    sizeof(segred_tmp_mem_226778.mem),
                                                                                    &segred_tmp_mem_226778.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    31,
                                                                                    sizeof(segred_tmp_mem_226780.mem),
                                                                                    &segred_tmp_mem_226780.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    32,
                                                                                    sizeof(segred_tmp_mem_226782.mem),
                                                                                    &segred_tmp_mem_226782.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209867,
                                                                                    33,
                                                                                    sizeof(mainzicounter_mem_226784.mem),
                                                                                    &mainzicounter_mem_226784.mem));
                                            if (1 *
                                                ((size_t) num_groups_209856 *
                                                 (size_t) segred_group_sizze_209855) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229975[1] =
                                                {(size_t) num_groups_209856 *
                                                (size_t) segred_group_sizze_209855};
                                                const size_t
                                                local_work_sizze_229979[1] =
                                                {(size_t) segred_group_sizze_209855};
                                                int64_t time_start_229976 = 0,
                                                        time_end_229977 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_large_209867",
                                                            global_work_sizze_229975[0],
                                                            local_work_sizze_229979[0],
                                                            (int) (0 + 1 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209855));
                                                    time_start_229976 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_large_209867,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229975,
                                                                                                local_work_sizze_229979,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_large_209867_runs,
                                                                                                                                          &ctx->mainzisegred_large_209867_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229977 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229978 =
                                                         time_end_229977 -
                                                         time_start_229976;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_large_209867",
                                                            time_diff_229978);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226782,
                                                                      "segred_tmp_mem_226782") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226780,
                                                                      "segred_tmp_mem_226780") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226778,
                                                                      "segred_tmp_mem_226778") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226776,
                                                                      "segred_tmp_mem_226776") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226774,
                                                                      "segred_tmp_mem_226774") !=
                                                0)
                                                return 1;
                                        }
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223369,
                                                                  "mem_223369") !=
                                            0)
                                            return 1;
                                        
                                        int64_t segmap_usable_groups_209925 =
                                                sdiv_up64(nest_sizze_201931,
                                                          segmap_group_sizze_209924);
                                        struct memblock_device mem_223405;
                                        
                                        mem_223405.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223405,
                                                                  bytes_222359,
                                                                  "mem_223405")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223410;
                                        
                                        mem_223410.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223410,
                                                                  bytes_222359,
                                                                  "mem_223410")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223415;
                                        
                                        mem_223415.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223415,
                                                                  bytes_222359,
                                                                  "mem_223415")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223420;
                                        
                                        mem_223420.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223420,
                                                                  bytes_222359,
                                                                  "mem_223420")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223425;
                                        
                                        mem_223425.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223425,
                                                                  bytes_222359,
                                                                  "mem_223425")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223430;
                                        
                                        mem_223430.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223430,
                                                                  bytes_222354,
                                                                  "mem_223430")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n",
                                                    "\n# SegMap");
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                1,
                                                                                sizeof(m_196691),
                                                                                &m_196691));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                2,
                                                                                sizeof(n_p_196694),
                                                                                &n_p_196694));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                3,
                                                                                sizeof(jump_s_196701),
                                                                                &jump_s_196701));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                4,
                                                                                sizeof(defunc_0_f_res_196740),
                                                                                &defunc_0_f_res_196740));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                5,
                                                                                sizeof(pad_css_len_196741),
                                                                                &pad_css_len_196741));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                6,
                                                                                sizeof(s_n_m_196745),
                                                                                &s_n_m_196745));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                7,
                                                                                sizeof(mem_223379.mem),
                                                                                &mem_223379.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                8,
                                                                                sizeof(mem_223384.mem),
                                                                                &mem_223384.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                9,
                                                                                sizeof(mem_223389.mem),
                                                                                &mem_223389.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                10,
                                                                                sizeof(mem_223394.mem),
                                                                                &mem_223394.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                11,
                                                                                sizeof(mem_223399.mem),
                                                                                &mem_223399.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                12,
                                                                                sizeof(mem_223405.mem),
                                                                                &mem_223405.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                13,
                                                                                sizeof(mem_223410.mem),
                                                                                &mem_223410.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                14,
                                                                                sizeof(mem_223415.mem),
                                                                                &mem_223415.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                15,
                                                                                sizeof(mem_223420.mem),
                                                                                &mem_223420.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                16,
                                                                                sizeof(mem_223425.mem),
                                                                                &mem_223425.mem));
                                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_209935,
                                                                                17,
                                                                                sizeof(mem_223430.mem),
                                                                                &mem_223430.mem));
                                        if (1 *
                                            ((size_t) segmap_usable_groups_209925 *
                                             (size_t) segmap_group_sizze_209924) !=
                                            0) {
                                            const size_t
                                            global_work_sizze_229980[1] =
                                            {(size_t) segmap_usable_groups_209925 *
                                            (size_t) segmap_group_sizze_209924};
                                            const size_t
                                            local_work_sizze_229984[1] =
                                            {(size_t) segmap_group_sizze_209924};
                                            int64_t time_start_229981 = 0,
                                                    time_end_229982 = 0;
                                            
                                            if (ctx->debugging) {
                                                fprintf(ctx->log,
                                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                        "main.segmap_209935",
                                                        global_work_sizze_229980[0],
                                                        local_work_sizze_229984[0],
                                                        (int) 0);
                                                time_start_229981 =
                                                    get_wall_time();
                                            }
                                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                            ctx->mainzisegmap_209935,
                                                                                            1,
                                                                                            NULL,
                                                                                            global_work_sizze_229980,
                                                                                            local_work_sizze_229984,
                                                                                            0,
                                                                                            NULL,
                                                                                            ctx->profiling_paused ||
                                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                      &ctx->mainzisegmap_209935_runs,
                                                                                                                                      &ctx->mainzisegmap_209935_total_runtime)));
                                            if (ctx->debugging) {
                                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                time_end_229982 =
                                                    get_wall_time();
                                                
                                                long time_diff_229983 =
                                                     time_end_229982 -
                                                     time_start_229981;
                                                
                                                fprintf(ctx->log,
                                                        "kernel %s runtime: %ldus\n",
                                                        "main.segmap_209935",
                                                        time_diff_229983);
                                            }
                                        }
                                        if (ctx->debugging)
                                            fprintf(ctx->log, "%s\n", "");
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223379,
                                                                  "mem_223379") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223384,
                                                                  "mem_223384") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223389,
                                                                  "mem_223389") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223394,
                                                                  "mem_223394") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223399,
                                                                  "mem_223399") !=
                                            0)
                                            return 1;
                                        
                                        struct memblock_device mem_223436;
                                        
                                        mem_223436.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223436,
                                                                  bytes_222359,
                                                                  "mem_223436")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        
                                        struct memblock_device mem_223441;
                                        
                                        mem_223441.references = NULL;
                                        if (memblock_alloc_device(ctx,
                                                                  &mem_223441,
                                                                  bytes_222359,
                                                                  "mem_223441")) {
                                            err = 1;
                                            goto cleanup;
                                        }
                                        if (slt64(q_s_196695 * (int64_t) 2,
                                                  segred_group_sizze_209981)) {
                                            int64_t
                                            segment_sizze_nonzzero_226858 =
                                            smax64((int64_t) 1, q_s_196695);
                                            int64_t num_threads_226859 =
                                                    num_groups_209982 *
                                                    segred_group_sizze_209981;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-small");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segments_per_group",
                                                        (long long) squot64(segred_group_sizze_209981,
                                                                            segment_sizze_nonzzero_226858),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "required_groups",
                                                        (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                           n_p_196694 *
                                                                                           s_n_m_196745,
                                                                                           squot64(segred_group_sizze_209981,
                                                                                                   segment_sizze_nonzzero_226858))),
                                                        '\n');
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    1,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209981),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209981),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    3,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    4,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    5,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    6,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    7,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    8,
                                                                                    sizeof(num_groups_209982),
                                                                                    &num_groups_209982));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    9,
                                                                                    sizeof(segment_sizze_nonzzero_226858),
                                                                                    &segment_sizze_nonzzero_226858));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    10,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    11,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    12,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    13,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    14,
                                                                                    sizeof(mem_222583.mem),
                                                                                    &mem_222583.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    15,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    16,
                                                                                    sizeof(mem_223405.mem),
                                                                                    &mem_223405.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    17,
                                                                                    sizeof(mem_223410.mem),
                                                                                    &mem_223410.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    18,
                                                                                    sizeof(mem_223415.mem),
                                                                                    &mem_223415.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    19,
                                                                                    sizeof(mem_223420.mem),
                                                                                    &mem_223420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    20,
                                                                                    sizeof(mem_223425.mem),
                                                                                    &mem_223425.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    21,
                                                                                    sizeof(mem_223430.mem),
                                                                                    &mem_223430.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    22,
                                                                                    sizeof(mem_223436.mem),
                                                                                    &mem_223436.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_209990,
                                                                                    23,
                                                                                    sizeof(mem_223441.mem),
                                                                                    &mem_223441.mem));
                                            if (1 *
                                                ((size_t) num_groups_209982 *
                                                 (size_t) segred_group_sizze_209981) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229985[1] =
                                                {(size_t) num_groups_209982 *
                                                (size_t) segred_group_sizze_209981};
                                                const size_t
                                                local_work_sizze_229989[1] =
                                                {(size_t) segred_group_sizze_209981};
                                                int64_t time_start_229986 = 0,
                                                        time_end_229987 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_small_209990",
                                                            global_work_sizze_229985[0],
                                                            local_work_sizze_229989[0],
                                                            (int) (0 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209981 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209981));
                                                    time_start_229986 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_small_209990,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229985,
                                                                                                local_work_sizze_229989,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_small_209990_runs,
                                                                                                                                          &ctx->mainzisegred_small_209990_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229987 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229988 =
                                                         time_end_229987 -
                                                         time_start_229986;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_small_209990",
                                                            time_diff_229988);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                        } else {
                                            int64_t groups_per_segment_226895 =
                                                    sdiv_up64(num_groups_209982,
                                                              smax64((int64_t) 1,
                                                                     m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745));
                                            int64_t elements_per_thread_226896 =
                                                    sdiv_up64(q_s_196695,
                                                              segred_group_sizze_209981 *
                                                              groups_per_segment_226895);
                                            int64_t virt_num_groups_226897 =
                                                    groups_per_segment_226895 *
                                                    (m_196691 * n_p_196694 *
                                                     s_n_m_196745);
                                            int64_t num_threads_226898 =
                                                    num_groups_209982 *
                                                    segred_group_sizze_209981;
                                            int64_t threads_per_segment_226899 =
                                                    groups_per_segment_226895 *
                                                    segred_group_sizze_209981;
                                            
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n",
                                                        "\n# SegRed-large");
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_segments",
                                                        (long long) (m_196691 *
                                                                     n_p_196694 *
                                                                     s_n_m_196745),
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "segment_size",
                                                        (long long) q_s_196695,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "virt_num_groups",
                                                        (long long) virt_num_groups_226897,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "num_groups",
                                                        (long long) num_groups_209982,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "group_size",
                                                        (long long) segred_group_sizze_209981,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "elems_per_thread",
                                                        (long long) elements_per_thread_226896,
                                                        '\n');
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s: %llu%c",
                                                        "groups_per_segment",
                                                        (long long) groups_per_segment_226895,
                                                        '\n');
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226900;
                                            
                                            segred_tmp_mem_226900.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226900,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226897,
                                                                      "segred_tmp_mem_226900")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            segred_tmp_mem_226902;
                                            
                                            segred_tmp_mem_226902.references =
                                                NULL;
                                            if (memblock_alloc_device(ctx,
                                                                      &segred_tmp_mem_226902,
                                                                      (int64_t) 4 *
                                                                      virt_num_groups_226897,
                                                                      "segred_tmp_mem_226902")) {
                                                err = 1;
                                                goto cleanup;
                                            }
                                            
                                            struct memblock_device
                                            mainzicounter_mem_226904 =
                                            ctx->mainzicounter_mem_226904;
                                            
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    1,
                                                                                    (size_t) 1,
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    2,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209981),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    3,
                                                                                    (size_t) ((int64_t) 4 *
                                                                                              segred_group_sizze_209981),
                                                                                    NULL));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    4,
                                                                                    sizeof(m_196691),
                                                                                    &m_196691));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    5,
                                                                                    sizeof(n_p_196694),
                                                                                    &n_p_196694));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    6,
                                                                                    sizeof(q_s_196695),
                                                                                    &q_s_196695));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    7,
                                                                                    sizeof(defunc_0_f_res_196740),
                                                                                    &defunc_0_f_res_196740));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    8,
                                                                                    sizeof(s_n_m_196745),
                                                                                    &s_n_m_196745));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    9,
                                                                                    sizeof(num_groups_209982),
                                                                                    &num_groups_209982));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    10,
                                                                                    sizeof(groups_per_segment_226895),
                                                                                    &groups_per_segment_226895));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    11,
                                                                                    sizeof(elements_per_thread_226896),
                                                                                    &elements_per_thread_226896));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    12,
                                                                                    sizeof(virt_num_groups_226897),
                                                                                    &virt_num_groups_226897));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    13,
                                                                                    sizeof(threads_per_segment_226899),
                                                                                    &threads_per_segment_226899));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    14,
                                                                                    sizeof(ext_mem_222321.mem),
                                                                                    &ext_mem_222321.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    15,
                                                                                    sizeof(ext_mem_222322.mem),
                                                                                    &ext_mem_222322.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    16,
                                                                                    sizeof(ext_mem_222419.mem),
                                                                                    &ext_mem_222419.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    17,
                                                                                    sizeof(ext_mem_222420.mem),
                                                                                    &ext_mem_222420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    18,
                                                                                    sizeof(mem_222583.mem),
                                                                                    &mem_222583.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    19,
                                                                                    sizeof(mem_222588.mem),
                                                                                    &mem_222588.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    20,
                                                                                    sizeof(mem_223405.mem),
                                                                                    &mem_223405.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    21,
                                                                                    sizeof(mem_223410.mem),
                                                                                    &mem_223410.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    22,
                                                                                    sizeof(mem_223415.mem),
                                                                                    &mem_223415.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    23,
                                                                                    sizeof(mem_223420.mem),
                                                                                    &mem_223420.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    24,
                                                                                    sizeof(mem_223425.mem),
                                                                                    &mem_223425.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    25,
                                                                                    sizeof(mem_223430.mem),
                                                                                    &mem_223430.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    26,
                                                                                    sizeof(mem_223436.mem),
                                                                                    &mem_223436.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    27,
                                                                                    sizeof(mem_223441.mem),
                                                                                    &mem_223441.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    28,
                                                                                    sizeof(segred_tmp_mem_226900.mem),
                                                                                    &segred_tmp_mem_226900.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    29,
                                                                                    sizeof(segred_tmp_mem_226902.mem),
                                                                                    &segred_tmp_mem_226902.mem));
                                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_209990,
                                                                                    30,
                                                                                    sizeof(mainzicounter_mem_226904.mem),
                                                                                    &mainzicounter_mem_226904.mem));
                                            if (1 *
                                                ((size_t) num_groups_209982 *
                                                 (size_t) segred_group_sizze_209981) !=
                                                0) {
                                                const size_t
                                                global_work_sizze_229991[1] =
                                                {(size_t) num_groups_209982 *
                                                (size_t) segred_group_sizze_209981};
                                                const size_t
                                                local_work_sizze_229995[1] =
                                                {(size_t) segred_group_sizze_209981};
                                                int64_t time_start_229992 = 0,
                                                        time_end_229993 = 0;
                                                
                                                if (ctx->debugging) {
                                                    fprintf(ctx->log,
                                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                            "main.segred_large_209990",
                                                            global_work_sizze_229991[0],
                                                            local_work_sizze_229995[0],
                                                            (int) (0 + 1 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209981 +
                                                                   (int64_t) 4 *
                                                                   segred_group_sizze_209981));
                                                    time_start_229992 =
                                                        get_wall_time();
                                                }
                                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                                ctx->mainzisegred_large_209990,
                                                                                                1,
                                                                                                NULL,
                                                                                                global_work_sizze_229991,
                                                                                                local_work_sizze_229995,
                                                                                                0,
                                                                                                NULL,
                                                                                                ctx->profiling_paused ||
                                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                          &ctx->mainzisegred_large_209990_runs,
                                                                                                                                          &ctx->mainzisegred_large_209990_total_runtime)));
                                                if (ctx->debugging) {
                                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                                    time_end_229993 =
                                                        get_wall_time();
                                                    
                                                    long time_diff_229994 =
                                                         time_end_229993 -
                                                         time_start_229992;
                                                    
                                                    fprintf(ctx->log,
                                                            "kernel %s runtime: %ldus\n",
                                                            "main.segred_large_209990",
                                                            time_diff_229994);
                                                }
                                            }
                                            if (ctx->debugging)
                                                fprintf(ctx->log, "%s\n", "");
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226902,
                                                                      "segred_tmp_mem_226902") !=
                                                0)
                                                return 1;
                                            if (memblock_unref_device(ctx,
                                                                      &segred_tmp_mem_226900,
                                                                      "segred_tmp_mem_226900") !=
                                                0)
                                                return 1;
                                        }
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223405,
                                                                  "mem_223405") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223410,
                                                                  "mem_223410") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223415,
                                                                  "mem_223415") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223420,
                                                                  "mem_223420") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223425,
                                                                  "mem_223425") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223430,
                                                                  "mem_223430") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223443,
                                                                &mem_223436,
                                                                "mem_223436") !=
                                            0)
                                            return 1;
                                        if (memblock_set_device(ctx,
                                                                &ext_mem_223442,
                                                                &mem_223441,
                                                                "mem_223441") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223441,
                                                                  "mem_223441") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223436,
                                                                  "mem_223436") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223430,
                                                                  "mem_223430") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223425,
                                                                  "mem_223425") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223420,
                                                                  "mem_223420") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223415,
                                                                  "mem_223415") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223410,
                                                                  "mem_223410") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223405,
                                                                  "mem_223405") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223399,
                                                                  "mem_223399") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223394,
                                                                  "mem_223394") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223389,
                                                                  "mem_223389") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223384,
                                                                  "mem_223384") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223379,
                                                                  "mem_223379") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223373,
                                                                  "mem_223373") !=
                                            0)
                                            return 1;
                                        if (memblock_unref_device(ctx,
                                                                  &mem_223369,
                                                                  "mem_223369") !=
                                            0)
                                            return 1;
                                    }
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223445,
                                                            &ext_mem_223443,
                                                            "ext_mem_223443") !=
                                        0)
                                        return 1;
                                    if (memblock_set_device(ctx,
                                                            &ext_mem_223444,
                                                            &ext_mem_223442,
                                                            "ext_mem_223442") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223442,
                                                              "ext_mem_223442") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &ext_mem_223443,
                                                              "ext_mem_223443") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_set_device(ctx, &ext_mem_223459,
                                                        &ext_mem_223445,
                                                        "ext_mem_223445") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223458,
                                                        &ext_mem_223444,
                                                        "ext_mem_223444") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223444,
                                                          "ext_mem_223444") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223445,
                                                          "ext_mem_223445") !=
                                    0)
                                    return 1;
                            }
                            if (memblock_set_device(ctx, &ext_mem_223473,
                                                    &ext_mem_223459,
                                                    "ext_mem_223459") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223472,
                                                    &ext_mem_223458,
                                                    "ext_mem_223458") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223458,
                                                      "ext_mem_223458") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223459,
                                                      "ext_mem_223459") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_223475,
                                                &ext_mem_223473,
                                                "ext_mem_223473") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223474,
                                                &ext_mem_223472,
                                                "ext_mem_223472") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223472,
                                                  "ext_mem_223472") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223473,
                                                  "ext_mem_223473") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223477,
                                            &ext_mem_223475,
                                            "ext_mem_223475") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223476,
                                            &ext_mem_223474,
                                            "ext_mem_223474") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223474,
                                              "ext_mem_223474") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223475,
                                              "ext_mem_223475") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223544, &ext_mem_223477,
                                        "ext_mem_223477") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223543, &ext_mem_223476,
                                        "ext_mem_223476") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223476,
                                          "ext_mem_223476") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223477,
                                          "ext_mem_223477") != 0)
                    return 1;
            } else {
                bool match_lit_197730 = (int64_t) 0 == d_s_196698;
                int64_t binop_y_223485 = (int64_t) 4 * q_s_196695;
                int64_t bytes_223486 = smax64((int64_t) 0, binop_y_223485);
                struct memblock_device ext_mem_223542;
                
                ext_mem_223542.references = NULL;
                
                struct memblock_device ext_mem_223541;
                
                ext_mem_223541.references = NULL;
                if (match_lit_197730) {
                    struct memblock_device mem_223482;
                    
                    mem_223482.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223482, bytes_222359,
                                              "mem_223482")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_223482,
                                                      m_196691 * n_p_196694 *
                                                      s_n_m_196745, 0.0F) !=
                        0) {
                        if (memblock_unref_device(ctx, &mem_223482,
                                                  "mem_223482") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223541,
                                                  "ext_mem_223541") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223542,
                                                  "ext_mem_223542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mem_223493;
                    
                    mem_223493.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223493, bytes_222359,
                                              "mem_223493")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_s_196695),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_s_196695),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            3,
                                                            (size_t) bytes_223486,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            4, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            5,
                                                            sizeof(n_p_196694),
                                                            &n_p_196694));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            6,
                                                            sizeof(q_s_196695),
                                                            &q_s_196695));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            7,
                                                            sizeof(jump_s_196701),
                                                            &jump_s_196701));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            8,
                                                            sizeof(defunc_0_f_res_196740),
                                                            &defunc_0_f_res_196740));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            9,
                                                            sizeof(pad_css_len_196741),
                                                            &pad_css_len_196741));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            10,
                                                            sizeof(s_n_m_196745),
                                                            &s_n_m_196745));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            11,
                                                            sizeof(ext_mem_222321.mem),
                                                            &ext_mem_222321.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            12,
                                                            sizeof(ext_mem_222322.mem),
                                                            &ext_mem_222322.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            13,
                                                            sizeof(ext_mem_222419.mem),
                                                            &ext_mem_222419.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            14,
                                                            sizeof(ext_mem_222420.mem),
                                                            &ext_mem_222420.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            15,
                                                            sizeof(mem_222583.mem),
                                                            &mem_222583.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            16,
                                                            sizeof(mem_222588.mem),
                                                            &mem_222588.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210266,
                                                            17,
                                                            sizeof(mem_223493.mem),
                                                            &mem_223493.mem));
                    if (1 * ((size_t) nest_sizze_201931 *
                             (size_t) q_s_196695) != 0) {
                        const size_t global_work_sizze_229996[1] =
                                     {(size_t) nest_sizze_201931 *
                                     (size_t) q_s_196695};
                        const size_t local_work_sizze_230000[1] =
                                     {(size_t) q_s_196695};
                        int64_t time_start_229997 = 0, time_end_229998 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_intragroup_210266",
                                    global_work_sizze_229996[0],
                                    local_work_sizze_230000[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       q_s_196695 +
                                                                       (int64_t) 4 *
                                                                       q_s_196695 +
                                                                       bytes_223486));
                            time_start_229997 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_intragroup_210266,
                                                                        1, NULL,
                                                                        global_work_sizze_229996,
                                                                        local_work_sizze_230000,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_intragroup_210266_runs,
                                                                                                                  &ctx->mainzisegmap_intragroup_210266_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_229998 = get_wall_time();
                            
                            long time_diff_229999 = time_end_229998 -
                                 time_start_229997;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_210266",
                                    time_diff_229999);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_set_device(ctx, &ext_mem_223542, &mem_223493,
                                            "mem_223493") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223541, &mem_223482,
                                            "mem_223482") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223493, "mem_223493") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223482, "mem_223482") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_197802 = (int64_t) 1 == d_s_196698;
                    struct memblock_device ext_mem_223540;
                    
                    ext_mem_223540.references = NULL;
                    
                    struct memblock_device ext_mem_223539;
                    
                    ext_mem_223539.references = NULL;
                    if (match_lit_197802) {
                        struct memblock_device mem_223507;
                        
                        mem_223507.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223507,
                                                  bytes_222359, "mem_223507")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223512;
                        
                        mem_223512.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223512,
                                                  bytes_222359, "mem_223512")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                6,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                7,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                8,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                9,
                                                                sizeof(n_p_196694),
                                                                &n_p_196694));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                10,
                                                                sizeof(q_s_196695),
                                                                &q_s_196695));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                11,
                                                                sizeof(jump_s_196701),
                                                                &jump_s_196701));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                12,
                                                                sizeof(defunc_0_f_res_196740),
                                                                &defunc_0_f_res_196740));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                13,
                                                                sizeof(pad_css_len_196741),
                                                                &pad_css_len_196741));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                14,
                                                                sizeof(s_n_m_196745),
                                                                &s_n_m_196745));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                15,
                                                                sizeof(ext_mem_222321.mem),
                                                                &ext_mem_222321.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                16,
                                                                sizeof(ext_mem_222322.mem),
                                                                &ext_mem_222322.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                17,
                                                                sizeof(ext_mem_222419.mem),
                                                                &ext_mem_222419.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                18,
                                                                sizeof(ext_mem_222420.mem),
                                                                &ext_mem_222420.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                19,
                                                                sizeof(mem_222583.mem),
                                                                &mem_222583.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                20,
                                                                sizeof(mem_222588.mem),
                                                                &mem_222588.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                21,
                                                                sizeof(mem_223507.mem),
                                                                &mem_223507.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_210587,
                                                                22,
                                                                sizeof(mem_223512.mem),
                                                                &mem_223512.mem));
                        if (1 * ((size_t) nest_sizze_201931 *
                                 (size_t) q_s_196695) != 0) {
                            const size_t global_work_sizze_230001[1] =
                                         {(size_t) nest_sizze_201931 *
                                         (size_t) q_s_196695};
                            const size_t local_work_sizze_230005[1] =
                                         {(size_t) q_s_196695};
                            int64_t time_start_230002 = 0, time_end_230003 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_210587",
                                        global_work_sizze_230001[0],
                                        local_work_sizze_230005[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           bytes_223486 +
                                                                           bytes_223486));
                                time_start_230002 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_210587,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230001,
                                                                            local_work_sizze_230005,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_210587_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_210587_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230003 = get_wall_time();
                                
                                long time_diff_230004 = time_end_230003 -
                                     time_start_230002;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_210587",
                                        time_diff_230004);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_set_device(ctx, &ext_mem_223540,
                                                &mem_223507, "mem_223507") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223539,
                                                &mem_223512, "mem_223512") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223512,
                                                  "mem_223512") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223507,
                                                  "mem_223507") != 0)
                            return 1;
                    } else {
                        struct memblock_device mem_223533;
                        
                        mem_223533.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223533,
                                                  bytes_222359, "mem_223533")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223538;
                        
                        mem_223538.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223538,
                                                  bytes_222359, "mem_223538")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                6,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                7,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_s_196695),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                8,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                9,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                10,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                11,
                                                                (size_t) bytes_223486,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                12,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                13,
                                                                sizeof(n_p_196694),
                                                                &n_p_196694));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                14,
                                                                sizeof(q_s_196695),
                                                                &q_s_196695));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                15,
                                                                sizeof(jump_s_196701),
                                                                &jump_s_196701));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                16,
                                                                sizeof(defunc_0_f_res_196740),
                                                                &defunc_0_f_res_196740));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                17,
                                                                sizeof(pad_css_len_196741),
                                                                &pad_css_len_196741));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                18,
                                                                sizeof(s_n_m_196745),
                                                                &s_n_m_196745));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                19,
                                                                sizeof(ext_mem_222321.mem),
                                                                &ext_mem_222321.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                20,
                                                                sizeof(ext_mem_222322.mem),
                                                                &ext_mem_222322.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                21,
                                                                sizeof(ext_mem_222419.mem),
                                                                &ext_mem_222419.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                22,
                                                                sizeof(ext_mem_222420.mem),
                                                                &ext_mem_222420.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                23,
                                                                sizeof(mem_222583.mem),
                                                                &mem_222583.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                24,
                                                                sizeof(mem_222588.mem),
                                                                &mem_222588.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                25,
                                                                sizeof(mem_223533.mem),
                                                                &mem_223533.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_211038,
                                                                26,
                                                                sizeof(mem_223538.mem),
                                                                &mem_223538.mem));
                        if (1 * ((size_t) nest_sizze_201931 *
                                 (size_t) q_s_196695) != 0) {
                            const size_t global_work_sizze_230006[1] =
                                         {(size_t) nest_sizze_201931 *
                                         (size_t) q_s_196695};
                            const size_t local_work_sizze_230010[1] =
                                         {(size_t) q_s_196695};
                            int64_t time_start_230007 = 0, time_end_230008 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_211038",
                                        global_work_sizze_230006[0],
                                        local_work_sizze_230010[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           (int64_t) 4 *
                                                                           q_s_196695 +
                                                                           bytes_223486 +
                                                                           bytes_223486 +
                                                                           bytes_223486 +
                                                                           bytes_223486));
                                time_start_230007 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_211038,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230006,
                                                                            local_work_sizze_230010,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_211038_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_211038_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230008 = get_wall_time();
                                
                                long time_diff_230009 = time_end_230008 -
                                     time_start_230007;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_211038",
                                        time_diff_230009);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_set_device(ctx, &ext_mem_223540,
                                                &mem_223533, "mem_223533") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223539,
                                                &mem_223538, "mem_223538") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223538,
                                                  "mem_223538") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223533,
                                                  "mem_223533") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223542,
                                            &ext_mem_223540,
                                            "ext_mem_223540") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223541,
                                            &ext_mem_223539,
                                            "ext_mem_223539") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223539,
                                              "ext_mem_223539") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223540,
                                              "ext_mem_223540") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223544, &ext_mem_223542,
                                        "ext_mem_223542") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223543, &ext_mem_223541,
                                        "ext_mem_223541") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223541,
                                          "ext_mem_223541") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223542,
                                          "ext_mem_223542") != 0)
                    return 1;
            }
            
            struct memblock_device ext_mem_223551;
            
            ext_mem_223551.references = NULL;
            if (cond_196744) {
                if (memblock_set_device(ctx, &ext_mem_223551, &ext_mem_223544,
                                        "ext_mem_223544") != 0)
                    return 1;
            } else {
                bool bounds_invalid_upwards_198084 = slt64(pad_css_len_196741,
                                                           (int64_t) 0);
                bool valid_198085 = !bounds_invalid_upwards_198084;
                bool range_valid_c_198086;
                
                if (!valid_198085) {
                    ctx->error =
                        msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                                  "Range ", (long long) (int64_t) 0, "..",
                                  (long long) (int64_t) 1, "..<",
                                  (long long) pad_css_len_196741,
                                  " is invalid.",
                                  "-> #0  /prelude/array.fut:90:3-10\n   #1  /prelude/array.fut:195:11-16\n   #2  utils.fut:6:3-16\n   #3  loess.fut:556:3-565:9\n   #4  stl.fut:220:31-96\n   #5  /prelude/soacs.fut:67:19-23\n   #6  /prelude/soacs.fut:67:3-37\n   #7  stl.fut:219:23-221:48\n   #8  /prelude/soacs.fut:67:19-23\n   #9  /prelude/soacs.fut:67:3-37\n   #10 stl.fut:218:15-222:44\n   #11 stl.fut:401:3-415:29\n   #12 stl.fut:385:1-415:29\n");
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                int64_t y_211488 = n_p_196694 * pad_css_len_196741;
                int64_t nest_sizze_211489 = m_196691 * y_211488;
                int64_t segmap_group_sizze_211490;
                
                segmap_group_sizze_211490 =
                    *ctx->tuning_params.mainzisegmap_group_sizze_211198;
                
                int64_t segmap_usable_groups_211491 =
                        sdiv_up64(nest_sizze_211489, segmap_group_sizze_211490);
                struct memblock_device mem_223550;
                
                mem_223550.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223550, bytes_223549,
                                          "mem_223550")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        3, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        4, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        5,
                                                        sizeof(jump_s_196701),
                                                        &jump_s_196701));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        6,
                                                        sizeof(defunc_0_f_res_196740),
                                                        &defunc_0_f_res_196740));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        7,
                                                        sizeof(pad_css_len_196741),
                                                        &pad_css_len_196741));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        8, sizeof(s_n_m_196745),
                                                        &s_n_m_196745));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        9,
                                                        sizeof(ext_mem_223543.mem),
                                                        &ext_mem_223543.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        10,
                                                        sizeof(ext_mem_223544.mem),
                                                        &ext_mem_223544.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211496,
                                                        11,
                                                        sizeof(mem_223550.mem),
                                                        &mem_223550.mem));
                if (1 * ((size_t) segmap_usable_groups_211491 *
                         (size_t) segmap_group_sizze_211490) != 0) {
                    const size_t global_work_sizze_230011[1] =
                                 {(size_t) segmap_usable_groups_211491 *
                                 (size_t) segmap_group_sizze_211490};
                    const size_t local_work_sizze_230015[1] =
                                 {(size_t) segmap_group_sizze_211490};
                    int64_t time_start_230012 = 0, time_end_230013 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_211496",
                                global_work_sizze_230011[0],
                                local_work_sizze_230015[0], (int) 0);
                        time_start_230012 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_211496,
                                                                    1, NULL,
                                                                    global_work_sizze_230011,
                                                                    local_work_sizze_230015,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_211496_runs,
                                                                                                              &ctx->mainzisegmap_211496_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230013 = get_wall_time();
                        
                        long time_diff_230014 = time_end_230013 -
                             time_start_230012;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_211496", time_diff_230014);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_set_device(ctx, &ext_mem_223551, &mem_223550,
                                        "mem_223550") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223550, "mem_223550") != 0)
                    return 1;
            }
            if (memblock_unref_device(ctx, &ext_mem_223543, "ext_mem_223543") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223544, "ext_mem_223544") !=
                0)
                return 1;
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 1,
                                                    sizeof(ctx->failure_is_an_option),
                                                    &ctx->failure_is_an_option));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 3,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 4,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 5,
                                                    sizeof(C_len_196743),
                                                    &C_len_196743));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 6,
                                                    sizeof(css_results_l_197223),
                                                    &css_results_l_197223));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 7,
                                                    sizeof(ext_mem_223551.mem),
                                                    &ext_mem_223551.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211645, 8,
                                                    sizeof(mem_223557.mem),
                                                    &mem_223557.mem));
            if (1 * ((size_t) segmap_usable_groups_211641 *
                     (size_t) segmap_group_sizze_211640) != 0) {
                const size_t global_work_sizze_230016[1] =
                             {(size_t) segmap_usable_groups_211641 *
                             (size_t) segmap_group_sizze_211640};
                const size_t local_work_sizze_230020[1] =
                             {(size_t) segmap_group_sizze_211640};
                int64_t time_start_230017 = 0, time_end_230018 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_211645", global_work_sizze_230016[0],
                            local_work_sizze_230020[0], (int) 0);
                    time_start_230017 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_211645,
                                                                1, NULL,
                                                                global_work_sizze_230016,
                                                                local_work_sizze_230020,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_211645_runs,
                                                                                                          &ctx->mainzisegmap_211645_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_230018 = get_wall_time();
                    
                    long time_diff_230019 = time_end_230018 - time_start_230017;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_211645", time_diff_230019);
                }
            }
            ctx->failure_is_an_option = 1;
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_unref_device(ctx, &ext_mem_223551, "ext_mem_223551") !=
                0)
                return 1;
            
            struct memblock_device ext_mem_223569;
            
            ext_mem_223569.references = NULL;
            
            int32_t local_memory_capacity_227133;
            
            local_memory_capacity_227133 = ctx->opencl.max_local_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227133)) &&
                suff_outer_par_211661) {
                struct memblock_device mem_223560;
                
                mem_223560.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223560, binop_y_223555,
                                          "mem_223560")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_223560,
                                                          (int64_t) 0,
                                                          mem_223557,
                                                          (int64_t) 0,
                                                          (int64_t) 1,
                                                          C_len_196743,
                                                          m_196691) != 0) {
                    if (memblock_unref_device(ctx, &mem_223560, "mem_223560") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_223564;
                
                mem_223564.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223564, bytes_222457,
                                          "mem_223564")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211681,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211681,
                                                        2, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211681,
                                                        3,
                                                        sizeof(mem_223560.mem),
                                                        &mem_223560.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211681,
                                                        4,
                                                        sizeof(mem_223564.mem),
                                                        &mem_223564.mem));
                if (1 * ((size_t) segmap_usable_groups_211678 *
                         (size_t) segmap_group_sizze_211677) != 0) {
                    const size_t global_work_sizze_230021[1] =
                                 {(size_t) segmap_usable_groups_211678 *
                                 (size_t) segmap_group_sizze_211677};
                    const size_t local_work_sizze_230025[1] =
                                 {(size_t) segmap_group_sizze_211677};
                    int64_t time_start_230022 = 0, time_end_230023 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_211681",
                                global_work_sizze_230021[0],
                                local_work_sizze_230025[0], (int) 0);
                        time_start_230022 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_211681,
                                                                    1, NULL,
                                                                    global_work_sizze_230021,
                                                                    local_work_sizze_230025,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_211681_runs,
                                                                                                              &ctx->mainzisegmap_211681_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230023 = get_wall_time();
                        
                        long time_diff_230024 = time_end_230023 -
                             time_start_230022;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_211681", time_diff_230024);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_223560, "mem_223560") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223569, &mem_223564,
                                        "mem_223564") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223564, "mem_223564") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223560, "mem_223560") != 0)
                    return 1;
            } else {
                struct memblock_device mem_223568;
                
                mem_223568.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223568, bytes_222457,
                                          "mem_223568")) {
                    err = 1;
                    goto cleanup;
                }
                if (slt64(n_p_196694 * (int64_t) 2,
                          segred_group_sizze_211708)) {
                    int64_t segment_sizze_nonzzero_227065 = smax64((int64_t) 1,
                                                                   n_p_196694);
                    int64_t num_threads_227066 = num_groups_211709 *
                            segred_group_sizze_211708;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-small");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) n_p_196694, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segments_per_group",
                                (long long) squot64(segred_group_sizze_211708,
                                                    segment_sizze_nonzzero_227065),
                                '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "required_groups",
                                (long long) sext_i64_i32(sdiv_up64(m_196691,
                                                                   squot64(segred_group_sizze_211708,
                                                                           segment_sizze_nonzzero_227065))),
                                '\n');
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211708),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            2, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            3,
                                                            sizeof(n_p_196694),
                                                            &n_p_196694));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            4,
                                                            sizeof(C_len_196743),
                                                            &C_len_196743));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            5,
                                                            sizeof(num_groups_211709),
                                                            &num_groups_211709));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            6,
                                                            sizeof(segment_sizze_nonzzero_227065),
                                                            &segment_sizze_nonzzero_227065));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            7,
                                                            sizeof(mem_223557.mem),
                                                            &mem_223557.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211714,
                                                            8,
                                                            sizeof(mem_223568.mem),
                                                            &mem_223568.mem));
                    if (1 * ((size_t) num_groups_211709 *
                             (size_t) segred_group_sizze_211708) != 0) {
                        const size_t global_work_sizze_230026[1] =
                                     {(size_t) num_groups_211709 *
                                     (size_t) segred_group_sizze_211708};
                        const size_t local_work_sizze_230030[1] =
                                     {(size_t) segred_group_sizze_211708};
                        int64_t time_start_230027 = 0, time_end_230028 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_small_211714",
                                    global_work_sizze_230026[0],
                                    local_work_sizze_230030[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211708));
                            time_start_230027 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_small_211714,
                                                                        1, NULL,
                                                                        global_work_sizze_230026,
                                                                        local_work_sizze_230030,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_small_211714_runs,
                                                                                                                  &ctx->mainzisegred_small_211714_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230028 = get_wall_time();
                            
                            long time_diff_230029 = time_end_230028 -
                                 time_start_230027;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_small_211714",
                                    time_diff_230029);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227092 =
                            sdiv_up64(num_groups_211709, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227093 = sdiv_up64(n_p_196694,
                                                                   segred_group_sizze_211708 *
                                                                   groups_per_segment_227092);
                    int64_t virt_num_groups_227094 = groups_per_segment_227092 *
                            m_196691;
                    int64_t num_threads_227095 = num_groups_211709 *
                            segred_group_sizze_211708;
                    int64_t threads_per_segment_227096 =
                            groups_per_segment_227092 *
                            segred_group_sizze_211708;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-large");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) n_p_196694, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "virt_num_groups",
                                (long long) virt_num_groups_227094, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_groups",
                                (long long) num_groups_211709, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "group_size",
                                (long long) segred_group_sizze_211708, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "elems_per_thread",
                                (long long) elements_per_thread_227093, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227092, '\n');
                    
                    struct memblock_device segred_tmp_mem_227097;
                    
                    segred_tmp_mem_227097.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227097,
                                              (int64_t) 4 *
                                              virt_num_groups_227094,
                                              "segred_tmp_mem_227097")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227099 =
                                           ctx->mainzicounter_mem_227099;
                    
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            1, (size_t) 1,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211708),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            3, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            4,
                                                            sizeof(n_p_196694),
                                                            &n_p_196694));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            5,
                                                            sizeof(C_len_196743),
                                                            &C_len_196743));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            6,
                                                            sizeof(num_groups_211709),
                                                            &num_groups_211709));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            7,
                                                            sizeof(groups_per_segment_227092),
                                                            &groups_per_segment_227092));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            8,
                                                            sizeof(elements_per_thread_227093),
                                                            &elements_per_thread_227093));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            9,
                                                            sizeof(virt_num_groups_227094),
                                                            &virt_num_groups_227094));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            10,
                                                            sizeof(threads_per_segment_227096),
                                                            &threads_per_segment_227096));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            11,
                                                            sizeof(mem_223557.mem),
                                                            &mem_223557.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            12,
                                                            sizeof(mem_223568.mem),
                                                            &mem_223568.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            13,
                                                            sizeof(segred_tmp_mem_227097.mem),
                                                            &segred_tmp_mem_227097.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211714,
                                                            14,
                                                            sizeof(mainzicounter_mem_227099.mem),
                                                            &mainzicounter_mem_227099.mem));
                    if (1 * ((size_t) num_groups_211709 *
                             (size_t) segred_group_sizze_211708) != 0) {
                        const size_t global_work_sizze_230032[1] =
                                     {(size_t) num_groups_211709 *
                                     (size_t) segred_group_sizze_211708};
                        const size_t local_work_sizze_230036[1] =
                                     {(size_t) segred_group_sizze_211708};
                        int64_t time_start_230033 = 0, time_end_230034 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_large_211714",
                                    global_work_sizze_230032[0],
                                    local_work_sizze_230036[0], (int) (0 + 1 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211708));
                            time_start_230033 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_large_211714,
                                                                        1, NULL,
                                                                        global_work_sizze_230032,
                                                                        local_work_sizze_230036,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_large_211714_runs,
                                                                                                                  &ctx->mainzisegred_large_211714_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230034 = get_wall_time();
                            
                            long time_diff_230035 = time_end_230034 -
                                 time_start_230033;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_large_211714",
                                    time_diff_230035);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227097,
                                              "segred_tmp_mem_227097") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223569, &mem_223568,
                                        "mem_223568") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223568, "mem_223568") != 0)
                    return 1;
            }
            if (slt64((int64_t) 0, m_196691 * lifted_single_ma_l_arg_197247)) {
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegScan");
                
                int64_t stage1_max_num_groups_227134;
                
                stage1_max_num_groups_227134 = ctx->opencl.max_group_size;
                
                int64_t stage1_num_groups_227135 =
                        smin64(stage1_max_num_groups_227134, num_groups_211761);
                int32_t num_threads_227136 =
                        sext_i64_i32(stage1_num_groups_227135 *
                        segscan_group_sizze_211760);
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        3,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        segscan_group_sizze_211760),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        4, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        5, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        6,
                                                        sizeof(i64_res_196737),
                                                        &i64_res_196737));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        7, sizeof(C_len_196743),
                                                        &C_len_196743));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        8,
                                                        sizeof(lifted_single_ma_l_arg_197247),
                                                        &lifted_single_ma_l_arg_197247));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        9,
                                                        sizeof(num_threads_227136),
                                                        &num_threads_227136));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        10,
                                                        sizeof(mem_223557.mem),
                                                        &mem_223557.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        11,
                                                        sizeof(ext_mem_223569.mem),
                                                        &ext_mem_223569.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211766,
                                                        12,
                                                        sizeof(mem_223574.mem),
                                                        &mem_223574.mem));
                if (1 * ((size_t) stage1_num_groups_227135 *
                         (size_t) segscan_group_sizze_211760) != 0) {
                    const size_t global_work_sizze_230037[1] =
                                 {(size_t) stage1_num_groups_227135 *
                                 (size_t) segscan_group_sizze_211760};
                    const size_t local_work_sizze_230041[1] =
                                 {(size_t) segscan_group_sizze_211760};
                    int64_t time_start_230038 = 0, time_end_230039 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage1_211766",
                                global_work_sizze_230037[0],
                                local_work_sizze_230041[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          segscan_group_sizze_211760)));
                        time_start_230038 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage1_211766,
                                                                    1, NULL,
                                                                    global_work_sizze_230037,
                                                                    local_work_sizze_230041,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage1_211766_runs,
                                                                                                              &ctx->mainziscan_stage1_211766_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230039 = get_wall_time();
                        
                        long time_diff_230040 = time_end_230039 -
                             time_start_230038;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage1_211766", time_diff_230040);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "elems_per_group",
                            (long long) (segscan_group_sizze_211760 *
                                         sdiv_up64(m_196691 *
                                                   lifted_single_ma_l_arg_197247,
                                                   sext_i32_i64(num_threads_227136))),
                            '\n');
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        1,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        stage1_num_groups_227135),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        2, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        3,
                                                        sizeof(lifted_single_ma_l_arg_197247),
                                                        &lifted_single_ma_l_arg_197247));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        4,
                                                        sizeof(stage1_num_groups_227135),
                                                        &stage1_num_groups_227135));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        5,
                                                        sizeof(num_threads_227136),
                                                        &num_threads_227136));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211766,
                                                        6,
                                                        sizeof(mem_223574.mem),
                                                        &mem_223574.mem));
                if (1 * ((size_t) (int64_t) 1 *
                         (size_t) stage1_num_groups_227135) != 0) {
                    const size_t global_work_sizze_230042[1] =
                                 {(size_t) (int64_t) 1 *
                                 (size_t) stage1_num_groups_227135};
                    const size_t local_work_sizze_230046[1] =
                                 {(size_t) stage1_num_groups_227135};
                    int64_t time_start_230043 = 0, time_end_230044 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage2_211766",
                                global_work_sizze_230042[0],
                                local_work_sizze_230046[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          stage1_num_groups_227135)));
                        time_start_230043 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage2_211766,
                                                                    1, NULL,
                                                                    global_work_sizze_230042,
                                                                    local_work_sizze_230046,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage2_211766_runs,
                                                                                                              &ctx->mainziscan_stage2_211766_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230044 = get_wall_time();
                        
                        long time_diff_230045 = time_end_230044 -
                             time_start_230043;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage2_211766", time_diff_230045);
                    }
                }
                
                int32_t required_groups_227187 =
                        sext_i64_i32(sdiv_up64(m_196691 *
                                               lifted_single_ma_l_arg_197247,
                                               segscan_group_sizze_211760));
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        2,
                                                        sizeof(lifted_single_ma_l_arg_197247),
                                                        &lifted_single_ma_l_arg_197247));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        3,
                                                        sizeof(num_groups_211761),
                                                        &num_groups_211761));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        4,
                                                        sizeof(num_threads_227136),
                                                        &num_threads_227136));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        5,
                                                        sizeof(required_groups_227187),
                                                        &required_groups_227187));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211766,
                                                        6,
                                                        sizeof(mem_223574.mem),
                                                        &mem_223574.mem));
                if (1 * ((size_t) num_groups_211761 *
                         (size_t) segscan_group_sizze_211760) != 0) {
                    const size_t global_work_sizze_230047[1] =
                                 {(size_t) num_groups_211761 *
                                 (size_t) segscan_group_sizze_211760};
                    const size_t local_work_sizze_230051[1] =
                                 {(size_t) segscan_group_sizze_211760};
                    int64_t time_start_230048 = 0, time_end_230049 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage3_211766",
                                global_work_sizze_230047[0],
                                local_work_sizze_230051[0], (int) 0);
                        time_start_230048 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage3_211766,
                                                                    1, NULL,
                                                                    global_work_sizze_230047,
                                                                    local_work_sizze_230051,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage3_211766_runs,
                                                                                                              &ctx->mainziscan_stage3_211766_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230049 = get_wall_time();
                        
                        long time_diff_230050 = time_end_230049 -
                             time_start_230048;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage3_211766", time_diff_230050);
                    }
                }
            }
            if (memblock_unref_device(ctx, &ext_mem_223569, "ext_mem_223569") !=
                0)
                return 1;
            
            struct memblock_device ext_mem_223586;
            
            ext_mem_223586.references = NULL;
            
            int32_t local_memory_capacity_227276;
            
            local_memory_capacity_227276 = ctx->opencl.max_local_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227276)) &&
                suff_outer_par_211792) {
                struct memblock_device mem_223577;
                
                mem_223577.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223577, binop_y_223572,
                                          "mem_223577")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_223577,
                                                          (int64_t) 0,
                                                          mem_223574,
                                                          (int64_t) 0,
                                                          (int64_t) 1,
                                                          lifted_single_ma_l_arg_197247,
                                                          m_196691) != 0) {
                    if (memblock_unref_device(ctx, &mem_223577, "mem_223577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_223581;
                
                mem_223581.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223581, bytes_222457,
                                          "mem_223581")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211812,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211812,
                                                        2, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211812,
                                                        3,
                                                        sizeof(mem_223577.mem),
                                                        &mem_223577.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211812,
                                                        4,
                                                        sizeof(mem_223581.mem),
                                                        &mem_223581.mem));
                if (1 * ((size_t) segmap_usable_groups_211809 *
                         (size_t) segmap_group_sizze_211808) != 0) {
                    const size_t global_work_sizze_230052[1] =
                                 {(size_t) segmap_usable_groups_211809 *
                                 (size_t) segmap_group_sizze_211808};
                    const size_t local_work_sizze_230056[1] =
                                 {(size_t) segmap_group_sizze_211808};
                    int64_t time_start_230053 = 0, time_end_230054 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_211812",
                                global_work_sizze_230052[0],
                                local_work_sizze_230056[0], (int) 0);
                        time_start_230053 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_211812,
                                                                    1, NULL,
                                                                    global_work_sizze_230052,
                                                                    local_work_sizze_230056,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_211812_runs,
                                                                                                              &ctx->mainzisegmap_211812_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230054 = get_wall_time();
                        
                        long time_diff_230055 = time_end_230054 -
                             time_start_230053;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_211812", time_diff_230055);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_223577, "mem_223577") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223586, &mem_223581,
                                        "mem_223581") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223581, "mem_223581") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223577, "mem_223577") != 0)
                    return 1;
            } else {
                struct memblock_device mem_223585;
                
                mem_223585.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223585, bytes_222457,
                                          "mem_223585")) {
                    err = 1;
                    goto cleanup;
                }
                if (slt64(n_p_196694 * (int64_t) 2,
                          segred_group_sizze_211839)) {
                    int64_t segment_sizze_nonzzero_227208 = smax64((int64_t) 1,
                                                                   n_p_196694);
                    int64_t num_threads_227209 = num_groups_211840 *
                            segred_group_sizze_211839;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-small");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) n_p_196694, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segments_per_group",
                                (long long) squot64(segred_group_sizze_211839,
                                                    segment_sizze_nonzzero_227208),
                                '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "required_groups",
                                (long long) sext_i64_i32(sdiv_up64(m_196691,
                                                                   squot64(segred_group_sizze_211839,
                                                                           segment_sizze_nonzzero_227208))),
                                '\n');
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211839),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            2, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            3,
                                                            sizeof(n_p_196694),
                                                            &n_p_196694));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            4,
                                                            sizeof(lifted_single_ma_l_arg_197247),
                                                            &lifted_single_ma_l_arg_197247));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            5,
                                                            sizeof(num_groups_211840),
                                                            &num_groups_211840));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            6,
                                                            sizeof(segment_sizze_nonzzero_227208),
                                                            &segment_sizze_nonzzero_227208));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            7,
                                                            sizeof(mem_223574.mem),
                                                            &mem_223574.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211845,
                                                            8,
                                                            sizeof(mem_223585.mem),
                                                            &mem_223585.mem));
                    if (1 * ((size_t) num_groups_211840 *
                             (size_t) segred_group_sizze_211839) != 0) {
                        const size_t global_work_sizze_230057[1] =
                                     {(size_t) num_groups_211840 *
                                     (size_t) segred_group_sizze_211839};
                        const size_t local_work_sizze_230061[1] =
                                     {(size_t) segred_group_sizze_211839};
                        int64_t time_start_230058 = 0, time_end_230059 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_small_211845",
                                    global_work_sizze_230057[0],
                                    local_work_sizze_230061[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211839));
                            time_start_230058 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_small_211845,
                                                                        1, NULL,
                                                                        global_work_sizze_230057,
                                                                        local_work_sizze_230061,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_small_211845_runs,
                                                                                                                  &ctx->mainzisegred_small_211845_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230059 = get_wall_time();
                            
                            long time_diff_230060 = time_end_230059 -
                                 time_start_230058;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_small_211845",
                                    time_diff_230060);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227235 =
                            sdiv_up64(num_groups_211840, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227236 = sdiv_up64(n_p_196694,
                                                                   segred_group_sizze_211839 *
                                                                   groups_per_segment_227235);
                    int64_t virt_num_groups_227237 = groups_per_segment_227235 *
                            m_196691;
                    int64_t num_threads_227238 = num_groups_211840 *
                            segred_group_sizze_211839;
                    int64_t threads_per_segment_227239 =
                            groups_per_segment_227235 *
                            segred_group_sizze_211839;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-large");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) n_p_196694, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "virt_num_groups",
                                (long long) virt_num_groups_227237, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_groups",
                                (long long) num_groups_211840, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "group_size",
                                (long long) segred_group_sizze_211839, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "elems_per_thread",
                                (long long) elements_per_thread_227236, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227235, '\n');
                    
                    struct memblock_device segred_tmp_mem_227240;
                    
                    segred_tmp_mem_227240.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227240,
                                              (int64_t) 4 *
                                              virt_num_groups_227237,
                                              "segred_tmp_mem_227240")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227242 =
                                           ctx->mainzicounter_mem_227242;
                    
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            1, (size_t) 1,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211839),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            3, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            4,
                                                            sizeof(n_p_196694),
                                                            &n_p_196694));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            5,
                                                            sizeof(lifted_single_ma_l_arg_197247),
                                                            &lifted_single_ma_l_arg_197247));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            6,
                                                            sizeof(num_groups_211840),
                                                            &num_groups_211840));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            7,
                                                            sizeof(groups_per_segment_227235),
                                                            &groups_per_segment_227235));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            8,
                                                            sizeof(elements_per_thread_227236),
                                                            &elements_per_thread_227236));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            9,
                                                            sizeof(virt_num_groups_227237),
                                                            &virt_num_groups_227237));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            10,
                                                            sizeof(threads_per_segment_227239),
                                                            &threads_per_segment_227239));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            11,
                                                            sizeof(mem_223574.mem),
                                                            &mem_223574.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            12,
                                                            sizeof(mem_223585.mem),
                                                            &mem_223585.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            13,
                                                            sizeof(segred_tmp_mem_227240.mem),
                                                            &segred_tmp_mem_227240.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211845,
                                                            14,
                                                            sizeof(mainzicounter_mem_227242.mem),
                                                            &mainzicounter_mem_227242.mem));
                    if (1 * ((size_t) num_groups_211840 *
                             (size_t) segred_group_sizze_211839) != 0) {
                        const size_t global_work_sizze_230063[1] =
                                     {(size_t) num_groups_211840 *
                                     (size_t) segred_group_sizze_211839};
                        const size_t local_work_sizze_230067[1] =
                                     {(size_t) segred_group_sizze_211839};
                        int64_t time_start_230064 = 0, time_end_230065 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_large_211845",
                                    global_work_sizze_230063[0],
                                    local_work_sizze_230067[0], (int) (0 + 1 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211839));
                            time_start_230064 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_large_211845,
                                                                        1, NULL,
                                                                        global_work_sizze_230063,
                                                                        local_work_sizze_230067,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_large_211845_runs,
                                                                                                                  &ctx->mainzisegred_large_211845_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230065 = get_wall_time();
                            
                            long time_diff_230066 = time_end_230065 -
                                 time_start_230064;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_large_211845",
                                    time_diff_230066);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227240,
                                              "segred_tmp_mem_227240") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223586, &mem_223585,
                                        "mem_223585") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223585, "mem_223585") != 0)
                    return 1;
            }
            if (slt64((int64_t) 0, m_196691 *
                      dyn_lifted_single_ma_l_arg_197257)) {
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegScan");
                
                int64_t stage1_max_num_groups_227277;
                
                stage1_max_num_groups_227277 = ctx->opencl.max_group_size;
                
                int64_t stage1_num_groups_227278 =
                        smin64(stage1_max_num_groups_227277, num_groups_211892);
                int32_t num_threads_227279 =
                        sext_i64_i32(stage1_num_groups_227278 *
                        segscan_group_sizze_211891);
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        3,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        segscan_group_sizze_211891),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        4, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        5, sizeof(n_p_196694),
                                                        &n_p_196694));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        6,
                                                        sizeof(i64_res_196737),
                                                        &i64_res_196737));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        7,
                                                        sizeof(lifted_single_ma_l_arg_197247),
                                                        &lifted_single_ma_l_arg_197247));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        8,
                                                        sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                        &dyn_lifted_single_ma_l_arg_197257));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        9,
                                                        sizeof(num_threads_227279),
                                                        &num_threads_227279));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        10,
                                                        sizeof(mem_223574.mem),
                                                        &mem_223574.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        11,
                                                        sizeof(ext_mem_223586.mem),
                                                        &ext_mem_223586.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_211897,
                                                        12,
                                                        sizeof(mem_223591.mem),
                                                        &mem_223591.mem));
                if (1 * ((size_t) stage1_num_groups_227278 *
                         (size_t) segscan_group_sizze_211891) != 0) {
                    const size_t global_work_sizze_230068[1] =
                                 {(size_t) stage1_num_groups_227278 *
                                 (size_t) segscan_group_sizze_211891};
                    const size_t local_work_sizze_230072[1] =
                                 {(size_t) segscan_group_sizze_211891};
                    int64_t time_start_230069 = 0, time_end_230070 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage1_211897",
                                global_work_sizze_230068[0],
                                local_work_sizze_230072[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          segscan_group_sizze_211891)));
                        time_start_230069 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage1_211897,
                                                                    1, NULL,
                                                                    global_work_sizze_230068,
                                                                    local_work_sizze_230072,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage1_211897_runs,
                                                                                                              &ctx->mainziscan_stage1_211897_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230070 = get_wall_time();
                        
                        long time_diff_230071 = time_end_230070 -
                             time_start_230069;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage1_211897", time_diff_230071);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "elems_per_group",
                            (long long) (segscan_group_sizze_211891 *
                                         sdiv_up64(m_196691 *
                                                   dyn_lifted_single_ma_l_arg_197257,
                                                   sext_i32_i64(num_threads_227279))),
                            '\n');
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        1,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        stage1_num_groups_227278),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        2, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        3,
                                                        sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                        &dyn_lifted_single_ma_l_arg_197257));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        4,
                                                        sizeof(stage1_num_groups_227278),
                                                        &stage1_num_groups_227278));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        5,
                                                        sizeof(num_threads_227279),
                                                        &num_threads_227279));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_211897,
                                                        6,
                                                        sizeof(mem_223591.mem),
                                                        &mem_223591.mem));
                if (1 * ((size_t) (int64_t) 1 *
                         (size_t) stage1_num_groups_227278) != 0) {
                    const size_t global_work_sizze_230073[1] =
                                 {(size_t) (int64_t) 1 *
                                 (size_t) stage1_num_groups_227278};
                    const size_t local_work_sizze_230077[1] =
                                 {(size_t) stage1_num_groups_227278};
                    int64_t time_start_230074 = 0, time_end_230075 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage2_211897",
                                global_work_sizze_230073[0],
                                local_work_sizze_230077[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          stage1_num_groups_227278)));
                        time_start_230074 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage2_211897,
                                                                    1, NULL,
                                                                    global_work_sizze_230073,
                                                                    local_work_sizze_230077,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage2_211897_runs,
                                                                                                              &ctx->mainziscan_stage2_211897_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230075 = get_wall_time();
                        
                        long time_diff_230076 = time_end_230075 -
                             time_start_230074;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage2_211897", time_diff_230076);
                    }
                }
                
                int32_t required_groups_227330 =
                        sext_i64_i32(sdiv_up64(m_196691 *
                                               dyn_lifted_single_ma_l_arg_197257,
                                               segscan_group_sizze_211891));
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        2,
                                                        sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                        &dyn_lifted_single_ma_l_arg_197257));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        3,
                                                        sizeof(num_groups_211892),
                                                        &num_groups_211892));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        4,
                                                        sizeof(num_threads_227279),
                                                        &num_threads_227279));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        5,
                                                        sizeof(required_groups_227330),
                                                        &required_groups_227330));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_211897,
                                                        6,
                                                        sizeof(mem_223591.mem),
                                                        &mem_223591.mem));
                if (1 * ((size_t) num_groups_211892 *
                         (size_t) segscan_group_sizze_211891) != 0) {
                    const size_t global_work_sizze_230078[1] =
                                 {(size_t) num_groups_211892 *
                                 (size_t) segscan_group_sizze_211891};
                    const size_t local_work_sizze_230082[1] =
                                 {(size_t) segscan_group_sizze_211891};
                    int64_t time_start_230079 = 0, time_end_230080 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage3_211897",
                                global_work_sizze_230078[0],
                                local_work_sizze_230082[0], (int) 0);
                        time_start_230079 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage3_211897,
                                                                    1, NULL,
                                                                    global_work_sizze_230078,
                                                                    local_work_sizze_230082,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage3_211897_runs,
                                                                                                              &ctx->mainziscan_stage3_211897_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230080 = get_wall_time();
                        
                        long time_diff_230081 = time_end_230080 -
                             time_start_230079;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage3_211897", time_diff_230081);
                    }
                }
            }
            if (memblock_unref_device(ctx, &ext_mem_223586, "ext_mem_223586") !=
                0)
                return 1;
            
            struct memblock_device ext_mem_223603;
            
            ext_mem_223603.references = NULL;
            
            int32_t local_memory_capacity_227419;
            
            local_memory_capacity_227419 = ctx->opencl.max_local_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_227419)) &&
                suff_outer_par_211923) {
                struct memblock_device mem_223594;
                
                mem_223594.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223594, binop_y_223589,
                                          "mem_223594")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_223594,
                                                          (int64_t) 0,
                                                          mem_223591,
                                                          (int64_t) 0,
                                                          (int64_t) 1,
                                                          dyn_lifted_single_ma_l_arg_197257,
                                                          m_196691) != 0) {
                    if (memblock_unref_device(ctx, &mem_223594, "mem_223594") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223603,
                                              "ext_mem_223603") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_223598;
                
                mem_223598.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223598, bytes_222457,
                                          "mem_223598")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211943,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211943,
                                                        2,
                                                        sizeof(mem_223594.mem),
                                                        &mem_223594.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_211943,
                                                        3,
                                                        sizeof(mem_223598.mem),
                                                        &mem_223598.mem));
                if (1 * ((size_t) segmap_usable_groups_211940 *
                         (size_t) segmap_group_sizze_211939) != 0) {
                    const size_t global_work_sizze_230083[1] =
                                 {(size_t) segmap_usable_groups_211940 *
                                 (size_t) segmap_group_sizze_211939};
                    const size_t local_work_sizze_230087[1] =
                                 {(size_t) segmap_group_sizze_211939};
                    int64_t time_start_230084 = 0, time_end_230085 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_211943",
                                global_work_sizze_230083[0],
                                local_work_sizze_230087[0], (int) 0);
                        time_start_230084 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_211943,
                                                                    1, NULL,
                                                                    global_work_sizze_230083,
                                                                    local_work_sizze_230087,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_211943_runs,
                                                                                                              &ctx->mainzisegmap_211943_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230085 = get_wall_time();
                        
                        long time_diff_230086 = time_end_230085 -
                             time_start_230084;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_211943", time_diff_230086);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_223594, "mem_223594") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223603, &mem_223598,
                                        "mem_223598") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223598, "mem_223598") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223594, "mem_223594") != 0)
                    return 1;
            } else {
                struct memblock_device mem_223602;
                
                mem_223602.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223602, bytes_222457,
                                          "mem_223602")) {
                    err = 1;
                    goto cleanup;
                }
                if (slt64((int64_t) 6, segred_group_sizze_211970)) {
                    int64_t segment_sizze_nonzzero_227351 = smax64((int64_t) 1,
                                                                   (int64_t) 3);
                    int64_t num_threads_227352 = num_groups_211971 *
                            segred_group_sizze_211970;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-small");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) (int64_t) 3, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segments_per_group",
                                (long long) squot64(segred_group_sizze_211970,
                                                    segment_sizze_nonzzero_227351),
                                '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "required_groups",
                                (long long) sext_i64_i32(sdiv_up64(m_196691,
                                                                   squot64(segred_group_sizze_211970,
                                                                           segment_sizze_nonzzero_227351))),
                                '\n');
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211970),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            2, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            3,
                                                            sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                            &dyn_lifted_single_ma_l_arg_197257));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            4,
                                                            sizeof(num_groups_211971),
                                                            &num_groups_211971));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            5,
                                                            sizeof(segment_sizze_nonzzero_227351),
                                                            &segment_sizze_nonzzero_227351));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            6,
                                                            sizeof(mem_223591.mem),
                                                            &mem_223591.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_211976,
                                                            7,
                                                            sizeof(mem_223602.mem),
                                                            &mem_223602.mem));
                    if (1 * ((size_t) num_groups_211971 *
                             (size_t) segred_group_sizze_211970) != 0) {
                        const size_t global_work_sizze_230088[1] =
                                     {(size_t) num_groups_211971 *
                                     (size_t) segred_group_sizze_211970};
                        const size_t local_work_sizze_230092[1] =
                                     {(size_t) segred_group_sizze_211970};
                        int64_t time_start_230089 = 0, time_end_230090 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_small_211976",
                                    global_work_sizze_230088[0],
                                    local_work_sizze_230092[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211970));
                            time_start_230089 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_small_211976,
                                                                        1, NULL,
                                                                        global_work_sizze_230088,
                                                                        local_work_sizze_230092,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_small_211976_runs,
                                                                                                                  &ctx->mainzisegred_small_211976_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230090 = get_wall_time();
                            
                            long time_diff_230091 = time_end_230090 -
                                 time_start_230089;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_small_211976",
                                    time_diff_230091);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_227378 =
                            sdiv_up64(num_groups_211971, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_227379 = sdiv_up64((int64_t) 3,
                                                                   segred_group_sizze_211970 *
                                                                   groups_per_segment_227378);
                    int64_t virt_num_groups_227380 = groups_per_segment_227378 *
                            m_196691;
                    int64_t num_threads_227381 = num_groups_211971 *
                            segred_group_sizze_211970;
                    int64_t threads_per_segment_227382 =
                            groups_per_segment_227378 *
                            segred_group_sizze_211970;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-large");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) (int64_t) 3, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "virt_num_groups",
                                (long long) virt_num_groups_227380, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_groups",
                                (long long) num_groups_211971, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "group_size",
                                (long long) segred_group_sizze_211970, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "elems_per_thread",
                                (long long) elements_per_thread_227379, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_227378, '\n');
                    
                    struct memblock_device segred_tmp_mem_227383;
                    
                    segred_tmp_mem_227383.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_227383,
                                              (int64_t) 4 *
                                              virt_num_groups_227380,
                                              "segred_tmp_mem_227383")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_227385 =
                                           ctx->mainzicounter_mem_227385;
                    
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            1, (size_t) 1,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_211970),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            3, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            4,
                                                            sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                            &dyn_lifted_single_ma_l_arg_197257));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            5,
                                                            sizeof(num_groups_211971),
                                                            &num_groups_211971));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            6,
                                                            sizeof(groups_per_segment_227378),
                                                            &groups_per_segment_227378));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            7,
                                                            sizeof(elements_per_thread_227379),
                                                            &elements_per_thread_227379));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            8,
                                                            sizeof(virt_num_groups_227380),
                                                            &virt_num_groups_227380));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            9,
                                                            sizeof(threads_per_segment_227382),
                                                            &threads_per_segment_227382));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            10,
                                                            sizeof(mem_223591.mem),
                                                            &mem_223591.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            11,
                                                            sizeof(mem_223602.mem),
                                                            &mem_223602.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            12,
                                                            sizeof(segred_tmp_mem_227383.mem),
                                                            &segred_tmp_mem_227383.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_211976,
                                                            13,
                                                            sizeof(mainzicounter_mem_227385.mem),
                                                            &mainzicounter_mem_227385.mem));
                    if (1 * ((size_t) num_groups_211971 *
                             (size_t) segred_group_sizze_211970) != 0) {
                        const size_t global_work_sizze_230094[1] =
                                     {(size_t) num_groups_211971 *
                                     (size_t) segred_group_sizze_211970};
                        const size_t local_work_sizze_230098[1] =
                                     {(size_t) segred_group_sizze_211970};
                        int64_t time_start_230095 = 0, time_end_230096 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_large_211976",
                                    global_work_sizze_230094[0],
                                    local_work_sizze_230098[0], (int) (0 + 1 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_211970));
                            time_start_230095 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_large_211976,
                                                                        1, NULL,
                                                                        global_work_sizze_230094,
                                                                        local_work_sizze_230098,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_large_211976_runs,
                                                                                                                  &ctx->mainzisegred_large_211976_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230096 = get_wall_time();
                            
                            long time_diff_230097 = time_end_230096 -
                                 time_start_230095;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_large_211976",
                                    time_diff_230097);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_227383,
                                              "segred_tmp_mem_227383") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223603, &mem_223602,
                                        "mem_223602") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223602, "mem_223602") != 0)
                    return 1;
            }
            if (slt64((int64_t) 0, m_196691 * n_196692)) {
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegScan");
                
                int64_t stage1_max_num_groups_227420;
                
                stage1_max_num_groups_227420 = ctx->opencl.max_group_size;
                
                int64_t stage1_num_groups_227421 =
                        smin64(stage1_max_num_groups_227420, num_groups_212023);
                int32_t num_threads_227422 =
                        sext_i64_i32(stage1_num_groups_227421 *
                        segscan_group_sizze_212022);
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        3,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        segscan_group_sizze_212022),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        4, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        5, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        6,
                                                        sizeof(dyn_lifted_single_ma_l_arg_197257),
                                                        &dyn_lifted_single_ma_l_arg_197257));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        7,
                                                        sizeof(num_threads_227422),
                                                        &num_threads_227422));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        8,
                                                        sizeof(mem_223591.mem),
                                                        &mem_223591.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        9,
                                                        sizeof(ext_mem_223603.mem),
                                                        &ext_mem_223603.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_212028,
                                                        10,
                                                        sizeof(mem_223608.mem),
                                                        &mem_223608.mem));
                if (1 * ((size_t) stage1_num_groups_227421 *
                         (size_t) segscan_group_sizze_212022) != 0) {
                    const size_t global_work_sizze_230099[1] =
                                 {(size_t) stage1_num_groups_227421 *
                                 (size_t) segscan_group_sizze_212022};
                    const size_t local_work_sizze_230103[1] =
                                 {(size_t) segscan_group_sizze_212022};
                    int64_t time_start_230100 = 0, time_end_230101 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage1_212028",
                                global_work_sizze_230099[0],
                                local_work_sizze_230103[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          segscan_group_sizze_212022)));
                        time_start_230100 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage1_212028,
                                                                    1, NULL,
                                                                    global_work_sizze_230099,
                                                                    local_work_sizze_230103,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage1_212028_runs,
                                                                                                              &ctx->mainziscan_stage1_212028_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230101 = get_wall_time();
                        
                        long time_diff_230102 = time_end_230101 -
                             time_start_230100;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage1_212028", time_diff_230102);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s: %llu%c", "elems_per_group",
                            (long long) (segscan_group_sizze_212022 *
                                         sdiv_up64(m_196691 * n_196692,
                                                   sext_i32_i64(num_threads_227422))),
                            '\n');
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        1,
                                                        (size_t) smax64((int64_t) 1,
                                                                        (int64_t) 4 *
                                                                        stage1_num_groups_227421),
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        2, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        3, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        4,
                                                        sizeof(stage1_num_groups_227421),
                                                        &stage1_num_groups_227421));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        5,
                                                        sizeof(num_threads_227422),
                                                        &num_threads_227422));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_212028,
                                                        6,
                                                        sizeof(mem_223608.mem),
                                                        &mem_223608.mem));
                if (1 * ((size_t) (int64_t) 1 *
                         (size_t) stage1_num_groups_227421) != 0) {
                    const size_t global_work_sizze_230104[1] =
                                 {(size_t) (int64_t) 1 *
                                 (size_t) stage1_num_groups_227421};
                    const size_t local_work_sizze_230108[1] =
                                 {(size_t) stage1_num_groups_227421};
                    int64_t time_start_230105 = 0, time_end_230106 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage2_212028",
                                global_work_sizze_230104[0],
                                local_work_sizze_230108[0], (int) (0 +
                                                                   smax64((int64_t) 1,
                                                                          (int64_t) 4 *
                                                                          stage1_num_groups_227421)));
                        time_start_230105 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage2_212028,
                                                                    1, NULL,
                                                                    global_work_sizze_230104,
                                                                    local_work_sizze_230108,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage2_212028_runs,
                                                                                                              &ctx->mainziscan_stage2_212028_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230106 = get_wall_time();
                        
                        long time_diff_230107 = time_end_230106 -
                             time_start_230105;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage2_212028", time_diff_230107);
                    }
                }
                
                int32_t required_groups_227473 =
                        sext_i64_i32(sdiv_up64(m_196691 * n_196692,
                                               segscan_group_sizze_212022));
                
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        2, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        3,
                                                        sizeof(num_groups_212023),
                                                        &num_groups_212023));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        4,
                                                        sizeof(num_threads_227422),
                                                        &num_threads_227422));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        5,
                                                        sizeof(required_groups_227473),
                                                        &required_groups_227473));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_212028,
                                                        6,
                                                        sizeof(mem_223608.mem),
                                                        &mem_223608.mem));
                if (1 * ((size_t) num_groups_212023 *
                         (size_t) segscan_group_sizze_212022) != 0) {
                    const size_t global_work_sizze_230109[1] =
                                 {(size_t) num_groups_212023 *
                                 (size_t) segscan_group_sizze_212022};
                    const size_t local_work_sizze_230113[1] =
                                 {(size_t) segscan_group_sizze_212022};
                    int64_t time_start_230110 = 0, time_end_230111 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.scan_stage3_212028",
                                global_work_sizze_230109[0],
                                local_work_sizze_230113[0], (int) 0);
                        time_start_230110 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainziscan_stage3_212028,
                                                                    1, NULL,
                                                                    global_work_sizze_230109,
                                                                    local_work_sizze_230113,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainziscan_stage3_212028_runs,
                                                                                                              &ctx->mainziscan_stage3_212028_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230111 = get_wall_time();
                        
                        long time_diff_230112 = time_end_230111 -
                             time_start_230110;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.scan_stage3_212028", time_diff_230112);
                    }
                }
            }
            if (memblock_unref_device(ctx, &ext_mem_223603, "ext_mem_223603") !=
                0)
                return 1;
            
            struct memblock_device ext_mem_223965;
            
            ext_mem_223965.references = NULL;
            
            struct memblock_device ext_mem_223964;
            
            ext_mem_223964.references = NULL;
            if (cond_197273) {
                bool match_lit_198303 = (int64_t) 0 == d_l_196700;
                struct memblock_device ext_mem_223904;
                
                ext_mem_223904.references = NULL;
                
                struct memblock_device ext_mem_223903;
                
                ext_mem_223903.references = NULL;
                if (match_lit_198303) {
                    struct memblock_device mem_223612;
                    
                    mem_223612.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223612, bytes_222439,
                                              "mem_223612")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_223612,
                                                      m_196691 * l_n_m_196752,
                                                      0.0F) != 0) {
                        if (memblock_unref_device(ctx, &mem_223612,
                                                  "mem_223612") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223903,
                                                  "ext_mem_223903") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223904,
                                                  "ext_mem_223904") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223964,
                                                  "ext_mem_223964") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223965,
                                                  "ext_mem_223965") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223603,
                                                  "ext_mem_223603") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223586,
                                                  "ext_mem_223586") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223569,
                                                  "ext_mem_223569") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223551,
                                                  "ext_mem_223551") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    bool suff_outer_par_212054;
                    
                    suff_outer_par_212054 =
                        *ctx->tuning_params.mainzisuff_outer_par_22 <= m_196691;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_22", (long) m_196691,
                                suff_outer_par_212054 ? "true" : "false");
                    
                    int64_t segmap_group_sizze_212127;
                    
                    segmap_group_sizze_212127 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_212058;
                    
                    int64_t num_groups_212128;
                    int32_t max_num_groups_227485;
                    
                    max_num_groups_227485 =
                        *ctx->tuning_params.mainzisegmap_num_groups_212060;
                    num_groups_212128 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(m_196691,
                                                                             segmap_group_sizze_212127),
                                                                   sext_i32_i64(max_num_groups_227485))));
                    
                    int64_t segmap_group_sizze_212508;
                    
                    segmap_group_sizze_212508 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_212199;
                    
                    bool suff_outer_par_212512;
                    
                    suff_outer_par_212512 =
                        *ctx->tuning_params.mainzisuff_outer_par_23 <=
                        nest_sizze_202575;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_23",
                                (long) nest_sizze_202575,
                                suff_outer_par_212512 ? "true" : "false");
                    
                    int64_t nest_sizze_212590 = q_l_196697 * nest_sizze_202575;
                    int64_t segred_group_sizze_212591;
                    
                    segred_group_sizze_212591 =
                        *ctx->tuning_params.mainzisegred_group_sizze_212343;
                    
                    int64_t num_groups_212592;
                    int32_t max_num_groups_227486;
                    
                    max_num_groups_227486 =
                        *ctx->tuning_params.mainzisegred_num_groups_212345;
                    num_groups_212592 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_212590,
                                                                             segred_group_sizze_212591),
                                                                   sext_i32_i64(max_num_groups_227486))));
                    
                    int64_t segmap_group_sizze_212629;
                    
                    segmap_group_sizze_212629 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_212330;
                    
                    int64_t segred_group_sizze_212640;
                    
                    segred_group_sizze_212640 =
                        *ctx->tuning_params.mainzisegred_group_sizze_212276;
                    
                    int64_t num_groups_212641;
                    int32_t max_num_groups_227487;
                    
                    max_num_groups_227487 =
                        *ctx->tuning_params.mainzisegred_num_groups_212278;
                    num_groups_212641 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_212590,
                                                                             segred_group_sizze_212640),
                                                                   sext_i32_i64(max_num_groups_227487))));
                    
                    int64_t num_threads_225201 = segmap_group_sizze_212127 *
                            num_groups_212128;
                    int64_t total_sizze_225202 = bytes_222428 *
                            num_threads_225201;
                    struct memblock_device ext_mem_223670;
                    
                    ext_mem_223670.references = NULL;
                    
                    int32_t local_memory_capacity_227683;
                    
                    local_memory_capacity_227683 = ctx->opencl.max_local_memory;
                    if ((sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_227683)) &&
                         sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_227683))) &&
                        suff_outer_par_212054) {
                        struct memblock_device mem_223615;
                        
                        mem_223615.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223615,
                                                  binop_y_222434,
                                                  "mem_223615")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_223615,
                                                                  (int64_t) 0,
                                                                  ext_mem_222469,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  l_n_m_196752,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223615,
                                                      "mem_223615") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223670,
                                                      "ext_mem_223670") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223612,
                                                      "mem_223612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223903,
                                                      "ext_mem_223903") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223904,
                                                      "ext_mem_223904") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223618;
                        
                        mem_223618.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223618,
                                                  binop_y_222438,
                                                  "mem_223618")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223618,
                                                                  (int64_t) 0,
                                                                  ext_mem_222468,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  l_n_m_196752,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223618,
                                                      "mem_223618") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223615,
                                                      "mem_223615") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223670,
                                                      "ext_mem_223670") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223612,
                                                      "mem_223612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223903,
                                                      "ext_mem_223903") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223904,
                                                      "ext_mem_223904") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223621;
                        
                        mem_223621.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223621,
                                                  binop_y_222520,
                                                  "mem_223621")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        int64_t group_sizze_227491;
                        
                        group_sizze_227491 =
                            *ctx->tuning_params.mainzigroup_sizze_227491;
                        
                        int64_t num_groups_227492 = sdiv_up64(m_196691 *
                                                              n_196692,
                                                              group_sizze_227491);
                        
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                0,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                1,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                2,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                3,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                4,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                5,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227488,
                                                                6,
                                                                sizeof(mem_223621.mem),
                                                                &mem_223621.mem));
                        if (1 * ((size_t) num_groups_227492 *
                                 (size_t) group_sizze_227491) != 0) {
                            const size_t global_work_sizze_230114[1] =
                                         {(size_t) num_groups_227492 *
                                         (size_t) group_sizze_227491};
                            const size_t local_work_sizze_230118[1] =
                                         {(size_t) group_sizze_227491};
                            int64_t time_start_230115 = 0, time_end_230116 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.copy_227488",
                                        global_work_sizze_230114[0],
                                        local_work_sizze_230118[0], (int) 0);
                                time_start_230115 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzicopy_227488,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230114,
                                                                            local_work_sizze_230118,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzicopy_227488_runs,
                                                                                                                      &ctx->mainzicopy_227488_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230116 = get_wall_time();
                                
                                long time_diff_230117 = time_end_230116 -
                                     time_start_230115;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.copy_227488", time_diff_230117);
                            }
                        }
                        
                        struct memblock_device mem_223624;
                        
                        mem_223624.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223624,
                                                  binop_y_222520,
                                                  "mem_223624")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223624,
                                                                  (int64_t) 0,
                                                                  mem_223608,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_196692,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223624,
                                                      "mem_223624") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223621,
                                                      "mem_223621") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223618,
                                                      "mem_223618") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223615,
                                                      "mem_223615") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223670,
                                                      "ext_mem_223670") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223612,
                                                      "mem_223612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223903,
                                                      "ext_mem_223903") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223904,
                                                      "ext_mem_223904") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223643;
                        
                        mem_223643.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223643,
                                                  binop_y_222438,
                                                  "mem_223643")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device color_225074;
                        
                        color_225074.references = NULL;
                        if (memblock_alloc_device(ctx, &color_225074,
                                                  total_sizze_225202,
                                                  "color_225074")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                1,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                2,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                3,
                                                                sizeof(q_l_196697),
                                                                &q_l_196697));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                4,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                5,
                                                                sizeof(l_n_m_196752),
                                                                &l_n_m_196752));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                6,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                7,
                                                                sizeof(num_groups_212128),
                                                                &num_groups_212128));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                8,
                                                                sizeof(num_threads_225201),
                                                                &num_threads_225201));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                9,
                                                                sizeof(mem_223615.mem),
                                                                &mem_223615.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                10,
                                                                sizeof(mem_223618.mem),
                                                                &mem_223618.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                11,
                                                                sizeof(mem_223621.mem),
                                                                &mem_223621.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                12,
                                                                sizeof(mem_223624.mem),
                                                                &mem_223624.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                13,
                                                                sizeof(mem_223643.mem),
                                                                &mem_223643.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212132,
                                                                14,
                                                                sizeof(color_225074.mem),
                                                                &color_225074.mem));
                        if (1 * ((size_t) num_groups_212128 *
                                 (size_t) segmap_group_sizze_212127) != 0) {
                            const size_t global_work_sizze_230119[1] =
                                         {(size_t) num_groups_212128 *
                                         (size_t) segmap_group_sizze_212127};
                            const size_t local_work_sizze_230123[1] =
                                         {(size_t) segmap_group_sizze_212127};
                            int64_t time_start_230120 = 0, time_end_230121 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_212132",
                                        global_work_sizze_230119[0],
                                        local_work_sizze_230123[0], (int) 0);
                                time_start_230120 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_212132,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230119,
                                                                            local_work_sizze_230123,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_212132_runs,
                                                                                                                      &ctx->mainzisegmap_212132_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230121 = get_wall_time();
                                
                                long time_diff_230122 = time_end_230121 -
                                     time_start_230120;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_212132", time_diff_230122);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_223615,
                                                  "mem_223615") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223618,
                                                  "mem_223618") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223621,
                                                  "mem_223621") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223624,
                                                  "mem_223624") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225074,
                                                  "color_225074") != 0)
                            return 1;
                        
                        struct memblock_device mem_223668;
                        
                        mem_223668.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223668,
                                                  bytes_222439, "mem_223668")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223668,
                                                                  (int64_t) 0,
                                                                  mem_223643,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  m_196691,
                                                                  l_n_m_196752) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223668,
                                                      "mem_223668") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225074,
                                                      "color_225074") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223643,
                                                      "mem_223643") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223624,
                                                      "mem_223624") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223621,
                                                      "mem_223621") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223618,
                                                      "mem_223618") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223615,
                                                      "mem_223615") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223670,
                                                      "ext_mem_223670") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223612,
                                                      "mem_223612") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223903,
                                                      "ext_mem_223903") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223904,
                                                      "ext_mem_223904") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        if (memblock_unref_device(ctx, &mem_223643,
                                                  "mem_223643") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223670,
                                                &mem_223668, "mem_223668") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223668,
                                                  "mem_223668") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225074,
                                                  "color_225074") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223643,
                                                  "mem_223643") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223624,
                                                  "mem_223624") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223621,
                                                  "mem_223621") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223618,
                                                  "mem_223618") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223615,
                                                  "mem_223615") != 0)
                            return 1;
                    } else {
                        int64_t segmap_usable_groups_212509 =
                                sdiv_up64(nest_sizze_202575,
                                          segmap_group_sizze_212508);
                        struct memblock_device ext_mem_223664;
                        
                        ext_mem_223664.references = NULL;
                        
                        int32_t local_memory_capacity_227682;
                        
                        local_memory_capacity_227682 =
                            ctx->opencl.max_local_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_227682)) &&
                            suff_outer_par_212512) {
                            struct memblock_device mem_223648;
                            
                            mem_223648.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223648,
                                                      bytes_222439,
                                                      "mem_223648")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    3,
                                                                    sizeof(q_l_196697),
                                                                    &q_l_196697));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    4,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    5,
                                                                    sizeof(l_n_m_196752),
                                                                    &l_n_m_196752));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    6,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    7,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    8,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    9,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    10,
                                                                    sizeof(ext_mem_222468.mem),
                                                                    &ext_mem_222468.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    11,
                                                                    sizeof(ext_mem_222469.mem),
                                                                    &ext_mem_222469.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    12,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    13,
                                                                    sizeof(mem_223608.mem),
                                                                    &mem_223608.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212517,
                                                                    14,
                                                                    sizeof(mem_223648.mem),
                                                                    &mem_223648.mem));
                            if (1 * ((size_t) segmap_usable_groups_212509 *
                                     (size_t) segmap_group_sizze_212508) != 0) {
                                const size_t global_work_sizze_230124[1] =
                                             {(size_t) segmap_usable_groups_212509 *
                                             (size_t) segmap_group_sizze_212508};
                                const size_t local_work_sizze_230128[1] =
                                             {(size_t) segmap_group_sizze_212508};
                                int64_t time_start_230125 = 0, time_end_230126 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_212517",
                                            global_work_sizze_230124[0],
                                            local_work_sizze_230128[0],
                                            (int) 0);
                                    time_start_230125 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_212517,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230124,
                                                                                local_work_sizze_230128,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_212517_runs,
                                                                                                                          &ctx->mainzisegmap_212517_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230126 = get_wall_time();
                                    
                                    long time_diff_230127 = time_end_230126 -
                                         time_start_230125;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_212517",
                                            time_diff_230127);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_set_device(ctx, &ext_mem_223664,
                                                    &mem_223648,
                                                    "mem_223648") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223648,
                                                      "mem_223648") != 0)
                                return 1;
                        } else {
                            struct memblock_device mem_223653;
                            
                            mem_223653.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223653,
                                                      bytes_222439,
                                                      "mem_223653")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (slt64(q_l_196697 * (int64_t) 2,
                                      segred_group_sizze_212591)) {
                                int64_t segment_sizze_nonzzero_227528 =
                                        smax64((int64_t) 1, q_l_196697);
                                int64_t num_threads_227529 = num_groups_212592 *
                                        segred_group_sizze_212591;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-small");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         l_n_m_196752), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_l_196697, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segments_per_group",
                                            (long long) squot64(segred_group_sizze_212591,
                                                                segment_sizze_nonzzero_227528),
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "required_groups",
                                            (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                               l_n_m_196752,
                                                                               squot64(segred_group_sizze_212591,
                                                                                       segment_sizze_nonzzero_227528))),
                                            '\n');
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        1,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_212591),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        2,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        3,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        4,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        5,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        6,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        7,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        8,
                                                                        sizeof(num_groups_212592),
                                                                        &num_groups_212592));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        9,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        10,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        11,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        12,
                                                                        sizeof(segment_sizze_nonzzero_227528),
                                                                        &segment_sizze_nonzzero_227528));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        13,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        14,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        15,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212598,
                                                                        16,
                                                                        sizeof(mem_223653.mem),
                                                                        &mem_223653.mem));
                                if (1 * ((size_t) num_groups_212592 *
                                         (size_t) segred_group_sizze_212591) !=
                                    0) {
                                    const size_t global_work_sizze_230129[1] =
                                                 {(size_t) num_groups_212592 *
                                                 (size_t) segred_group_sizze_212591};
                                    const size_t local_work_sizze_230133[1] =
                                                 {(size_t) segred_group_sizze_212591};
                                    int64_t time_start_230130 = 0,
                                            time_end_230131 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_small_212598",
                                                global_work_sizze_230129[0],
                                                local_work_sizze_230133[0],
                                                (int) (0 + (int64_t) 4 *
                                                       segred_group_sizze_212591));
                                        time_start_230130 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_small_212598,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230129,
                                                                                    local_work_sizze_230133,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_small_212598_runs,
                                                                                                                              &ctx->mainzisegred_small_212598_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230131 = get_wall_time();
                                        
                                        long time_diff_230132 =
                                             time_end_230131 -
                                             time_start_230130;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_small_212598",
                                                time_diff_230132);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_227557 =
                                        sdiv_up64(num_groups_212592,
                                                  smax64((int64_t) 1, m_196691 *
                                                         l_n_m_196752));
                                int64_t elements_per_thread_227558 =
                                        sdiv_up64(q_l_196697,
                                                  segred_group_sizze_212591 *
                                                  groups_per_segment_227557);
                                int64_t virt_num_groups_227559 =
                                        groups_per_segment_227557 * (m_196691 *
                                                                     l_n_m_196752);
                                int64_t num_threads_227560 = num_groups_212592 *
                                        segred_group_sizze_212591;
                                int64_t threads_per_segment_227561 =
                                        groups_per_segment_227557 *
                                        segred_group_sizze_212591;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-large");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         l_n_m_196752), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_l_196697, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "virt_num_groups",
                                            (long long) virt_num_groups_227559,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_groups",
                                            (long long) num_groups_212592,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "group_size",
                                            (long long) segred_group_sizze_212591,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "elems_per_thread",
                                            (long long) elements_per_thread_227558,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_227557,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_227562;
                                
                                segred_tmp_mem_227562.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_227562,
                                                          (int64_t) 4 *
                                                          virt_num_groups_227559,
                                                          "segred_tmp_mem_227562")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_227564
                                                       =
                                                       ctx->mainzicounter_mem_227564;
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        1,
                                                                        (size_t) 1,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        2,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_212591),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        3,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        4,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        5,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        6,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        7,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        8,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        9,
                                                                        sizeof(num_groups_212592),
                                                                        &num_groups_212592));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        10,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        11,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        12,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        13,
                                                                        sizeof(groups_per_segment_227557),
                                                                        &groups_per_segment_227557));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        14,
                                                                        sizeof(elements_per_thread_227558),
                                                                        &elements_per_thread_227558));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        15,
                                                                        sizeof(virt_num_groups_227559),
                                                                        &virt_num_groups_227559));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        16,
                                                                        sizeof(threads_per_segment_227561),
                                                                        &threads_per_segment_227561));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        17,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        18,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        19,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        20,
                                                                        sizeof(mem_223653.mem),
                                                                        &mem_223653.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        21,
                                                                        sizeof(segred_tmp_mem_227562.mem),
                                                                        &segred_tmp_mem_227562.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212598,
                                                                        22,
                                                                        sizeof(mainzicounter_mem_227564.mem),
                                                                        &mainzicounter_mem_227564.mem));
                                if (1 * ((size_t) num_groups_212592 *
                                         (size_t) segred_group_sizze_212591) !=
                                    0) {
                                    const size_t global_work_sizze_230135[1] =
                                                 {(size_t) num_groups_212592 *
                                                 (size_t) segred_group_sizze_212591};
                                    const size_t local_work_sizze_230139[1] =
                                                 {(size_t) segred_group_sizze_212591};
                                    int64_t time_start_230136 = 0,
                                            time_end_230137 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_large_212598",
                                                global_work_sizze_230135[0],
                                                local_work_sizze_230139[0],
                                                (int) (0 + 1 + (int64_t) 4 *
                                                       segred_group_sizze_212591));
                                        time_start_230136 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_large_212598,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230135,
                                                                                    local_work_sizze_230139,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_large_212598_runs,
                                                                                                                              &ctx->mainzisegred_large_212598_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230137 = get_wall_time();
                                        
                                        long time_diff_230138 =
                                             time_end_230137 -
                                             time_start_230136;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_large_212598",
                                                time_diff_230138);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_227562,
                                                          "segred_tmp_mem_227562") !=
                                    0)
                                    return 1;
                            }
                            
                            int64_t segmap_usable_groups_212630 =
                                    sdiv_up64(nest_sizze_202575,
                                              segmap_group_sizze_212629);
                            struct memblock_device mem_223658;
                            
                            mem_223658.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223658,
                                                      bytes_222439,
                                                      "mem_223658")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212634,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212634,
                                                                    2,
                                                                    sizeof(l_n_m_196752),
                                                                    &l_n_m_196752));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212634,
                                                                    3,
                                                                    sizeof(mem_223653.mem),
                                                                    &mem_223653.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212634,
                                                                    4,
                                                                    sizeof(mem_223658.mem),
                                                                    &mem_223658.mem));
                            if (1 * ((size_t) segmap_usable_groups_212630 *
                                     (size_t) segmap_group_sizze_212629) != 0) {
                                const size_t global_work_sizze_230140[1] =
                                             {(size_t) segmap_usable_groups_212630 *
                                             (size_t) segmap_group_sizze_212629};
                                const size_t local_work_sizze_230144[1] =
                                             {(size_t) segmap_group_sizze_212629};
                                int64_t time_start_230141 = 0, time_end_230142 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_212634",
                                            global_work_sizze_230140[0],
                                            local_work_sizze_230144[0],
                                            (int) 0);
                                    time_start_230141 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_212634,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230140,
                                                                                local_work_sizze_230144,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_212634_runs,
                                                                                                                          &ctx->mainzisegmap_212634_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230142 = get_wall_time();
                                    
                                    long time_diff_230143 = time_end_230142 -
                                         time_start_230141;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_212634",
                                            time_diff_230143);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_223653,
                                                      "mem_223653") != 0)
                                return 1;
                            
                            struct memblock_device mem_223663;
                            
                            mem_223663.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223663,
                                                      bytes_222439,
                                                      "mem_223663")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (slt64(q_l_196697 * (int64_t) 2,
                                      segred_group_sizze_212640)) {
                                int64_t segment_sizze_nonzzero_227610 =
                                        smax64((int64_t) 1, q_l_196697);
                                int64_t num_threads_227611 = num_groups_212641 *
                                        segred_group_sizze_212640;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-small");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         l_n_m_196752), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_l_196697, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segments_per_group",
                                            (long long) squot64(segred_group_sizze_212640,
                                                                segment_sizze_nonzzero_227610),
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "required_groups",
                                            (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                               l_n_m_196752,
                                                                               squot64(segred_group_sizze_212640,
                                                                                       segment_sizze_nonzzero_227610))),
                                            '\n');
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        1,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_212640),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        2,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        3,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        4,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        5,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        6,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        7,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        8,
                                                                        sizeof(num_groups_212641),
                                                                        &num_groups_212641));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        9,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        10,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        11,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        12,
                                                                        sizeof(segment_sizze_nonzzero_227610),
                                                                        &segment_sizze_nonzzero_227610));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        13,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        14,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        15,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        16,
                                                                        sizeof(mem_223608.mem),
                                                                        &mem_223608.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        17,
                                                                        sizeof(mem_223658.mem),
                                                                        &mem_223658.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_212647,
                                                                        18,
                                                                        sizeof(mem_223663.mem),
                                                                        &mem_223663.mem));
                                if (1 * ((size_t) num_groups_212641 *
                                         (size_t) segred_group_sizze_212640) !=
                                    0) {
                                    const size_t global_work_sizze_230145[1] =
                                                 {(size_t) num_groups_212641 *
                                                 (size_t) segred_group_sizze_212640};
                                    const size_t local_work_sizze_230149[1] =
                                                 {(size_t) segred_group_sizze_212640};
                                    int64_t time_start_230146 = 0,
                                            time_end_230147 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_small_212647",
                                                global_work_sizze_230145[0],
                                                local_work_sizze_230149[0],
                                                (int) (0 + (int64_t) 4 *
                                                       segred_group_sizze_212640));
                                        time_start_230146 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_small_212647,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230145,
                                                                                    local_work_sizze_230149,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_small_212647_runs,
                                                                                                                              &ctx->mainzisegred_small_212647_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230147 = get_wall_time();
                                        
                                        long time_diff_230148 =
                                             time_end_230147 -
                                             time_start_230146;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_small_212647",
                                                time_diff_230148);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_227639 =
                                        sdiv_up64(num_groups_212641,
                                                  smax64((int64_t) 1, m_196691 *
                                                         l_n_m_196752));
                                int64_t elements_per_thread_227640 =
                                        sdiv_up64(q_l_196697,
                                                  segred_group_sizze_212640 *
                                                  groups_per_segment_227639);
                                int64_t virt_num_groups_227641 =
                                        groups_per_segment_227639 * (m_196691 *
                                                                     l_n_m_196752);
                                int64_t num_threads_227642 = num_groups_212641 *
                                        segred_group_sizze_212640;
                                int64_t threads_per_segment_227643 =
                                        groups_per_segment_227639 *
                                        segred_group_sizze_212640;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-large");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         l_n_m_196752), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_l_196697, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "virt_num_groups",
                                            (long long) virt_num_groups_227641,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_groups",
                                            (long long) num_groups_212641,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "group_size",
                                            (long long) segred_group_sizze_212640,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "elems_per_thread",
                                            (long long) elements_per_thread_227640,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_227639,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_227644;
                                
                                segred_tmp_mem_227644.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_227644,
                                                          (int64_t) 4 *
                                                          virt_num_groups_227641,
                                                          "segred_tmp_mem_227644")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_227646
                                                       =
                                                       ctx->mainzicounter_mem_227646;
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        1,
                                                                        (size_t) 1,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        2,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_212640),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        3,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        4,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        5,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        6,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        7,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        8,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        9,
                                                                        sizeof(num_groups_212641),
                                                                        &num_groups_212641));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        10,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        11,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        12,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        13,
                                                                        sizeof(groups_per_segment_227639),
                                                                        &groups_per_segment_227639));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        14,
                                                                        sizeof(elements_per_thread_227640),
                                                                        &elements_per_thread_227640));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        15,
                                                                        sizeof(virt_num_groups_227641),
                                                                        &virt_num_groups_227641));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        16,
                                                                        sizeof(threads_per_segment_227643),
                                                                        &threads_per_segment_227643));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        17,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        18,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        19,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        20,
                                                                        sizeof(mem_223608.mem),
                                                                        &mem_223608.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        21,
                                                                        sizeof(mem_223658.mem),
                                                                        &mem_223658.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        22,
                                                                        sizeof(mem_223663.mem),
                                                                        &mem_223663.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        23,
                                                                        sizeof(segred_tmp_mem_227644.mem),
                                                                        &segred_tmp_mem_227644.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_212647,
                                                                        24,
                                                                        sizeof(mainzicounter_mem_227646.mem),
                                                                        &mainzicounter_mem_227646.mem));
                                if (1 * ((size_t) num_groups_212641 *
                                         (size_t) segred_group_sizze_212640) !=
                                    0) {
                                    const size_t global_work_sizze_230151[1] =
                                                 {(size_t) num_groups_212641 *
                                                 (size_t) segred_group_sizze_212640};
                                    const size_t local_work_sizze_230155[1] =
                                                 {(size_t) segred_group_sizze_212640};
                                    int64_t time_start_230152 = 0,
                                            time_end_230153 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_large_212647",
                                                global_work_sizze_230151[0],
                                                local_work_sizze_230155[0],
                                                (int) (0 + 1 + (int64_t) 4 *
                                                       segred_group_sizze_212640));
                                        time_start_230152 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_large_212647,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230151,
                                                                                    local_work_sizze_230155,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_large_212647_runs,
                                                                                                                              &ctx->mainzisegred_large_212647_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230153 = get_wall_time();
                                        
                                        long time_diff_230154 =
                                             time_end_230153 -
                                             time_start_230152;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_large_212647",
                                                time_diff_230154);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_227644,
                                                          "segred_tmp_mem_227644") !=
                                    0)
                                    return 1;
                            }
                            if (memblock_unref_device(ctx, &mem_223658,
                                                      "mem_223658") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223664,
                                                    &mem_223663,
                                                    "mem_223663") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223663,
                                                      "mem_223663") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223658,
                                                      "mem_223658") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223653,
                                                      "mem_223653") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_223670,
                                                &ext_mem_223664,
                                                "ext_mem_223664") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223664,
                                                  "ext_mem_223664") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223904,
                                            &ext_mem_223670,
                                            "ext_mem_223670") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223903, &mem_223612,
                                            "mem_223612") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223670,
                                              "ext_mem_223670") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223612, "mem_223612") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_198372 = (int64_t) 1 == d_l_196700;
                    struct memblock_device ext_mem_223902;
                    
                    ext_mem_223902.references = NULL;
                    
                    struct memblock_device ext_mem_223901;
                    
                    ext_mem_223901.references = NULL;
                    if (match_lit_198372) {
                        bool suff_outer_par_212687;
                        
                        suff_outer_par_212687 =
                            *ctx->tuning_params.mainzisuff_outer_par_24 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_24", (long) m_196691,
                                    suff_outer_par_212687 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_212789;
                        
                        segmap_group_sizze_212789 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_212691;
                        
                        int64_t num_groups_212790;
                        int32_t max_num_groups_227684;
                        
                        max_num_groups_227684 =
                            *ctx->tuning_params.mainzisegmap_num_groups_212693;
                        num_groups_212790 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_212789),
                                                                       sext_i32_i64(max_num_groups_227684))));
                        
                        int64_t segmap_group_sizze_213305;
                        
                        segmap_group_sizze_213305 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_212891;
                        
                        bool suff_outer_par_213309;
                        
                        suff_outer_par_213309 =
                            *ctx->tuning_params.mainzisuff_outer_par_25 <=
                            nest_sizze_202575;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_25",
                                    (long) nest_sizze_202575,
                                    suff_outer_par_213309 ? "true" : "false");
                        
                        int64_t nest_sizze_213417 = q_l_196697 *
                                nest_sizze_202575;
                        int64_t segred_group_sizze_213418;
                        
                        segred_group_sizze_213418 =
                            *ctx->tuning_params.mainzisegred_group_sizze_213095;
                        
                        int64_t num_groups_213419;
                        int32_t max_num_groups_227685;
                        
                        max_num_groups_227685 =
                            *ctx->tuning_params.mainzisegred_num_groups_213097;
                        num_groups_213419 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_213417,
                                                                                 segred_group_sizze_213418),
                                                                       sext_i32_i64(max_num_groups_227685))));
                        
                        int64_t segmap_group_sizze_213466;
                        
                        segmap_group_sizze_213466 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_213073;
                        
                        int64_t segred_group_sizze_213488;
                        
                        segred_group_sizze_213488 =
                            *ctx->tuning_params.mainzisegred_group_sizze_213001;
                        
                        int64_t num_groups_213489;
                        int32_t max_num_groups_227686;
                        
                        max_num_groups_227686 =
                            *ctx->tuning_params.mainzisegred_num_groups_213003;
                        num_groups_213489 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_213417,
                                                                                 segred_group_sizze_213488),
                                                                       sext_i32_i64(max_num_groups_227686))));
                        
                        int64_t num_threads_225207 = segmap_group_sizze_212789 *
                                num_groups_212790;
                        int64_t total_sizze_225208 = bytes_222428 *
                                num_threads_225207;
                        int64_t total_sizze_225209 = bytes_222428 *
                                num_threads_225207;
                        struct memblock_device ext_mem_223777;
                        
                        ext_mem_223777.references = NULL;
                        
                        struct memblock_device ext_mem_223776;
                        
                        ext_mem_223776.references = NULL;
                        
                        int32_t local_memory_capacity_227933;
                        
                        local_memory_capacity_227933 =
                            ctx->opencl.max_local_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_227933)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_227933))) &&
                            suff_outer_par_212687) {
                            struct memblock_device mem_223673;
                            
                            mem_223673.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223673,
                                                      binop_y_222434,
                                                      "mem_223673")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_223673,
                                                                      (int64_t) 0,
                                                                      ext_mem_222469,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      l_n_m_196752,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223673,
                                                          "mem_223673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223776,
                                                          "ext_mem_223776") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223777,
                                                          "ext_mem_223777") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223676;
                            
                            mem_223676.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223676,
                                                      binop_y_222438,
                                                      "mem_223676")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223676,
                                                                      (int64_t) 0,
                                                                      ext_mem_222468,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      l_n_m_196752,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223676,
                                                          "mem_223676") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223673,
                                                          "mem_223673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223776,
                                                          "ext_mem_223776") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223777,
                                                          "ext_mem_223777") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223679;
                            
                            mem_223679.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223679,
                                                      binop_y_222520,
                                                      "mem_223679")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            int64_t group_sizze_227690;
                            
                            group_sizze_227690 =
                                *ctx->tuning_params.mainzigroup_sizze_227690;
                            
                            int64_t num_groups_227691 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_227690);
                            
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    0,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    1,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    2,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    3,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    4,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    5,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227687,
                                                                    6,
                                                                    sizeof(mem_223679.mem),
                                                                    &mem_223679.mem));
                            if (1 * ((size_t) num_groups_227691 *
                                     (size_t) group_sizze_227690) != 0) {
                                const size_t global_work_sizze_230156[1] =
                                             {(size_t) num_groups_227691 *
                                             (size_t) group_sizze_227690};
                                const size_t local_work_sizze_230160[1] =
                                             {(size_t) group_sizze_227690};
                                int64_t time_start_230157 = 0, time_end_230158 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.copy_227687",
                                            global_work_sizze_230156[0],
                                            local_work_sizze_230160[0],
                                            (int) 0);
                                    time_start_230157 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzicopy_227687,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230156,
                                                                                local_work_sizze_230160,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzicopy_227687_runs,
                                                                                                                          &ctx->mainzicopy_227687_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230158 = get_wall_time();
                                    
                                    long time_diff_230159 = time_end_230158 -
                                         time_start_230157;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.copy_227687",
                                            time_diff_230159);
                                }
                            }
                            
                            struct memblock_device mem_223682;
                            
                            mem_223682.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223682,
                                                      binop_y_222520,
                                                      "mem_223682")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223682,
                                                                      (int64_t) 0,
                                                                      mem_223608,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223682,
                                                          "mem_223682") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223679,
                                                          "mem_223679") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223676,
                                                          "mem_223676") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223673,
                                                          "mem_223673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223776,
                                                          "ext_mem_223776") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223777,
                                                          "ext_mem_223777") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223716;
                            
                            mem_223716.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223716,
                                                      binop_y_222438,
                                                      "mem_223716")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223719;
                            
                            mem_223719.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223719,
                                                      binop_y_222438,
                                                      "mem_223719")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225075;
                            
                            color_225075.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225075,
                                                      total_sizze_225208,
                                                      "color_225075")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225076;
                            
                            color_225076.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225076,
                                                      total_sizze_225209,
                                                      "color_225076")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    3,
                                                                    sizeof(q_l_196697),
                                                                    &q_l_196697));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    4,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    5,
                                                                    sizeof(l_n_m_196752),
                                                                    &l_n_m_196752));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    6,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    7,
                                                                    sizeof(num_groups_212790),
                                                                    &num_groups_212790));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    8,
                                                                    sizeof(num_threads_225207),
                                                                    &num_threads_225207));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    9,
                                                                    sizeof(mem_223673.mem),
                                                                    &mem_223673.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    10,
                                                                    sizeof(mem_223676.mem),
                                                                    &mem_223676.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    11,
                                                                    sizeof(mem_223679.mem),
                                                                    &mem_223679.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    12,
                                                                    sizeof(mem_223682.mem),
                                                                    &mem_223682.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    13,
                                                                    sizeof(mem_223716.mem),
                                                                    &mem_223716.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    14,
                                                                    sizeof(mem_223719.mem),
                                                                    &mem_223719.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    15,
                                                                    sizeof(color_225075.mem),
                                                                    &color_225075.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_212795,
                                                                    16,
                                                                    sizeof(color_225076.mem),
                                                                    &color_225076.mem));
                            if (1 * ((size_t) num_groups_212790 *
                                     (size_t) segmap_group_sizze_212789) != 0) {
                                const size_t global_work_sizze_230161[1] =
                                             {(size_t) num_groups_212790 *
                                             (size_t) segmap_group_sizze_212789};
                                const size_t local_work_sizze_230165[1] =
                                             {(size_t) segmap_group_sizze_212789};
                                int64_t time_start_230162 = 0, time_end_230163 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_212795",
                                            global_work_sizze_230161[0],
                                            local_work_sizze_230165[0],
                                            (int) 0);
                                    time_start_230162 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_212795,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230161,
                                                                                local_work_sizze_230165,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_212795_runs,
                                                                                                                          &ctx->mainzisegmap_212795_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230163 = get_wall_time();
                                    
                                    long time_diff_230164 = time_end_230163 -
                                         time_start_230162;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_212795",
                                            time_diff_230164);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_223673,
                                                      "mem_223673") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223676,
                                                      "mem_223676") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223679,
                                                      "mem_223679") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223682,
                                                      "mem_223682") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225075,
                                                      "color_225075") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225076,
                                                      "color_225076") != 0)
                                return 1;
                            
                            struct memblock_device mem_223769;
                            
                            mem_223769.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223769,
                                                      bytes_222439,
                                                      "mem_223769")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223769,
                                                                      (int64_t) 0,
                                                                      mem_223716,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      l_n_m_196752) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223769,
                                                          "mem_223769") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225076,
                                                          "color_225076") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225075,
                                                          "color_225075") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223719,
                                                          "mem_223719") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223716,
                                                          "mem_223716") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223682,
                                                          "mem_223682") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223679,
                                                          "mem_223679") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223676,
                                                          "mem_223676") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223673,
                                                          "mem_223673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223776,
                                                          "ext_mem_223776") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223777,
                                                          "ext_mem_223777") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223716,
                                                      "mem_223716") != 0)
                                return 1;
                            
                            struct memblock_device mem_223774;
                            
                            mem_223774.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223774,
                                                      bytes_222439,
                                                      "mem_223774")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223774,
                                                                      (int64_t) 0,
                                                                      mem_223719,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      l_n_m_196752) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223774,
                                                          "mem_223774") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223769,
                                                          "mem_223769") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225076,
                                                          "color_225076") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225075,
                                                          "color_225075") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223719,
                                                          "mem_223719") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223716,
                                                          "mem_223716") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223682,
                                                          "mem_223682") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223679,
                                                          "mem_223679") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223676,
                                                          "mem_223676") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223673,
                                                          "mem_223673") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223776,
                                                          "ext_mem_223776") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223777,
                                                          "ext_mem_223777") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223719,
                                                      "mem_223719") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223777,
                                                    &mem_223769,
                                                    "mem_223769") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223776,
                                                    &mem_223774,
                                                    "mem_223774") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223774,
                                                      "mem_223774") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223769,
                                                      "mem_223769") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225076,
                                                      "color_225076") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225075,
                                                      "color_225075") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223719,
                                                      "mem_223719") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223716,
                                                      "mem_223716") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223682,
                                                      "mem_223682") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223679,
                                                      "mem_223679") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223676,
                                                      "mem_223676") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223673,
                                                      "mem_223673") != 0)
                                return 1;
                        } else {
                            int64_t segmap_usable_groups_213306 =
                                    sdiv_up64(nest_sizze_202575,
                                              segmap_group_sizze_213305);
                            struct memblock_device ext_mem_223765;
                            
                            ext_mem_223765.references = NULL;
                            
                            struct memblock_device ext_mem_223764;
                            
                            ext_mem_223764.references = NULL;
                            
                            int32_t local_memory_capacity_227932;
                            
                            local_memory_capacity_227932 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_227932)) &&
                                suff_outer_par_213309) {
                                struct memblock_device mem_223724;
                                
                                mem_223724.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223724,
                                                          bytes_222439,
                                                          "mem_223724")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223728;
                                
                                mem_223728.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223728,
                                                          bytes_222439,
                                                          "mem_223728")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        2,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        3,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        4,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        5,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        6,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        7,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        8,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        9,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        10,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        11,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        12,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        13,
                                                                        sizeof(mem_223608.mem),
                                                                        &mem_223608.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        14,
                                                                        sizeof(mem_223724.mem),
                                                                        &mem_223724.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213316,
                                                                        15,
                                                                        sizeof(mem_223728.mem),
                                                                        &mem_223728.mem));
                                if (1 * ((size_t) segmap_usable_groups_213306 *
                                         (size_t) segmap_group_sizze_213305) !=
                                    0) {
                                    const size_t global_work_sizze_230166[1] =
                                                 {(size_t) segmap_usable_groups_213306 *
                                                 (size_t) segmap_group_sizze_213305};
                                    const size_t local_work_sizze_230170[1] =
                                                 {(size_t) segmap_group_sizze_213305};
                                    int64_t time_start_230167 = 0,
                                            time_end_230168 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_213316",
                                                global_work_sizze_230166[0],
                                                local_work_sizze_230170[0],
                                                (int) 0);
                                        time_start_230167 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_213316,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230166,
                                                                                    local_work_sizze_230170,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_213316_runs,
                                                                                                                              &ctx->mainzisegmap_213316_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230168 = get_wall_time();
                                        
                                        long time_diff_230169 =
                                             time_end_230168 -
                                             time_start_230167;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_213316",
                                                time_diff_230169);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_set_device(ctx, &ext_mem_223765,
                                                        &mem_223724,
                                                        "mem_223724") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223764,
                                                        &mem_223728,
                                                        "mem_223728") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223728,
                                                          "mem_223728") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223724,
                                                          "mem_223724") != 0)
                                    return 1;
                            } else {
                                struct memblock_device mem_223733;
                                
                                mem_223733.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223733,
                                                          bytes_222439,
                                                          "mem_223733")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223737;
                                
                                mem_223737.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223737,
                                                          bytes_222439,
                                                          "mem_223737")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223741;
                                
                                mem_223741.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223741,
                                                          bytes_222439,
                                                          "mem_223741")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_l_196697 * (int64_t) 2,
                                          segred_group_sizze_213418)) {
                                    int64_t segment_sizze_nonzzero_227736 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_227737 =
                                            num_groups_213419 *
                                            segred_group_sizze_213418;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_213418,
                                                                    segment_sizze_nonzzero_227736),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   l_n_m_196752,
                                                                                   squot64(segred_group_sizze_213418,
                                                                                           segment_sizze_nonzzero_227736))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            6,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            8,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            10,
                                                                            sizeof(num_groups_213419),
                                                                            &num_groups_213419));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            11,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            13,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            14,
                                                                            sizeof(segment_sizze_nonzzero_227736),
                                                                            &segment_sizze_nonzzero_227736));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            15,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            16,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            17,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            18,
                                                                            sizeof(mem_223733.mem),
                                                                            &mem_223733.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            19,
                                                                            sizeof(mem_223737.mem),
                                                                            &mem_223737.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213427,
                                                                            20,
                                                                            sizeof(mem_223741.mem),
                                                                            &mem_223741.mem));
                                    if (1 * ((size_t) num_groups_213419 *
                                             (size_t) segred_group_sizze_213418) !=
                                        0) {
                                        const size_t global_work_sizze_230171[1]
                                                     =
                                                     {(size_t) num_groups_213419 *
                                                     (size_t) segred_group_sizze_213418};
                                        const size_t local_work_sizze_230175[1]
                                                     =
                                                     {(size_t) segred_group_sizze_213418};
                                        int64_t time_start_230172 = 0,
                                                time_end_230173 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_213427",
                                                    global_work_sizze_230171[0],
                                                    local_work_sizze_230175[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_213418 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213418 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213418));
                                            time_start_230172 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_213427,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230171,
                                                                                        local_work_sizze_230175,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_213427_runs,
                                                                                                                                  &ctx->mainzisegred_small_213427_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230173 = get_wall_time();
                                            
                                            long time_diff_230174 =
                                                 time_end_230173 -
                                                 time_start_230172;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_213427",
                                                    time_diff_230174);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_227777 =
                                            sdiv_up64(num_groups_213419,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_227778 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_213418 *
                                                      groups_per_segment_227777);
                                    int64_t virt_num_groups_227779 =
                                            groups_per_segment_227777 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_227780 =
                                            num_groups_213419 *
                                            segred_group_sizze_213418;
                                    int64_t threads_per_segment_227781 =
                                            groups_per_segment_227777 *
                                            segred_group_sizze_213418;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_227779,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_213419,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_213418,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_227778,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_227777,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227782;
                                    
                                    segred_tmp_mem_227782.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227782,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227779,
                                                              "segred_tmp_mem_227782")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227784;
                                    
                                    segred_tmp_mem_227784.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227784,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227779,
                                                              "segred_tmp_mem_227784")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227786;
                                    
                                    segred_tmp_mem_227786.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227786,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227779,
                                                              "segred_tmp_mem_227786")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_227788 =
                                    ctx->mainzicounter_mem_227788;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213418),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            5,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            6,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            7,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            8,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            9,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            10,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            11,
                                                                            sizeof(num_groups_213419),
                                                                            &num_groups_213419));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            13,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            14,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            15,
                                                                            sizeof(groups_per_segment_227777),
                                                                            &groups_per_segment_227777));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            16,
                                                                            sizeof(elements_per_thread_227778),
                                                                            &elements_per_thread_227778));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            17,
                                                                            sizeof(virt_num_groups_227779),
                                                                            &virt_num_groups_227779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            18,
                                                                            sizeof(threads_per_segment_227781),
                                                                            &threads_per_segment_227781));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            19,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            20,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            21,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            22,
                                                                            sizeof(mem_223733.mem),
                                                                            &mem_223733.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            23,
                                                                            sizeof(mem_223737.mem),
                                                                            &mem_223737.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            24,
                                                                            sizeof(mem_223741.mem),
                                                                            &mem_223741.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            25,
                                                                            sizeof(segred_tmp_mem_227782.mem),
                                                                            &segred_tmp_mem_227782.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            26,
                                                                            sizeof(segred_tmp_mem_227784.mem),
                                                                            &segred_tmp_mem_227784.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            27,
                                                                            sizeof(segred_tmp_mem_227786.mem),
                                                                            &segred_tmp_mem_227786.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213427,
                                                                            28,
                                                                            sizeof(mainzicounter_mem_227788.mem),
                                                                            &mainzicounter_mem_227788.mem));
                                    if (1 * ((size_t) num_groups_213419 *
                                             (size_t) segred_group_sizze_213418) !=
                                        0) {
                                        const size_t global_work_sizze_230177[1]
                                                     =
                                                     {(size_t) num_groups_213419 *
                                                     (size_t) segred_group_sizze_213418};
                                        const size_t local_work_sizze_230181[1]
                                                     =
                                                     {(size_t) segred_group_sizze_213418};
                                        int64_t time_start_230178 = 0,
                                                time_end_230179 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_213427",
                                                    global_work_sizze_230177[0],
                                                    local_work_sizze_230181[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_213418 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213418 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213418));
                                            time_start_230178 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_213427,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230177,
                                                                                        local_work_sizze_230181,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_213427_runs,
                                                                                                                                  &ctx->mainzisegred_large_213427_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230179 = get_wall_time();
                                            
                                            long time_diff_230180 =
                                                 time_end_230179 -
                                                 time_start_230178;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_213427",
                                                    time_diff_230180);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227786,
                                                              "segred_tmp_mem_227786") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227784,
                                                              "segred_tmp_mem_227784") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227782,
                                                              "segred_tmp_mem_227782") !=
                                        0)
                                        return 1;
                                }
                                
                                int64_t segmap_usable_groups_213467 =
                                        sdiv_up64(nest_sizze_202575,
                                                  segmap_group_sizze_213466);
                                struct memblock_device mem_223746;
                                
                                mem_223746.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223746,
                                                          bytes_222439,
                                                          "mem_223746")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223750;
                                
                                mem_223750.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223750,
                                                          bytes_222439,
                                                          "mem_223750")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223754;
                                
                                mem_223754.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223754,
                                                          bytes_222439,
                                                          "mem_223754")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        2,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        3,
                                                                        sizeof(mem_223733.mem),
                                                                        &mem_223733.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        4,
                                                                        sizeof(mem_223737.mem),
                                                                        &mem_223737.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        5,
                                                                        sizeof(mem_223741.mem),
                                                                        &mem_223741.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        6,
                                                                        sizeof(mem_223746.mem),
                                                                        &mem_223746.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        7,
                                                                        sizeof(mem_223750.mem),
                                                                        &mem_223750.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213473,
                                                                        8,
                                                                        sizeof(mem_223754.mem),
                                                                        &mem_223754.mem));
                                if (1 * ((size_t) segmap_usable_groups_213467 *
                                         (size_t) segmap_group_sizze_213466) !=
                                    0) {
                                    const size_t global_work_sizze_230182[1] =
                                                 {(size_t) segmap_usable_groups_213467 *
                                                 (size_t) segmap_group_sizze_213466};
                                    const size_t local_work_sizze_230186[1] =
                                                 {(size_t) segmap_group_sizze_213466};
                                    int64_t time_start_230183 = 0,
                                            time_end_230184 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_213473",
                                                global_work_sizze_230182[0],
                                                local_work_sizze_230186[0],
                                                (int) 0);
                                        time_start_230183 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_213473,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230182,
                                                                                    local_work_sizze_230186,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_213473_runs,
                                                                                                                              &ctx->mainzisegmap_213473_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230184 = get_wall_time();
                                        
                                        long time_diff_230185 =
                                             time_end_230184 -
                                             time_start_230183;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_213473",
                                                time_diff_230185);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_223733,
                                                          "mem_223733") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223737,
                                                          "mem_223737") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223741,
                                                          "mem_223741") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223759;
                                
                                mem_223759.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223759,
                                                          bytes_222439,
                                                          "mem_223759")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223763;
                                
                                mem_223763.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223763,
                                                          bytes_222439,
                                                          "mem_223763")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_l_196697 * (int64_t) 2,
                                          segred_group_sizze_213488)) {
                                    int64_t segment_sizze_nonzzero_227846 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_227847 =
                                            num_groups_213489 *
                                            segred_group_sizze_213488;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_213488,
                                                                    segment_sizze_nonzzero_227846),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   l_n_m_196752,
                                                                                   squot64(segred_group_sizze_213488,
                                                                                           segment_sizze_nonzzero_227846))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213488),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213488),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            3,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            4,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            5,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            6,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            7,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            8,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            9,
                                                                            sizeof(num_groups_213489),
                                                                            &num_groups_213489));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            10,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            11,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            13,
                                                                            sizeof(segment_sizze_nonzzero_227846),
                                                                            &segment_sizze_nonzzero_227846));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            14,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            15,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            16,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            17,
                                                                            sizeof(mem_223608.mem),
                                                                            &mem_223608.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            18,
                                                                            sizeof(mem_223746.mem),
                                                                            &mem_223746.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            19,
                                                                            sizeof(mem_223750.mem),
                                                                            &mem_223750.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            20,
                                                                            sizeof(mem_223754.mem),
                                                                            &mem_223754.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            21,
                                                                            sizeof(mem_223759.mem),
                                                                            &mem_223759.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_213496,
                                                                            22,
                                                                            sizeof(mem_223763.mem),
                                                                            &mem_223763.mem));
                                    if (1 * ((size_t) num_groups_213489 *
                                             (size_t) segred_group_sizze_213488) !=
                                        0) {
                                        const size_t global_work_sizze_230187[1]
                                                     =
                                                     {(size_t) num_groups_213489 *
                                                     (size_t) segred_group_sizze_213488};
                                        const size_t local_work_sizze_230191[1]
                                                     =
                                                     {(size_t) segred_group_sizze_213488};
                                        int64_t time_start_230188 = 0,
                                                time_end_230189 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_213496",
                                                    global_work_sizze_230187[0],
                                                    local_work_sizze_230191[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_213488 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213488));
                                            time_start_230188 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_213496,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230187,
                                                                                        local_work_sizze_230191,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_213496_runs,
                                                                                                                                  &ctx->mainzisegred_small_213496_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230189 = get_wall_time();
                                            
                                            long time_diff_230190 =
                                                 time_end_230189 -
                                                 time_start_230188;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_213496",
                                                    time_diff_230190);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_227881 =
                                            sdiv_up64(num_groups_213489,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_227882 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_213488 *
                                                      groups_per_segment_227881);
                                    int64_t virt_num_groups_227883 =
                                            groups_per_segment_227881 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_227884 =
                                            num_groups_213489 *
                                            segred_group_sizze_213488;
                                    int64_t threads_per_segment_227885 =
                                            groups_per_segment_227881 *
                                            segred_group_sizze_213488;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_227883,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_213489,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_213488,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_227882,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_227881,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227886;
                                    
                                    segred_tmp_mem_227886.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227886,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227883,
                                                              "segred_tmp_mem_227886")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_227888;
                                    
                                    segred_tmp_mem_227888.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_227888,
                                                              (int64_t) 4 *
                                                              virt_num_groups_227883,
                                                              "segred_tmp_mem_227888")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_227890 =
                                    ctx->mainzicounter_mem_227890;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213488),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_213488),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            6,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            8,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            10,
                                                                            sizeof(num_groups_213489),
                                                                            &num_groups_213489));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            11,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            13,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            14,
                                                                            sizeof(groups_per_segment_227881),
                                                                            &groups_per_segment_227881));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            15,
                                                                            sizeof(elements_per_thread_227882),
                                                                            &elements_per_thread_227882));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            16,
                                                                            sizeof(virt_num_groups_227883),
                                                                            &virt_num_groups_227883));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            17,
                                                                            sizeof(threads_per_segment_227885),
                                                                            &threads_per_segment_227885));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            18,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            19,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            20,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            21,
                                                                            sizeof(mem_223608.mem),
                                                                            &mem_223608.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            22,
                                                                            sizeof(mem_223746.mem),
                                                                            &mem_223746.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            23,
                                                                            sizeof(mem_223750.mem),
                                                                            &mem_223750.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            24,
                                                                            sizeof(mem_223754.mem),
                                                                            &mem_223754.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            25,
                                                                            sizeof(mem_223759.mem),
                                                                            &mem_223759.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            26,
                                                                            sizeof(mem_223763.mem),
                                                                            &mem_223763.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            27,
                                                                            sizeof(segred_tmp_mem_227886.mem),
                                                                            &segred_tmp_mem_227886.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            28,
                                                                            sizeof(segred_tmp_mem_227888.mem),
                                                                            &segred_tmp_mem_227888.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_213496,
                                                                            29,
                                                                            sizeof(mainzicounter_mem_227890.mem),
                                                                            &mainzicounter_mem_227890.mem));
                                    if (1 * ((size_t) num_groups_213489 *
                                             (size_t) segred_group_sizze_213488) !=
                                        0) {
                                        const size_t global_work_sizze_230193[1]
                                                     =
                                                     {(size_t) num_groups_213489 *
                                                     (size_t) segred_group_sizze_213488};
                                        const size_t local_work_sizze_230197[1]
                                                     =
                                                     {(size_t) segred_group_sizze_213488};
                                        int64_t time_start_230194 = 0,
                                                time_end_230195 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_213496",
                                                    global_work_sizze_230193[0],
                                                    local_work_sizze_230197[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_213488 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_213488));
                                            time_start_230194 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_213496,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230193,
                                                                                        local_work_sizze_230197,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_213496_runs,
                                                                                                                                  &ctx->mainzisegred_large_213496_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230195 = get_wall_time();
                                            
                                            long time_diff_230196 =
                                                 time_end_230195 -
                                                 time_start_230194;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_213496",
                                                    time_diff_230196);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227888,
                                                              "segred_tmp_mem_227888") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_227886,
                                                              "segred_tmp_mem_227886") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_unref_device(ctx, &mem_223746,
                                                          "mem_223746") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223750,
                                                          "mem_223750") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223754,
                                                          "mem_223754") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223765,
                                                        &mem_223759,
                                                        "mem_223759") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223764,
                                                        &mem_223763,
                                                        "mem_223763") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223763,
                                                          "mem_223763") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223759,
                                                          "mem_223759") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223754,
                                                          "mem_223754") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223750,
                                                          "mem_223750") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223746,
                                                          "mem_223746") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223741,
                                                          "mem_223741") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223737,
                                                          "mem_223737") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223733,
                                                          "mem_223733") != 0)
                                    return 1;
                            }
                            if (memblock_set_device(ctx, &ext_mem_223777,
                                                    &ext_mem_223765,
                                                    "ext_mem_223765") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223776,
                                                    &ext_mem_223764,
                                                    "ext_mem_223764") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223764,
                                                      "ext_mem_223764") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223765,
                                                      "ext_mem_223765") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_223902,
                                                &ext_mem_223777,
                                                "ext_mem_223777") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223901,
                                                &ext_mem_223776,
                                                "ext_mem_223776") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223776,
                                                  "ext_mem_223776") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223777,
                                                  "ext_mem_223777") != 0)
                            return 1;
                    } else {
                        bool suff_outer_par_213552;
                        
                        suff_outer_par_213552 =
                            *ctx->tuning_params.mainzisuff_outer_par_26 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_26", (long) m_196691,
                                    suff_outer_par_213552 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_213686;
                        
                        segmap_group_sizze_213686 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_213556;
                        
                        int64_t num_groups_213687;
                        int32_t max_num_groups_227934;
                        
                        max_num_groups_227934 =
                            *ctx->tuning_params.mainzisegmap_num_groups_213558;
                        num_groups_213687 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_213686),
                                                                       sext_i32_i64(max_num_groups_227934))));
                        
                        int64_t segmap_group_sizze_214350;
                        
                        segmap_group_sizze_214350 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_213820;
                        
                        bool suff_outer_par_214354;
                        
                        suff_outer_par_214354 =
                            *ctx->tuning_params.mainzisuff_outer_par_27 <=
                            nest_sizze_202575;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_27",
                                    (long) nest_sizze_202575,
                                    suff_outer_par_214354 ? "true" : "false");
                        
                        int64_t nest_sizze_214494 = q_l_196697 *
                                nest_sizze_202575;
                        int64_t segred_group_sizze_214495;
                        
                        segred_group_sizze_214495 =
                            *ctx->tuning_params.mainzisegred_group_sizze_214092;
                        
                        int64_t num_groups_214496;
                        int32_t max_num_groups_227935;
                        
                        max_num_groups_227935 =
                            *ctx->tuning_params.mainzisegred_num_groups_214094;
                        num_groups_214496 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_214494,
                                                                                 segred_group_sizze_214495),
                                                                       sext_i32_i64(max_num_groups_227935))));
                        
                        int64_t segmap_group_sizze_214553;
                        
                        segmap_group_sizze_214553 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_214051;
                        
                        int64_t segred_group_sizze_214596;
                        
                        segred_group_sizze_214596 =
                            *ctx->tuning_params.mainzisegred_group_sizze_213966;
                        
                        int64_t num_groups_214597;
                        int32_t max_num_groups_227936;
                        
                        max_num_groups_227936 =
                            *ctx->tuning_params.mainzisegred_num_groups_213968;
                        num_groups_214597 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_214494,
                                                                                 segred_group_sizze_214596),
                                                                       sext_i32_i64(max_num_groups_227936))));
                        
                        int64_t num_threads_225214 = segmap_group_sizze_213686 *
                                num_groups_213687;
                        int64_t total_sizze_225215 = bytes_222428 *
                                num_threads_225214;
                        int64_t total_sizze_225216 = bytes_222428 *
                                num_threads_225214;
                        struct memblock_device ext_mem_223900;
                        
                        ext_mem_223900.references = NULL;
                        
                        struct memblock_device ext_mem_223899;
                        
                        ext_mem_223899.references = NULL;
                        
                        int32_t local_memory_capacity_228215;
                        
                        local_memory_capacity_228215 =
                            ctx->opencl.max_local_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228215)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228215))) &&
                            suff_outer_par_213552) {
                            struct memblock_device mem_223780;
                            
                            mem_223780.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223780,
                                                      binop_y_222434,
                                                      "mem_223780")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_223780,
                                                                      (int64_t) 0,
                                                                      ext_mem_222469,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      l_n_m_196752,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223780,
                                                          "mem_223780") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223899,
                                                          "ext_mem_223899") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223900,
                                                          "ext_mem_223900") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223783;
                            
                            mem_223783.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223783,
                                                      binop_y_222438,
                                                      "mem_223783")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223783,
                                                                      (int64_t) 0,
                                                                      ext_mem_222468,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      l_n_m_196752,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223783,
                                                          "mem_223783") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223780,
                                                          "mem_223780") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223899,
                                                          "ext_mem_223899") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223900,
                                                          "ext_mem_223900") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223786;
                            
                            mem_223786.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223786,
                                                      binop_y_222520,
                                                      "mem_223786")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            int64_t group_sizze_227940;
                            
                            group_sizze_227940 =
                                *ctx->tuning_params.mainzigroup_sizze_227940;
                            
                            int64_t num_groups_227941 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_227940);
                            
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    0,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    1,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    2,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    3,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    4,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    5,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_227937,
                                                                    6,
                                                                    sizeof(mem_223786.mem),
                                                                    &mem_223786.mem));
                            if (1 * ((size_t) num_groups_227941 *
                                     (size_t) group_sizze_227940) != 0) {
                                const size_t global_work_sizze_230198[1] =
                                             {(size_t) num_groups_227941 *
                                             (size_t) group_sizze_227940};
                                const size_t local_work_sizze_230202[1] =
                                             {(size_t) group_sizze_227940};
                                int64_t time_start_230199 = 0, time_end_230200 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.copy_227937",
                                            global_work_sizze_230198[0],
                                            local_work_sizze_230202[0],
                                            (int) 0);
                                    time_start_230199 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzicopy_227937,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230198,
                                                                                local_work_sizze_230202,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzicopy_227937_runs,
                                                                                                                          &ctx->mainzicopy_227937_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230200 = get_wall_time();
                                    
                                    long time_diff_230201 = time_end_230200 -
                                         time_start_230199;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.copy_227937",
                                            time_diff_230201);
                                }
                            }
                            
                            struct memblock_device mem_223789;
                            
                            mem_223789.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223789,
                                                      binop_y_222520,
                                                      "mem_223789")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223789,
                                                                      (int64_t) 0,
                                                                      mem_223608,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223789,
                                                          "mem_223789") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223786,
                                                          "mem_223786") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223783,
                                                          "mem_223783") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223780,
                                                          "mem_223780") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223899,
                                                          "ext_mem_223899") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223900,
                                                          "ext_mem_223900") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223823;
                            
                            mem_223823.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223823,
                                                      binop_y_222438,
                                                      "mem_223823")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_223826;
                            
                            mem_223826.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223826,
                                                      binop_y_222438,
                                                      "mem_223826")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225077;
                            
                            color_225077.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225077,
                                                      total_sizze_225215,
                                                      "color_225077")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225078;
                            
                            color_225078.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225078,
                                                      total_sizze_225216,
                                                      "color_225078")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    3,
                                                                    sizeof(q_l_196697),
                                                                    &q_l_196697));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    4,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    5,
                                                                    sizeof(l_n_m_196752),
                                                                    &l_n_m_196752));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    6,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    7,
                                                                    sizeof(num_groups_213687),
                                                                    &num_groups_213687));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    8,
                                                                    sizeof(num_threads_225214),
                                                                    &num_threads_225214));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    9,
                                                                    sizeof(mem_223780.mem),
                                                                    &mem_223780.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    10,
                                                                    sizeof(mem_223783.mem),
                                                                    &mem_223783.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    11,
                                                                    sizeof(mem_223786.mem),
                                                                    &mem_223786.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    12,
                                                                    sizeof(mem_223789.mem),
                                                                    &mem_223789.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    13,
                                                                    sizeof(mem_223823.mem),
                                                                    &mem_223823.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    14,
                                                                    sizeof(mem_223826.mem),
                                                                    &mem_223826.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    15,
                                                                    sizeof(color_225077.mem),
                                                                    &color_225077.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_213692,
                                                                    16,
                                                                    sizeof(color_225078.mem),
                                                                    &color_225078.mem));
                            if (1 * ((size_t) num_groups_213687 *
                                     (size_t) segmap_group_sizze_213686) != 0) {
                                const size_t global_work_sizze_230203[1] =
                                             {(size_t) num_groups_213687 *
                                             (size_t) segmap_group_sizze_213686};
                                const size_t local_work_sizze_230207[1] =
                                             {(size_t) segmap_group_sizze_213686};
                                int64_t time_start_230204 = 0, time_end_230205 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_213692",
                                            global_work_sizze_230203[0],
                                            local_work_sizze_230207[0],
                                            (int) 0);
                                    time_start_230204 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_213692,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230203,
                                                                                local_work_sizze_230207,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_213692_runs,
                                                                                                                          &ctx->mainzisegmap_213692_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230205 = get_wall_time();
                                    
                                    long time_diff_230206 = time_end_230205 -
                                         time_start_230204;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_213692",
                                            time_diff_230206);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_223780,
                                                      "mem_223780") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223783,
                                                      "mem_223783") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223786,
                                                      "mem_223786") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223789,
                                                      "mem_223789") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225077,
                                                      "color_225077") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225078,
                                                      "color_225078") != 0)
                                return 1;
                            
                            struct memblock_device mem_223892;
                            
                            mem_223892.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223892,
                                                      bytes_222439,
                                                      "mem_223892")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223892,
                                                                      (int64_t) 0,
                                                                      mem_223823,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      l_n_m_196752) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223892,
                                                          "mem_223892") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225078,
                                                          "color_225078") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225077,
                                                          "color_225077") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223826,
                                                          "mem_223826") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223823,
                                                          "mem_223823") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223789,
                                                          "mem_223789") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223786,
                                                          "mem_223786") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223783,
                                                          "mem_223783") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223780,
                                                          "mem_223780") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223899,
                                                          "ext_mem_223899") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223900,
                                                          "ext_mem_223900") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223823,
                                                      "mem_223823") != 0)
                                return 1;
                            
                            struct memblock_device mem_223897;
                            
                            mem_223897.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_223897,
                                                      bytes_222439,
                                                      "mem_223897")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_223897,
                                                                      (int64_t) 0,
                                                                      mem_223826,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      l_n_m_196752) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_223897,
                                                          "mem_223897") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223892,
                                                          "mem_223892") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225078,
                                                          "color_225078") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225077,
                                                          "color_225077") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223826,
                                                          "mem_223826") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223823,
                                                          "mem_223823") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223789,
                                                          "mem_223789") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223786,
                                                          "mem_223786") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223783,
                                                          "mem_223783") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223780,
                                                          "mem_223780") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223899,
                                                          "ext_mem_223899") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223900,
                                                          "ext_mem_223900") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223901,
                                                          "ext_mem_223901") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223902,
                                                          "ext_mem_223902") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223903,
                                                          "ext_mem_223903") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223904,
                                                          "ext_mem_223904") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_223826,
                                                      "mem_223826") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223900,
                                                    &mem_223892,
                                                    "mem_223892") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223899,
                                                    &mem_223897,
                                                    "mem_223897") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223897,
                                                      "mem_223897") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223892,
                                                      "mem_223892") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225078,
                                                      "color_225078") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225077,
                                                      "color_225077") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223826,
                                                      "mem_223826") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223823,
                                                      "mem_223823") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223789,
                                                      "mem_223789") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223786,
                                                      "mem_223786") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223783,
                                                      "mem_223783") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223780,
                                                      "mem_223780") != 0)
                                return 1;
                        } else {
                            int64_t segmap_usable_groups_214351 =
                                    sdiv_up64(nest_sizze_202575,
                                              segmap_group_sizze_214350);
                            struct memblock_device ext_mem_223888;
                            
                            ext_mem_223888.references = NULL;
                            
                            struct memblock_device ext_mem_223887;
                            
                            ext_mem_223887.references = NULL;
                            
                            int32_t local_memory_capacity_228214;
                            
                            local_memory_capacity_228214 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_228214)) &&
                                suff_outer_par_214354) {
                                struct memblock_device mem_223831;
                                
                                mem_223831.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223831,
                                                          bytes_222439,
                                                          "mem_223831")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223835;
                                
                                mem_223835.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223835,
                                                          bytes_222439,
                                                          "mem_223835")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        2,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        3,
                                                                        sizeof(q_l_196697),
                                                                        &q_l_196697));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        4,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        5,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        6,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        7,
                                                                        sizeof(ctx_param_ext_222545),
                                                                        &ctx_param_ext_222545));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        8,
                                                                        sizeof(ctx_param_ext_222546),
                                                                        &ctx_param_ext_222546));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        9,
                                                                        sizeof(ctx_param_ext_222548),
                                                                        &ctx_param_ext_222548));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        10,
                                                                        sizeof(ext_mem_222468.mem),
                                                                        &ext_mem_222468.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        11,
                                                                        sizeof(ext_mem_222469.mem),
                                                                        &ext_mem_222469.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        12,
                                                                        sizeof(mem_param_222550.mem),
                                                                        &mem_param_222550.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        13,
                                                                        sizeof(mem_223608.mem),
                                                                        &mem_223608.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        14,
                                                                        sizeof(mem_223831.mem),
                                                                        &mem_223831.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214361,
                                                                        15,
                                                                        sizeof(mem_223835.mem),
                                                                        &mem_223835.mem));
                                if (1 * ((size_t) segmap_usable_groups_214351 *
                                         (size_t) segmap_group_sizze_214350) !=
                                    0) {
                                    const size_t global_work_sizze_230208[1] =
                                                 {(size_t) segmap_usable_groups_214351 *
                                                 (size_t) segmap_group_sizze_214350};
                                    const size_t local_work_sizze_230212[1] =
                                                 {(size_t) segmap_group_sizze_214350};
                                    int64_t time_start_230209 = 0,
                                            time_end_230210 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_214361",
                                                global_work_sizze_230208[0],
                                                local_work_sizze_230212[0],
                                                (int) 0);
                                        time_start_230209 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_214361,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230208,
                                                                                    local_work_sizze_230212,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_214361_runs,
                                                                                                                              &ctx->mainzisegmap_214361_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230210 = get_wall_time();
                                        
                                        long time_diff_230211 =
                                             time_end_230210 -
                                             time_start_230209;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_214361",
                                                time_diff_230211);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_set_device(ctx, &ext_mem_223888,
                                                        &mem_223831,
                                                        "mem_223831") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223887,
                                                        &mem_223835,
                                                        "mem_223835") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223835,
                                                          "mem_223835") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223831,
                                                          "mem_223831") != 0)
                                    return 1;
                            } else {
                                struct memblock_device mem_223840;
                                
                                mem_223840.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223840,
                                                          bytes_222439,
                                                          "mem_223840")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223844;
                                
                                mem_223844.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223844,
                                                          bytes_222439,
                                                          "mem_223844")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223848;
                                
                                mem_223848.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223848,
                                                          bytes_222439,
                                                          "mem_223848")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223852;
                                
                                mem_223852.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223852,
                                                          bytes_222439,
                                                          "mem_223852")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223856;
                                
                                mem_223856.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223856,
                                                          bytes_222439,
                                                          "mem_223856")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_l_196697 * (int64_t) 2,
                                          segred_group_sizze_214495)) {
                                    int64_t segment_sizze_nonzzero_227990 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_227991 =
                                            num_groups_214496 *
                                            segred_group_sizze_214495;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_214495,
                                                                    segment_sizze_nonzzero_227990),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   l_n_m_196752,
                                                                                   squot64(segred_group_sizze_214495,
                                                                                           segment_sizze_nonzzero_227990))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            6,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            7,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            8,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            9,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            10,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            11,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            12,
                                                                            sizeof(num_groups_214496),
                                                                            &num_groups_214496));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            13,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            14,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            15,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            16,
                                                                            sizeof(segment_sizze_nonzzero_227990),
                                                                            &segment_sizze_nonzzero_227990));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            17,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            18,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            19,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            20,
                                                                            sizeof(mem_223840.mem),
                                                                            &mem_223840.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            21,
                                                                            sizeof(mem_223844.mem),
                                                                            &mem_223844.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            22,
                                                                            sizeof(mem_223848.mem),
                                                                            &mem_223848.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            23,
                                                                            sizeof(mem_223852.mem),
                                                                            &mem_223852.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214506,
                                                                            24,
                                                                            sizeof(mem_223856.mem),
                                                                            &mem_223856.mem));
                                    if (1 * ((size_t) num_groups_214496 *
                                             (size_t) segred_group_sizze_214495) !=
                                        0) {
                                        const size_t global_work_sizze_230213[1]
                                                     =
                                                     {(size_t) num_groups_214496 *
                                                     (size_t) segred_group_sizze_214495};
                                        const size_t local_work_sizze_230217[1]
                                                     =
                                                     {(size_t) segred_group_sizze_214495};
                                        int64_t time_start_230214 = 0,
                                                time_end_230215 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_214506",
                                                    global_work_sizze_230213[0],
                                                    local_work_sizze_230217[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495));
                                            time_start_230214 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_214506,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230213,
                                                                                        local_work_sizze_230217,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_214506_runs,
                                                                                                                                  &ctx->mainzisegred_small_214506_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230215 = get_wall_time();
                                            
                                            long time_diff_230216 =
                                                 time_end_230215 -
                                                 time_start_230214;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_214506",
                                                    time_diff_230216);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228043 =
                                            sdiv_up64(num_groups_214496,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_228044 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_214495 *
                                                      groups_per_segment_228043);
                                    int64_t virt_num_groups_228045 =
                                            groups_per_segment_228043 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_228046 =
                                            num_groups_214496 *
                                            segred_group_sizze_214495;
                                    int64_t threads_per_segment_228047 =
                                            groups_per_segment_228043 *
                                            segred_group_sizze_214495;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_228045,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_214496,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_214495,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_228044,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228043,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228048;
                                    
                                    segred_tmp_mem_228048.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228048,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228045,
                                                              "segred_tmp_mem_228048")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228050;
                                    
                                    segred_tmp_mem_228050.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228050,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228045,
                                                              "segred_tmp_mem_228050")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228052;
                                    
                                    segred_tmp_mem_228052.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228052,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228045,
                                                              "segred_tmp_mem_228052")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228054;
                                    
                                    segred_tmp_mem_228054.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228054,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228045,
                                                              "segred_tmp_mem_228054")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228056;
                                    
                                    segred_tmp_mem_228056.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228056,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228045,
                                                              "segred_tmp_mem_228056")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228058 =
                                    ctx->mainzicounter_mem_228058;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            6,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214495),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            7,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            8,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            9,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            10,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            11,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            12,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            13,
                                                                            sizeof(num_groups_214496),
                                                                            &num_groups_214496));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            14,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            15,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            16,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            17,
                                                                            sizeof(groups_per_segment_228043),
                                                                            &groups_per_segment_228043));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            18,
                                                                            sizeof(elements_per_thread_228044),
                                                                            &elements_per_thread_228044));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            19,
                                                                            sizeof(virt_num_groups_228045),
                                                                            &virt_num_groups_228045));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            20,
                                                                            sizeof(threads_per_segment_228047),
                                                                            &threads_per_segment_228047));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            21,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            22,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            23,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            24,
                                                                            sizeof(mem_223840.mem),
                                                                            &mem_223840.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            25,
                                                                            sizeof(mem_223844.mem),
                                                                            &mem_223844.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            26,
                                                                            sizeof(mem_223848.mem),
                                                                            &mem_223848.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            27,
                                                                            sizeof(mem_223852.mem),
                                                                            &mem_223852.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            28,
                                                                            sizeof(mem_223856.mem),
                                                                            &mem_223856.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            29,
                                                                            sizeof(segred_tmp_mem_228048.mem),
                                                                            &segred_tmp_mem_228048.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            30,
                                                                            sizeof(segred_tmp_mem_228050.mem),
                                                                            &segred_tmp_mem_228050.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            31,
                                                                            sizeof(segred_tmp_mem_228052.mem),
                                                                            &segred_tmp_mem_228052.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            32,
                                                                            sizeof(segred_tmp_mem_228054.mem),
                                                                            &segred_tmp_mem_228054.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            33,
                                                                            sizeof(segred_tmp_mem_228056.mem),
                                                                            &segred_tmp_mem_228056.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214506,
                                                                            34,
                                                                            sizeof(mainzicounter_mem_228058.mem),
                                                                            &mainzicounter_mem_228058.mem));
                                    if (1 * ((size_t) num_groups_214496 *
                                             (size_t) segred_group_sizze_214495) !=
                                        0) {
                                        const size_t global_work_sizze_230219[1]
                                                     =
                                                     {(size_t) num_groups_214496 *
                                                     (size_t) segred_group_sizze_214495};
                                        const size_t local_work_sizze_230223[1]
                                                     =
                                                     {(size_t) segred_group_sizze_214495};
                                        int64_t time_start_230220 = 0,
                                                time_end_230221 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_214506",
                                                    global_work_sizze_230219[0],
                                                    local_work_sizze_230223[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214495));
                                            time_start_230220 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_214506,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230219,
                                                                                        local_work_sizze_230223,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_214506_runs,
                                                                                                                                  &ctx->mainzisegred_large_214506_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230221 = get_wall_time();
                                            
                                            long time_diff_230222 =
                                                 time_end_230221 -
                                                 time_start_230220;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_214506",
                                                    time_diff_230222);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228056,
                                                              "segred_tmp_mem_228056") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228054,
                                                              "segred_tmp_mem_228054") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228052,
                                                              "segred_tmp_mem_228052") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228050,
                                                              "segred_tmp_mem_228050") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228048,
                                                              "segred_tmp_mem_228048") !=
                                        0)
                                        return 1;
                                }
                                
                                int64_t segmap_usable_groups_214554 =
                                        sdiv_up64(nest_sizze_202575,
                                                  segmap_group_sizze_214553);
                                struct memblock_device mem_223861;
                                
                                mem_223861.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223861,
                                                          bytes_222439,
                                                          "mem_223861")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223865;
                                
                                mem_223865.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223865,
                                                          bytes_222439,
                                                          "mem_223865")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223869;
                                
                                mem_223869.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223869,
                                                          bytes_222439,
                                                          "mem_223869")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223873;
                                
                                mem_223873.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223873,
                                                          bytes_222439,
                                                          "mem_223873")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223877;
                                
                                mem_223877.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223877,
                                                          bytes_222439,
                                                          "mem_223877")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        2,
                                                                        sizeof(l_n_m_196752),
                                                                        &l_n_m_196752));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        3,
                                                                        sizeof(mem_223840.mem),
                                                                        &mem_223840.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        4,
                                                                        sizeof(mem_223844.mem),
                                                                        &mem_223844.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        5,
                                                                        sizeof(mem_223848.mem),
                                                                        &mem_223848.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        6,
                                                                        sizeof(mem_223852.mem),
                                                                        &mem_223852.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        7,
                                                                        sizeof(mem_223856.mem),
                                                                        &mem_223856.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        8,
                                                                        sizeof(mem_223861.mem),
                                                                        &mem_223861.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        9,
                                                                        sizeof(mem_223865.mem),
                                                                        &mem_223865.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        10,
                                                                        sizeof(mem_223869.mem),
                                                                        &mem_223869.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        11,
                                                                        sizeof(mem_223873.mem),
                                                                        &mem_223873.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_214562,
                                                                        12,
                                                                        sizeof(mem_223877.mem),
                                                                        &mem_223877.mem));
                                if (1 * ((size_t) segmap_usable_groups_214554 *
                                         (size_t) segmap_group_sizze_214553) !=
                                    0) {
                                    const size_t global_work_sizze_230224[1] =
                                                 {(size_t) segmap_usable_groups_214554 *
                                                 (size_t) segmap_group_sizze_214553};
                                    const size_t local_work_sizze_230228[1] =
                                                 {(size_t) segmap_group_sizze_214553};
                                    int64_t time_start_230225 = 0,
                                            time_end_230226 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_214562",
                                                global_work_sizze_230224[0],
                                                local_work_sizze_230228[0],
                                                (int) 0);
                                        time_start_230225 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_214562,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230224,
                                                                                    local_work_sizze_230228,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_214562_runs,
                                                                                                                              &ctx->mainzisegmap_214562_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230226 = get_wall_time();
                                        
                                        long time_diff_230227 =
                                             time_end_230226 -
                                             time_start_230225;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_214562",
                                                time_diff_230227);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_223840,
                                                          "mem_223840") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223844,
                                                          "mem_223844") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223848,
                                                          "mem_223848") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223852,
                                                          "mem_223852") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223856,
                                                          "mem_223856") != 0)
                                    return 1;
                                
                                struct memblock_device mem_223882;
                                
                                mem_223882.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223882,
                                                          bytes_222439,
                                                          "mem_223882")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_223886;
                                
                                mem_223886.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_223886,
                                                          bytes_222439,
                                                          "mem_223886")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_l_196697 * (int64_t) 2,
                                          segred_group_sizze_214596)) {
                                    int64_t segment_sizze_nonzzero_228128 =
                                            smax64((int64_t) 1, q_l_196697);
                                    int64_t num_threads_228129 =
                                            num_groups_214597 *
                                            segred_group_sizze_214596;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_214596,
                                                                    segment_sizze_nonzzero_228128),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   l_n_m_196752,
                                                                                   squot64(segred_group_sizze_214596,
                                                                                           segment_sizze_nonzzero_228128))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214596),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214596),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            3,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            4,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            5,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            6,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            7,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            8,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            9,
                                                                            sizeof(num_groups_214597),
                                                                            &num_groups_214597));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            10,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            11,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            13,
                                                                            sizeof(segment_sizze_nonzzero_228128),
                                                                            &segment_sizze_nonzzero_228128));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            14,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            15,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            16,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            17,
                                                                            sizeof(mem_223608.mem),
                                                                            &mem_223608.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            18,
                                                                            sizeof(mem_223861.mem),
                                                                            &mem_223861.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            19,
                                                                            sizeof(mem_223865.mem),
                                                                            &mem_223865.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            20,
                                                                            sizeof(mem_223869.mem),
                                                                            &mem_223869.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            21,
                                                                            sizeof(mem_223873.mem),
                                                                            &mem_223873.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            22,
                                                                            sizeof(mem_223877.mem),
                                                                            &mem_223877.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            23,
                                                                            sizeof(mem_223882.mem),
                                                                            &mem_223882.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_214604,
                                                                            24,
                                                                            sizeof(mem_223886.mem),
                                                                            &mem_223886.mem));
                                    if (1 * ((size_t) num_groups_214597 *
                                             (size_t) segred_group_sizze_214596) !=
                                        0) {
                                        const size_t global_work_sizze_230229[1]
                                                     =
                                                     {(size_t) num_groups_214597 *
                                                     (size_t) segred_group_sizze_214596};
                                        const size_t local_work_sizze_230233[1]
                                                     =
                                                     {(size_t) segred_group_sizze_214596};
                                        int64_t time_start_230230 = 0,
                                                time_end_230231 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_214604",
                                                    global_work_sizze_230229[0],
                                                    local_work_sizze_230233[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_214596 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214596));
                                            time_start_230230 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_214604,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230229,
                                                                                        local_work_sizze_230233,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_214604_runs,
                                                                                                                                  &ctx->mainzisegred_small_214604_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230231 = get_wall_time();
                                            
                                            long time_diff_230232 =
                                                 time_end_230231 -
                                                 time_start_230230;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_214604",
                                                    time_diff_230232);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228163 =
                                            sdiv_up64(num_groups_214597,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             l_n_m_196752));
                                    int64_t elements_per_thread_228164 =
                                            sdiv_up64(q_l_196697,
                                                      segred_group_sizze_214596 *
                                                      groups_per_segment_228163);
                                    int64_t virt_num_groups_228165 =
                                            groups_per_segment_228163 *
                                            (m_196691 * l_n_m_196752);
                                    int64_t num_threads_228166 =
                                            num_groups_214597 *
                                            segred_group_sizze_214596;
                                    int64_t threads_per_segment_228167 =
                                            groups_per_segment_228163 *
                                            segred_group_sizze_214596;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             l_n_m_196752),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_l_196697, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_228165,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_214597,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_214596,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_228164,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228163,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228168;
                                    
                                    segred_tmp_mem_228168.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228168,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228165,
                                                              "segred_tmp_mem_228168")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228170;
                                    
                                    segred_tmp_mem_228170.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228170,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228165,
                                                              "segred_tmp_mem_228170")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228172 =
                                    ctx->mainzicounter_mem_228172;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214596),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_214596),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            6,
                                                                            sizeof(q_l_196697),
                                                                            &q_l_196697));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            8,
                                                                            sizeof(l_n_m_196752),
                                                                            &l_n_m_196752));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            10,
                                                                            sizeof(num_groups_214597),
                                                                            &num_groups_214597));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            11,
                                                                            sizeof(ctx_param_ext_222545),
                                                                            &ctx_param_ext_222545));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            12,
                                                                            sizeof(ctx_param_ext_222546),
                                                                            &ctx_param_ext_222546));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            13,
                                                                            sizeof(ctx_param_ext_222548),
                                                                            &ctx_param_ext_222548));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            14,
                                                                            sizeof(groups_per_segment_228163),
                                                                            &groups_per_segment_228163));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            15,
                                                                            sizeof(elements_per_thread_228164),
                                                                            &elements_per_thread_228164));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            16,
                                                                            sizeof(virt_num_groups_228165),
                                                                            &virt_num_groups_228165));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            17,
                                                                            sizeof(threads_per_segment_228167),
                                                                            &threads_per_segment_228167));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            18,
                                                                            sizeof(ext_mem_222468.mem),
                                                                            &ext_mem_222468.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            19,
                                                                            sizeof(ext_mem_222469.mem),
                                                                            &ext_mem_222469.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            20,
                                                                            sizeof(mem_param_222550.mem),
                                                                            &mem_param_222550.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            21,
                                                                            sizeof(mem_223608.mem),
                                                                            &mem_223608.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            22,
                                                                            sizeof(mem_223861.mem),
                                                                            &mem_223861.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            23,
                                                                            sizeof(mem_223865.mem),
                                                                            &mem_223865.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            24,
                                                                            sizeof(mem_223869.mem),
                                                                            &mem_223869.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            25,
                                                                            sizeof(mem_223873.mem),
                                                                            &mem_223873.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            26,
                                                                            sizeof(mem_223877.mem),
                                                                            &mem_223877.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            27,
                                                                            sizeof(mem_223882.mem),
                                                                            &mem_223882.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            28,
                                                                            sizeof(mem_223886.mem),
                                                                            &mem_223886.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            29,
                                                                            sizeof(segred_tmp_mem_228168.mem),
                                                                            &segred_tmp_mem_228168.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            30,
                                                                            sizeof(segred_tmp_mem_228170.mem),
                                                                            &segred_tmp_mem_228170.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_214604,
                                                                            31,
                                                                            sizeof(mainzicounter_mem_228172.mem),
                                                                            &mainzicounter_mem_228172.mem));
                                    if (1 * ((size_t) num_groups_214597 *
                                             (size_t) segred_group_sizze_214596) !=
                                        0) {
                                        const size_t global_work_sizze_230235[1]
                                                     =
                                                     {(size_t) num_groups_214597 *
                                                     (size_t) segred_group_sizze_214596};
                                        const size_t local_work_sizze_230239[1]
                                                     =
                                                     {(size_t) segred_group_sizze_214596};
                                        int64_t time_start_230236 = 0,
                                                time_end_230237 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_214604",
                                                    global_work_sizze_230235[0],
                                                    local_work_sizze_230239[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_214596 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_214596));
                                            time_start_230236 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_214604,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230235,
                                                                                        local_work_sizze_230239,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_214604_runs,
                                                                                                                                  &ctx->mainzisegred_large_214604_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230237 = get_wall_time();
                                            
                                            long time_diff_230238 =
                                                 time_end_230237 -
                                                 time_start_230236;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_214604",
                                                    time_diff_230238);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228170,
                                                              "segred_tmp_mem_228170") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228168,
                                                              "segred_tmp_mem_228168") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_unref_device(ctx, &mem_223861,
                                                          "mem_223861") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223865,
                                                          "mem_223865") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223869,
                                                          "mem_223869") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223873,
                                                          "mem_223873") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223877,
                                                          "mem_223877") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223888,
                                                        &mem_223882,
                                                        "mem_223882") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_223887,
                                                        &mem_223886,
                                                        "mem_223886") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223886,
                                                          "mem_223886") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223882,
                                                          "mem_223882") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223877,
                                                          "mem_223877") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223873,
                                                          "mem_223873") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223869,
                                                          "mem_223869") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223865,
                                                          "mem_223865") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223861,
                                                          "mem_223861") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223856,
                                                          "mem_223856") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223852,
                                                          "mem_223852") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223848,
                                                          "mem_223848") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223844,
                                                          "mem_223844") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223840,
                                                          "mem_223840") != 0)
                                    return 1;
                            }
                            if (memblock_set_device(ctx, &ext_mem_223900,
                                                    &ext_mem_223888,
                                                    "ext_mem_223888") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_223899,
                                                    &ext_mem_223887,
                                                    "ext_mem_223887") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223887,
                                                      "ext_mem_223887") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223888,
                                                      "ext_mem_223888") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_223902,
                                                &ext_mem_223900,
                                                "ext_mem_223900") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223901,
                                                &ext_mem_223899,
                                                "ext_mem_223899") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223899,
                                                  "ext_mem_223899") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223900,
                                                  "ext_mem_223900") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223904,
                                            &ext_mem_223902,
                                            "ext_mem_223902") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223903,
                                            &ext_mem_223901,
                                            "ext_mem_223901") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223901,
                                              "ext_mem_223901") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223902,
                                              "ext_mem_223902") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223965, &ext_mem_223904,
                                        "ext_mem_223904") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223964, &ext_mem_223903,
                                        "ext_mem_223903") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223903,
                                          "ext_mem_223903") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223904,
                                          "ext_mem_223904") != 0)
                    return 1;
            } else {
                bool match_lit_198597 = (int64_t) 0 == d_l_196700;
                int64_t binop_y_223911 = (int64_t) 4 * q_l_196697;
                int64_t bytes_223912 = smax64((int64_t) 0, binop_y_223911);
                struct memblock_device ext_mem_223963;
                
                ext_mem_223963.references = NULL;
                
                struct memblock_device ext_mem_223962;
                
                ext_mem_223962.references = NULL;
                if (match_lit_198597) {
                    struct memblock_device mem_223908;
                    
                    mem_223908.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223908, bytes_222439,
                                              "mem_223908")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_223908,
                                                      m_196691 * l_n_m_196752,
                                                      0.0F) != 0) {
                        if (memblock_unref_device(ctx, &mem_223908,
                                                  "mem_223908") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223962,
                                                  "ext_mem_223962") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223963,
                                                  "ext_mem_223963") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223964,
                                                  "ext_mem_223964") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223965,
                                                  "ext_mem_223965") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223603,
                                                  "ext_mem_223603") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223586,
                                                  "ext_mem_223586") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223569,
                                                  "ext_mem_223569") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223551,
                                                  "ext_mem_223551") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mem_223918;
                    
                    mem_223918.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223918, bytes_222439,
                                              "mem_223918")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_l_196697),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_l_196697),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            3,
                                                            (size_t) bytes_223912,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            4, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            5, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            6,
                                                            sizeof(q_l_196697),
                                                            &q_l_196697));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            7,
                                                            sizeof(jump_t_196702),
                                                            &jump_t_196702));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            8,
                                                            sizeof(l_n_m_196752),
                                                            &l_n_m_196752));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            9, sizeof(i_196779),
                                                            &i_196779));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            10,
                                                            sizeof(ctx_param_ext_222545),
                                                            &ctx_param_ext_222545));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            11,
                                                            sizeof(ctx_param_ext_222546),
                                                            &ctx_param_ext_222546));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            12,
                                                            sizeof(ctx_param_ext_222548),
                                                            &ctx_param_ext_222548));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            13,
                                                            sizeof(ext_mem_222468.mem),
                                                            &ext_mem_222468.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            14,
                                                            sizeof(ext_mem_222469.mem),
                                                            &ext_mem_222469.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            15,
                                                            sizeof(mem_param_222550.mem),
                                                            &mem_param_222550.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            16,
                                                            sizeof(mem_223608.mem),
                                                            &mem_223608.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214752,
                                                            17,
                                                            sizeof(mem_223918.mem),
                                                            &mem_223918.mem));
                    if (1 * ((size_t) nest_sizze_202575 *
                             (size_t) q_l_196697) != 0) {
                        const size_t global_work_sizze_230240[1] =
                                     {(size_t) nest_sizze_202575 *
                                     (size_t) q_l_196697};
                        const size_t local_work_sizze_230244[1] =
                                     {(size_t) q_l_196697};
                        int64_t time_start_230241 = 0, time_end_230242 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_intragroup_214752",
                                    global_work_sizze_230240[0],
                                    local_work_sizze_230244[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       q_l_196697 +
                                                                       (int64_t) 4 *
                                                                       q_l_196697 +
                                                                       bytes_223912));
                            time_start_230241 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_intragroup_214752,
                                                                        1, NULL,
                                                                        global_work_sizze_230240,
                                                                        local_work_sizze_230244,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_intragroup_214752_runs,
                                                                                                                  &ctx->mainzisegmap_intragroup_214752_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230242 = get_wall_time();
                            
                            long time_diff_230243 = time_end_230242 -
                                 time_start_230241;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_214752",
                                    time_diff_230243);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_set_device(ctx, &ext_mem_223963, &mem_223918,
                                            "mem_223918") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223962, &mem_223908,
                                            "mem_223908") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223918, "mem_223918") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223908, "mem_223908") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_198652 = (int64_t) 1 == d_l_196700;
                    struct memblock_device ext_mem_223961;
                    
                    ext_mem_223961.references = NULL;
                    
                    struct memblock_device ext_mem_223960;
                    
                    ext_mem_223960.references = NULL;
                    if (match_lit_198652) {
                        struct memblock_device mem_223931;
                        
                        mem_223931.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223931,
                                                  bytes_222439, "mem_223931")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223935;
                        
                        mem_223935.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223935,
                                                  bytes_222439, "mem_223935")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                6,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                7,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                8,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                9,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                10,
                                                                sizeof(q_l_196697),
                                                                &q_l_196697));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                11,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                12,
                                                                sizeof(l_n_m_196752),
                                                                &l_n_m_196752));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                13,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                14,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                15,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                16,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                17,
                                                                sizeof(ext_mem_222468.mem),
                                                                &ext_mem_222468.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                18,
                                                                sizeof(ext_mem_222469.mem),
                                                                &ext_mem_222469.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                19,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                20,
                                                                sizeof(mem_223608.mem),
                                                                &mem_223608.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                21,
                                                                sizeof(mem_223931.mem),
                                                                &mem_223931.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_214919,
                                                                22,
                                                                sizeof(mem_223935.mem),
                                                                &mem_223935.mem));
                        if (1 * ((size_t) nest_sizze_202575 *
                                 (size_t) q_l_196697) != 0) {
                            const size_t global_work_sizze_230245[1] =
                                         {(size_t) nest_sizze_202575 *
                                         (size_t) q_l_196697};
                            const size_t local_work_sizze_230249[1] =
                                         {(size_t) q_l_196697};
                            int64_t time_start_230246 = 0, time_end_230247 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_214919",
                                        global_work_sizze_230245[0],
                                        local_work_sizze_230249[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           bytes_223912 +
                                                                           bytes_223912));
                                time_start_230246 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_214919,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230245,
                                                                            local_work_sizze_230249,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_214919_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_214919_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230247 = get_wall_time();
                                
                                long time_diff_230248 = time_end_230247 -
                                     time_start_230246;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_214919",
                                        time_diff_230248);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_set_device(ctx, &ext_mem_223961,
                                                &mem_223931, "mem_223931") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223960,
                                                &mem_223935, "mem_223935") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223935,
                                                  "mem_223935") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223931,
                                                  "mem_223931") != 0)
                            return 1;
                    } else {
                        struct memblock_device mem_223955;
                        
                        mem_223955.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223955,
                                                  bytes_222439, "mem_223955")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223959;
                        
                        mem_223959.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223959,
                                                  bytes_222439, "mem_223959")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                6,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                7,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_l_196697),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                8,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                9,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                10,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                11,
                                                                (size_t) bytes_223912,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                12,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                13,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                14,
                                                                sizeof(q_l_196697),
                                                                &q_l_196697));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                15,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                16,
                                                                sizeof(l_n_m_196752),
                                                                &l_n_m_196752));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                17,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                18,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                19,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                20,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                21,
                                                                sizeof(ext_mem_222468.mem),
                                                                &ext_mem_222468.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                22,
                                                                sizeof(ext_mem_222469.mem),
                                                                &ext_mem_222469.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                23,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                24,
                                                                sizeof(mem_223608.mem),
                                                                &mem_223608.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                25,
                                                                sizeof(mem_223955.mem),
                                                                &mem_223955.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_215176,
                                                                26,
                                                                sizeof(mem_223959.mem),
                                                                &mem_223959.mem));
                        if (1 * ((size_t) nest_sizze_202575 *
                                 (size_t) q_l_196697) != 0) {
                            const size_t global_work_sizze_230250[1] =
                                         {(size_t) nest_sizze_202575 *
                                         (size_t) q_l_196697};
                            const size_t local_work_sizze_230254[1] =
                                         {(size_t) q_l_196697};
                            int64_t time_start_230251 = 0, time_end_230252 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_215176",
                                        global_work_sizze_230250[0],
                                        local_work_sizze_230254[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           (int64_t) 4 *
                                                                           q_l_196697 +
                                                                           bytes_223912 +
                                                                           bytes_223912 +
                                                                           bytes_223912 +
                                                                           bytes_223912));
                                time_start_230251 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_215176,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230250,
                                                                            local_work_sizze_230254,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_215176_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_215176_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230252 = get_wall_time();
                                
                                long time_diff_230253 = time_end_230252 -
                                     time_start_230251;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_215176",
                                        time_diff_230253);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_set_device(ctx, &ext_mem_223961,
                                                &mem_223955, "mem_223955") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_223960,
                                                &mem_223959, "mem_223959") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223959,
                                                  "mem_223959") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223955,
                                                  "mem_223955") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_223963,
                                            &ext_mem_223961,
                                            "ext_mem_223961") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_223962,
                                            &ext_mem_223960,
                                            "ext_mem_223960") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223960,
                                              "ext_mem_223960") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223961,
                                              "ext_mem_223961") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_223965, &ext_mem_223963,
                                        "ext_mem_223963") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_223964, &ext_mem_223962,
                                        "ext_mem_223962") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223962,
                                          "ext_mem_223962") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_223963,
                                          "ext_mem_223963") != 0)
                    return 1;
            }
            
            struct memblock_device ext_mem_223971;
            
            ext_mem_223971.references = NULL;
            if (cond_197220) {
                bool zzero_198896 = jump_l_196703 == (int64_t) 0;
                bool nonzzero_198897 = !zzero_198896;
                bool nonzzero_cert_198898;
                
                if (!nonzzero_198897) {
                    ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                                           "division by zero",
                                           "-> #0  loess.fut:546:20-27\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:545:3-549:9\n   #5  stl.fut:252:23-75\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:250:15-253:43\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
                    if (memblock_unref_device(ctx, &ext_mem_223971,
                                              "ext_mem_223971") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223964,
                                              "ext_mem_223964") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223965,
                                              "ext_mem_223965") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223603,
                                              "ext_mem_223603") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                int64_t y_198899 = sub64(l_n_m_196752, (int64_t) 1);
                int64_t segmap_group_sizze_215427;
                
                segmap_group_sizze_215427 =
                    *ctx->tuning_params.mainzisegmap_group_sizze_215309;
                
                int64_t segmap_usable_groups_215428 =
                        sdiv_up64(nest_sizze_200083, segmap_group_sizze_215427);
                struct memblock_device mem_223970;
                
                mem_223970.references = NULL;
                if (memblock_alloc_device(ctx, &mem_223970, bytes_222521,
                                          "mem_223970")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        3, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        4, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        5,
                                                        sizeof(jump_l_196703),
                                                        &jump_l_196703));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        6, sizeof(l_n_m_196752),
                                                        &l_n_m_196752));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        7, sizeof(i_196779),
                                                        &i_196779));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        8, sizeof(y_198899),
                                                        &y_198899));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        9,
                                                        sizeof(ext_mem_223964.mem),
                                                        &ext_mem_223964.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        10,
                                                        sizeof(ext_mem_223965.mem),
                                                        &ext_mem_223965.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215432,
                                                        11,
                                                        sizeof(mem_223970.mem),
                                                        &mem_223970.mem));
                if (1 * ((size_t) segmap_usable_groups_215428 *
                         (size_t) segmap_group_sizze_215427) != 0) {
                    const size_t global_work_sizze_230255[1] =
                                 {(size_t) segmap_usable_groups_215428 *
                                 (size_t) segmap_group_sizze_215427};
                    const size_t local_work_sizze_230259[1] =
                                 {(size_t) segmap_group_sizze_215427};
                    int64_t time_start_230256 = 0, time_end_230257 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_215432",
                                global_work_sizze_230255[0],
                                local_work_sizze_230259[0], (int) 0);
                        time_start_230256 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_215432,
                                                                    1, NULL,
                                                                    global_work_sizze_230255,
                                                                    local_work_sizze_230259,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_215432_runs,
                                                                                                              &ctx->mainzisegmap_215432_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230257 = get_wall_time();
                        
                        long time_diff_230258 = time_end_230257 -
                             time_start_230256;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_215432", time_diff_230258);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_set_device(ctx, &ext_mem_223971, &mem_223970,
                                        "mem_223970") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223970, "mem_223970") != 0)
                    return 1;
            } else {
                bool dim_match_198951 = n_196692 == l_n_m_196752;
                bool empty_or_match_cert_198952;
                
                if (!dim_match_198951) {
                    ctx->error =
                        msgprintf("Error: %s%lld%s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                                  "Value of (core language) shape (",
                                  (long long) m_196691, ", ",
                                  (long long) l_n_m_196752,
                                  ") cannot match shape of type `[",
                                  (long long) m_196691, "][",
                                  (long long) n_196692, "]t`.",
                                  "-> #0  stl.fut:255:15-36\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
                    if (memblock_unref_device(ctx, &ext_mem_223971,
                                              "ext_mem_223971") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223964,
                                              "ext_mem_223964") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223965,
                                              "ext_mem_223965") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223603,
                                              "ext_mem_223603") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                if (memblock_set_device(ctx, &ext_mem_223971, &ext_mem_223965,
                                        "ext_mem_223965") != 0)
                    return 1;
            }
            if (memblock_unref_device(ctx, &ext_mem_223964, "ext_mem_223964") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223965, "ext_mem_223965") !=
                0)
                return 1;
            
            struct memblock_device mem_223977;
            
            mem_223977.references = NULL;
            if (memblock_alloc_device(ctx, &mem_223977, bytes_222521,
                                      "mem_223977")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 2,
                                                    sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 3,
                                                    sizeof(n_p_196694),
                                                    &n_p_196694));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 4,
                                                    sizeof(C_len_196743),
                                                    &C_len_196743));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 5,
                                                    sizeof(ext_223972),
                                                    &ext_223972));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 6,
                                                    sizeof(mem_223557.mem),
                                                    &mem_223557.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 7,
                                                    sizeof(ext_mem_223971.mem),
                                                    &ext_mem_223971.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215527, 8,
                                                    sizeof(mem_223977.mem),
                                                    &mem_223977.mem));
            if (1 * ((size_t) segmap_usable_groups_215523 *
                     (size_t) segmap_group_sizze_215522) != 0) {
                const size_t global_work_sizze_230260[1] =
                             {(size_t) segmap_usable_groups_215523 *
                             (size_t) segmap_group_sizze_215522};
                const size_t local_work_sizze_230264[1] =
                             {(size_t) segmap_group_sizze_215522};
                int64_t time_start_230261 = 0, time_end_230262 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_215527", global_work_sizze_230260[0],
                            local_work_sizze_230264[0], (int) 0);
                    time_start_230261 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_215527,
                                                                1, NULL,
                                                                global_work_sizze_230260,
                                                                local_work_sizze_230264,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_215527_runs,
                                                                                                          &ctx->mainzisegmap_215527_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_230262 = get_wall_time();
                    
                    long time_diff_230263 = time_end_230262 - time_start_230261;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_215527", time_diff_230263);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_unref_device(ctx, &ext_mem_223971, "ext_mem_223971") !=
                0)
                return 1;
            
            struct memblock_device ext_mem_224571;
            
            ext_mem_224571.references = NULL;
            
            struct memblock_device ext_mem_224570;
            
            ext_mem_224570.references = NULL;
            if (cond_197278) {
                bool match_lit_198964 = (int64_t) 0 == d_t_196699;
                struct memblock_device ext_mem_224468;
                
                ext_mem_224468.references = NULL;
                
                struct memblock_device ext_mem_224467;
                
                ext_mem_224467.references = NULL;
                if (match_lit_198964) {
                    struct memblock_device mem_223981;
                    
                    mem_223981.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_223981, bytes_222488,
                                              "mem_223981")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_223981,
                                                      m_196691 * t_n_m_196759,
                                                      0.0F) != 0) {
                        if (memblock_unref_device(ctx, &mem_223981,
                                                  "mem_223981") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224467,
                                                  "ext_mem_224467") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224468,
                                                  "ext_mem_224468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224570,
                                                  "ext_mem_224570") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224571,
                                                  "ext_mem_224571") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223977,
                                                  "mem_223977") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223971,
                                                  "ext_mem_223971") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223964,
                                                  "ext_mem_223964") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223965,
                                                  "ext_mem_223965") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223603,
                                                  "ext_mem_223603") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223586,
                                                  "ext_mem_223586") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223569,
                                                  "ext_mem_223569") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223551,
                                                  "ext_mem_223551") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    bool suff_outer_par_215533;
                    
                    suff_outer_par_215533 =
                        *ctx->tuning_params.mainzisuff_outer_par_28 <= m_196691;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_28", (long) m_196691,
                                suff_outer_par_215533 ? "true" : "false");
                    
                    int64_t segmap_group_sizze_215629;
                    
                    segmap_group_sizze_215629 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_215537;
                    
                    int64_t num_groups_215630;
                    int32_t max_num_groups_228312;
                    
                    max_num_groups_228312 =
                        *ctx->tuning_params.mainzisegmap_num_groups_215539;
                    num_groups_215630 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(m_196691,
                                                                             segmap_group_sizze_215629),
                                                                   sext_i32_i64(max_num_groups_228312))));
                    
                    int64_t segmap_group_sizze_216145;
                    
                    segmap_group_sizze_216145 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_216119;
                    
                    int64_t segmap_group_sizze_216161;
                    
                    segmap_group_sizze_216161 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_216063;
                    
                    int64_t segmap_group_sizze_216186;
                    
                    segmap_group_sizze_216186 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_215726;
                    
                    bool suff_outer_par_216190;
                    
                    suff_outer_par_216190 =
                        *ctx->tuning_params.mainzisuff_outer_par_29 <=
                        nest_sizze_203201;
                    if (ctx->logging)
                        fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                "main.suff_outer_par_29",
                                (long) nest_sizze_203201,
                                suff_outer_par_216190 ? "true" : "false");
                    
                    int64_t nest_sizze_216272 = q_t_196696 * nest_sizze_203201;
                    int64_t segred_group_sizze_216273;
                    
                    segred_group_sizze_216273 =
                        *ctx->tuning_params.mainzisegred_group_sizze_215877;
                    
                    int64_t num_groups_216274;
                    int32_t max_num_groups_228313;
                    
                    max_num_groups_228313 =
                        *ctx->tuning_params.mainzisegred_num_groups_215879;
                    num_groups_216274 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_216272,
                                                                             segred_group_sizze_216273),
                                                                   sext_i32_i64(max_num_groups_228313))));
                    
                    int64_t segmap_group_sizze_216314;
                    
                    segmap_group_sizze_216314 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_215864;
                    
                    int64_t segred_group_sizze_216325;
                    
                    segred_group_sizze_216325 =
                        *ctx->tuning_params.mainzisegred_group_sizze_215807;
                    
                    int64_t num_groups_216326;
                    int32_t max_num_groups_228314;
                    
                    max_num_groups_228314 =
                        *ctx->tuning_params.mainzisegred_num_groups_215809;
                    num_groups_216326 = sext_i64_i32(smax64((int64_t) 1,
                                                            smin64(sdiv_up64(nest_sizze_216272,
                                                                             segred_group_sizze_216325),
                                                                   sext_i32_i64(max_num_groups_228314))));
                    
                    int64_t binop_y_224001 = (int64_t) 4 * n_196692;
                    int64_t bytes_224002 = smax64((int64_t) 0, binop_y_224001);
                    int64_t maxSubHelper_225086 = umax64(bytes_222477,
                                                         bytes_224002);
                    int64_t num_threads_225226 = segmap_group_sizze_215629 *
                            num_groups_215630;
                    int64_t total_sizze_225227 = maxSubHelper_225086 *
                            num_threads_225226;
                    int64_t total_sizze_225228 = bytes_224002 *
                            num_threads_225226;
                    int64_t total_sizze_225229 = bytes_224002 *
                            num_threads_225226;
                    struct memblock_device ext_mem_224104;
                    
                    ext_mem_224104.references = NULL;
                    
                    int32_t local_memory_capacity_228533;
                    
                    local_memory_capacity_228533 = ctx->opencl.max_local_memory;
                    if ((sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_228533)) &&
                         sle64((int64_t) 0,
                               sext_i32_i64(local_memory_capacity_228533))) &&
                        suff_outer_par_215533) {
                        struct memblock_device mem_223984;
                        
                        mem_223984.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223984,
                                                  binop_y_222520,
                                                  "mem_223984")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223984,
                                                                  (int64_t) 0,
                                                                  Y_mem_222225,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_196692,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223987;
                        
                        mem_223987.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223987,
                                                  binop_y_222520,
                                                  "mem_223987")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223987,
                                                                  (int64_t) 0,
                                                                  mem_223977,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_196692,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223987,
                                                      "mem_223987") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223990;
                        
                        mem_223990.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223990,
                                                  binop_y_222236,
                                                  "mem_223990")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_223990,
                                                                  (int64_t) 0,
                                                                  ext_mem_222257,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  n_196692,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223990,
                                                      "mem_223990") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223987,
                                                      "mem_223987") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223993;
                        
                        mem_223993.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223993,
                                                  binop_y_222483,
                                                  "mem_223993")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                  mem_223993,
                                                                  (int64_t) 0,
                                                                  ext_mem_222518,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  t_n_m_196759,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223993,
                                                      "mem_223993") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223990,
                                                      "mem_223990") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223987,
                                                      "mem_223987") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223996;
                        
                        mem_223996.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223996,
                                                  binop_y_222487,
                                                  "mem_223996")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_223996,
                                                                  (int64_t) 0,
                                                                  ext_mem_222517,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  t_n_m_196759,
                                                                  m_196691) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_223996,
                                                      "mem_223996") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223993,
                                                      "mem_223993") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223990,
                                                      "mem_223990") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223987,
                                                      "mem_223987") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_223999;
                        
                        mem_223999.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_223999,
                                                  binop_y_222520,
                                                  "mem_223999")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        int64_t group_sizze_228318;
                        
                        group_sizze_228318 =
                            *ctx->tuning_params.mainzigroup_sizze_228318;
                        
                        int64_t num_groups_228319 = sdiv_up64(m_196691 *
                                                              n_196692,
                                                              group_sizze_228318);
                        
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                0,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                1,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                2,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                3,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                4,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                5,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228315,
                                                                6,
                                                                sizeof(mem_223999.mem),
                                                                &mem_223999.mem));
                        if (1 * ((size_t) num_groups_228319 *
                                 (size_t) group_sizze_228318) != 0) {
                            const size_t global_work_sizze_230265[1] =
                                         {(size_t) num_groups_228319 *
                                         (size_t) group_sizze_228318};
                            const size_t local_work_sizze_230269[1] =
                                         {(size_t) group_sizze_228318};
                            int64_t time_start_230266 = 0, time_end_230267 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.copy_228315",
                                        global_work_sizze_230265[0],
                                        local_work_sizze_230269[0], (int) 0);
                                time_start_230266 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzicopy_228315,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230265,
                                                                            local_work_sizze_230269,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzicopy_228315_runs,
                                                                                                                      &ctx->mainzicopy_228315_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230267 = get_wall_time();
                                
                                long time_diff_230268 = time_end_230267 -
                                     time_start_230266;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.copy_228315", time_diff_230268);
                            }
                        }
                        
                        struct memblock_device mem_224063;
                        
                        mem_224063.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224063,
                                                  binop_y_222487,
                                                  "mem_224063")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device color_225087;
                        
                        color_225087.references = NULL;
                        if (memblock_alloc_device(ctx, &color_225087,
                                                  total_sizze_225227,
                                                  "color_225087")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device color_225088;
                        
                        color_225088.references = NULL;
                        if (memblock_alloc_device(ctx, &color_225088,
                                                  total_sizze_225228,
                                                  "color_225088")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device color_225089;
                        
                        color_225089.references = NULL;
                        if (memblock_alloc_device(ctx, &color_225089,
                                                  total_sizze_225229,
                                                  "color_225089")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                1,
                                                                sizeof(ctx->failure_is_an_option),
                                                                &ctx->failure_is_an_option));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                3,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                4,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                5,
                                                                sizeof(q_t_196696),
                                                                &q_t_196696));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                6,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                7,
                                                                sizeof(t_n_m_196759),
                                                                &t_n_m_196759));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                8,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                9,
                                                                sizeof(num_groups_215630),
                                                                &num_groups_215630));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                10,
                                                                sizeof(num_threads_225226),
                                                                &num_threads_225226));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                11,
                                                                sizeof(ext_mem_222256.mem),
                                                                &ext_mem_222256.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                12,
                                                                sizeof(mem_223984.mem),
                                                                &mem_223984.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                13,
                                                                sizeof(mem_223987.mem),
                                                                &mem_223987.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                14,
                                                                sizeof(mem_223990.mem),
                                                                &mem_223990.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                15,
                                                                sizeof(mem_223993.mem),
                                                                &mem_223993.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                16,
                                                                sizeof(mem_223996.mem),
                                                                &mem_223996.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                17,
                                                                sizeof(mem_223999.mem),
                                                                &mem_223999.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                18,
                                                                sizeof(mem_224063.mem),
                                                                &mem_224063.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                19,
                                                                sizeof(color_225087.mem),
                                                                &color_225087.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                20,
                                                                sizeof(color_225088.mem),
                                                                &color_225088.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_215634,
                                                                21,
                                                                sizeof(color_225089.mem),
                                                                &color_225089.mem));
                        if (1 * ((size_t) num_groups_215630 *
                                 (size_t) segmap_group_sizze_215629) != 0) {
                            const size_t global_work_sizze_230270[1] =
                                         {(size_t) num_groups_215630 *
                                         (size_t) segmap_group_sizze_215629};
                            const size_t local_work_sizze_230274[1] =
                                         {(size_t) segmap_group_sizze_215629};
                            int64_t time_start_230271 = 0, time_end_230272 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_215634",
                                        global_work_sizze_230270[0],
                                        local_work_sizze_230274[0], (int) 0);
                                time_start_230271 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_215634,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230270,
                                                                            local_work_sizze_230274,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_215634_runs,
                                                                                                                      &ctx->mainzisegmap_215634_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230272 = get_wall_time();
                                
                                long time_diff_230273 = time_end_230272 -
                                     time_start_230271;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_215634", time_diff_230273);
                            }
                        }
                        ctx->failure_is_an_option = 1;
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_223984,
                                                  "mem_223984") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223987,
                                                  "mem_223987") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223990,
                                                  "mem_223990") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223993,
                                                  "mem_223993") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223996,
                                                  "mem_223996") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223999,
                                                  "mem_223999") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225087,
                                                  "color_225087") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225088,
                                                  "color_225088") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225089,
                                                  "color_225089") != 0)
                            return 1;
                        
                        struct memblock_device mem_224102;
                        
                        mem_224102.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224102,
                                                  bytes_222488, "mem_224102")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                  mem_224102,
                                                                  (int64_t) 0,
                                                                  mem_224063,
                                                                  (int64_t) 0,
                                                                  (int64_t) 1,
                                                                  m_196691,
                                                                  t_n_m_196759) !=
                            0) {
                            if (memblock_unref_device(ctx, &mem_224102,
                                                      "mem_224102") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225089,
                                                      "color_225089") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225088,
                                                      "color_225088") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225087,
                                                      "color_225087") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224063,
                                                      "mem_224063") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223999,
                                                      "mem_223999") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223996,
                                                      "mem_223996") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223993,
                                                      "mem_223993") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223990,
                                                      "mem_223990") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223987,
                                                      "mem_223987") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223984,
                                                      "mem_223984") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224104,
                                                      "ext_mem_224104") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223981,
                                                      "mem_223981") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224467,
                                                      "ext_mem_224467") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224468,
                                                      "ext_mem_224468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224570,
                                                      "ext_mem_224570") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224571,
                                                      "ext_mem_224571") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223977,
                                                      "mem_223977") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223971,
                                                      "ext_mem_223971") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223964,
                                                      "ext_mem_223964") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223965,
                                                      "ext_mem_223965") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223603,
                                                      "ext_mem_223603") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223586,
                                                      "ext_mem_223586") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223569,
                                                      "ext_mem_223569") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223551,
                                                      "ext_mem_223551") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223543,
                                                      "ext_mem_223543") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_223544,
                                                      "ext_mem_223544") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222572,
                                                      "mem_param_222572") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222564,
                                                      "mem_param_222564") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224583,
                                                      "ext_mem_224583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224584,
                                                      "ext_mem_224584") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222550,
                                                      "mem_param_222550") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222542,
                                                      "mem_param_222542") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_param_222534,
                                                      "mem_param_222534") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224926,
                                                      "ext_mem_224926") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224927,
                                                      "ext_mem_224927") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224928,
                                                      "ext_mem_224928") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223608,
                                                      "mem_223608") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223591,
                                                      "mem_223591") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223574,
                                                      "mem_223574") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_223557,
                                                      "mem_223557") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222588,
                                                      "mem_222588") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222583,
                                                      "mem_222583") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222577,
                                                      "mem_222577") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222526,
                                                      "mem_222526") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222522,
                                                      "mem_222522") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222517,
                                                      "ext_mem_222517") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222518,
                                                      "ext_mem_222518") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222468,
                                                      "ext_mem_222468") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222469,
                                                      "ext_mem_222469") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222419,
                                                      "ext_mem_222419") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222420,
                                                      "ext_mem_222420") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222321,
                                                      "ext_mem_222321") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222322,
                                                      "ext_mem_222322") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_222263,
                                                      "mem_222263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222256,
                                                      "ext_mem_222256") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_222257,
                                                      "ext_mem_222257") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225292,
                                                      "mem_out_225292") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225291,
                                                      "mem_out_225291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_out_225290,
                                                      "mem_out_225290") != 0)
                                return 1;
                            err = 1;
                            goto cleanup;
                        }
                        if (memblock_unref_device(ctx, &mem_224063,
                                                  "mem_224063") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224104,
                                                &mem_224102, "mem_224102") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224102,
                                                  "mem_224102") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225089,
                                                  "color_225089") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225088,
                                                  "color_225088") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &color_225087,
                                                  "color_225087") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224063,
                                                  "mem_224063") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223999,
                                                  "mem_223999") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223996,
                                                  "mem_223996") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223993,
                                                  "mem_223993") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223990,
                                                  "mem_223990") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223987,
                                                  "mem_223987") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223984,
                                                  "mem_223984") != 0)
                            return 1;
                    } else {
                        int64_t segmap_usable_groups_216146 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_216145);
                        struct memblock_device mem_224068;
                        
                        mem_224068.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224068,
                                                  bytes_222521, "mem_224068")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216150,
                                                                1,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216150,
                                                                2,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216150,
                                                                3,
                                                                sizeof(Y_mem_222225.mem),
                                                                &Y_mem_222225.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216150,
                                                                4,
                                                                sizeof(mem_223977.mem),
                                                                &mem_223977.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216150,
                                                                5,
                                                                sizeof(mem_224068.mem),
                                                                &mem_224068.mem));
                        if (1 * ((size_t) segmap_usable_groups_216146 *
                                 (size_t) segmap_group_sizze_216145) != 0) {
                            const size_t global_work_sizze_230275[1] =
                                         {(size_t) segmap_usable_groups_216146 *
                                         (size_t) segmap_group_sizze_216145};
                            const size_t local_work_sizze_230279[1] =
                                         {(size_t) segmap_group_sizze_216145};
                            int64_t time_start_230276 = 0, time_end_230277 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_216150",
                                        global_work_sizze_230275[0],
                                        local_work_sizze_230279[0], (int) 0);
                                time_start_230276 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_216150,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230275,
                                                                            local_work_sizze_230279,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_216150_runs,
                                                                                                                      &ctx->mainzisegmap_216150_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230277 = get_wall_time();
                                
                                long time_diff_230278 = time_end_230277 -
                                     time_start_230276;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_216150", time_diff_230278);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        
                        int64_t segmap_usable_groups_216162 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_216161);
                        struct memblock_device mem_224073;
                        
                        mem_224073.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224073,
                                                  bytes_222521, "mem_224073")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_224077;
                        
                        mem_224077.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224077,
                                                  bytes_222521, "mem_224077")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                1,
                                                                sizeof(ctx->failure_is_an_option),
                                                                &ctx->failure_is_an_option));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                3,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                4,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                5,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                6,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                7,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                8,
                                                                sizeof(ext_mem_222257.mem),
                                                                &ext_mem_222257.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                9,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                10,
                                                                sizeof(mem_224068.mem),
                                                                &mem_224068.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                11,
                                                                sizeof(mem_224073.mem),
                                                                &mem_224073.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216167,
                                                                12,
                                                                sizeof(mem_224077.mem),
                                                                &mem_224077.mem));
                        if (1 * ((size_t) segmap_usable_groups_216162 *
                                 (size_t) segmap_group_sizze_216161) != 0) {
                            const size_t global_work_sizze_230280[1] =
                                         {(size_t) segmap_usable_groups_216162 *
                                         (size_t) segmap_group_sizze_216161};
                            const size_t local_work_sizze_230284[1] =
                                         {(size_t) segmap_group_sizze_216161};
                            int64_t time_start_230281 = 0, time_end_230282 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_216167",
                                        global_work_sizze_230280[0],
                                        local_work_sizze_230284[0], (int) 0);
                                time_start_230281 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_216167,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230280,
                                                                            local_work_sizze_230284,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_216167_runs,
                                                                                                                      &ctx->mainzisegmap_216167_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230282 = get_wall_time();
                                
                                long time_diff_230283 = time_end_230282 -
                                     time_start_230281;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_216167", time_diff_230283);
                            }
                        }
                        ctx->failure_is_an_option = 1;
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_224068,
                                                  "mem_224068") != 0)
                            return 1;
                        
                        int64_t segmap_usable_groups_216187 =
                                sdiv_up64(nest_sizze_203201,
                                          segmap_group_sizze_216186);
                        struct memblock_device ext_mem_224098;
                        
                        ext_mem_224098.references = NULL;
                        
                        int32_t local_memory_capacity_228532;
                        
                        local_memory_capacity_228532 =
                            ctx->opencl.max_local_memory;
                        if (sle64((int64_t) 0,
                                  sext_i32_i64(local_memory_capacity_228532)) &&
                            suff_outer_par_216190) {
                            struct memblock_device mem_224082;
                            
                            mem_224082.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224082,
                                                      bytes_222488,
                                                      "mem_224082")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    3,
                                                                    sizeof(q_t_196696),
                                                                    &q_t_196696));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    4,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    5,
                                                                    sizeof(t_n_m_196759),
                                                                    &t_n_m_196759));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    6,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    7,
                                                                    sizeof(ext_mem_222256.mem),
                                                                    &ext_mem_222256.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    8,
                                                                    sizeof(ext_mem_222257.mem),
                                                                    &ext_mem_222257.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    9,
                                                                    sizeof(ext_mem_222517.mem),
                                                                    &ext_mem_222517.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    10,
                                                                    sizeof(ext_mem_222518.mem),
                                                                    &ext_mem_222518.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    11,
                                                                    sizeof(mem_224073.mem),
                                                                    &mem_224073.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    12,
                                                                    sizeof(mem_224077.mem),
                                                                    &mem_224077.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216195,
                                                                    13,
                                                                    sizeof(mem_224082.mem),
                                                                    &mem_224082.mem));
                            if (1 * ((size_t) segmap_usable_groups_216187 *
                                     (size_t) segmap_group_sizze_216186) != 0) {
                                const size_t global_work_sizze_230285[1] =
                                             {(size_t) segmap_usable_groups_216187 *
                                             (size_t) segmap_group_sizze_216186};
                                const size_t local_work_sizze_230289[1] =
                                             {(size_t) segmap_group_sizze_216186};
                                int64_t time_start_230286 = 0, time_end_230287 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_216195",
                                            global_work_sizze_230285[0],
                                            local_work_sizze_230289[0],
                                            (int) 0);
                                    time_start_230286 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_216195,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230285,
                                                                                local_work_sizze_230289,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_216195_runs,
                                                                                                                          &ctx->mainzisegmap_216195_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230287 = get_wall_time();
                                    
                                    long time_diff_230288 = time_end_230287 -
                                         time_start_230286;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_216195",
                                            time_diff_230288);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_set_device(ctx, &ext_mem_224098,
                                                    &mem_224082,
                                                    "mem_224082") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224082,
                                                      "mem_224082") != 0)
                                return 1;
                        } else {
                            struct memblock_device mem_224087;
                            
                            mem_224087.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224087,
                                                      bytes_222488,
                                                      "mem_224087")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (slt64(q_t_196696 * (int64_t) 2,
                                      segred_group_sizze_216273)) {
                                int64_t segment_sizze_nonzzero_228378 =
                                        smax64((int64_t) 1, q_t_196696);
                                int64_t num_threads_228379 = num_groups_216274 *
                                        segred_group_sizze_216273;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-small");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         t_n_m_196759), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_t_196696, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segments_per_group",
                                            (long long) squot64(segred_group_sizze_216273,
                                                                segment_sizze_nonzzero_228378),
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "required_groups",
                                            (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                               t_n_m_196759,
                                                                               squot64(segred_group_sizze_216273,
                                                                                       segment_sizze_nonzzero_228378))),
                                            '\n');
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        1,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_216273),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        2,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        3,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        4,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        5,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        6,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        7,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        8,
                                                                        sizeof(num_groups_216274),
                                                                        &num_groups_216274));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        9,
                                                                        sizeof(segment_sizze_nonzzero_228378),
                                                                        &segment_sizze_nonzzero_228378));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        10,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        11,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        12,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        13,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        14,
                                                                        sizeof(mem_224073.mem),
                                                                        &mem_224073.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216280,
                                                                        15,
                                                                        sizeof(mem_224087.mem),
                                                                        &mem_224087.mem));
                                if (1 * ((size_t) num_groups_216274 *
                                         (size_t) segred_group_sizze_216273) !=
                                    0) {
                                    const size_t global_work_sizze_230290[1] =
                                                 {(size_t) num_groups_216274 *
                                                 (size_t) segred_group_sizze_216273};
                                    const size_t local_work_sizze_230294[1] =
                                                 {(size_t) segred_group_sizze_216273};
                                    int64_t time_start_230291 = 0,
                                            time_end_230292 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_small_216280",
                                                global_work_sizze_230290[0],
                                                local_work_sizze_230294[0],
                                                (int) (0 + (int64_t) 4 *
                                                       segred_group_sizze_216273));
                                        time_start_230291 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_small_216280,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230290,
                                                                                    local_work_sizze_230294,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_small_216280_runs,
                                                                                                                              &ctx->mainzisegred_small_216280_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230292 = get_wall_time();
                                        
                                        long time_diff_230293 =
                                             time_end_230292 -
                                             time_start_230291;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_small_216280",
                                                time_diff_230293);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_228407 =
                                        sdiv_up64(num_groups_216274,
                                                  smax64((int64_t) 1, m_196691 *
                                                         t_n_m_196759));
                                int64_t elements_per_thread_228408 =
                                        sdiv_up64(q_t_196696,
                                                  segred_group_sizze_216273 *
                                                  groups_per_segment_228407);
                                int64_t virt_num_groups_228409 =
                                        groups_per_segment_228407 * (m_196691 *
                                                                     t_n_m_196759);
                                int64_t num_threads_228410 = num_groups_216274 *
                                        segred_group_sizze_216273;
                                int64_t threads_per_segment_228411 =
                                        groups_per_segment_228407 *
                                        segred_group_sizze_216273;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-large");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         t_n_m_196759), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_t_196696, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "virt_num_groups",
                                            (long long) virt_num_groups_228409,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_groups",
                                            (long long) num_groups_216274,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "group_size",
                                            (long long) segred_group_sizze_216273,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "elems_per_thread",
                                            (long long) elements_per_thread_228408,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_228407,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_228412;
                                
                                segred_tmp_mem_228412.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_228412,
                                                          (int64_t) 4 *
                                                          virt_num_groups_228409,
                                                          "segred_tmp_mem_228412")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_228414
                                                       =
                                                       ctx->mainzicounter_mem_228414;
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        1,
                                                                        (size_t) 1,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        2,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_216273),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        3,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        4,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        5,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        6,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        7,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        8,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        9,
                                                                        sizeof(num_groups_216274),
                                                                        &num_groups_216274));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        10,
                                                                        sizeof(groups_per_segment_228407),
                                                                        &groups_per_segment_228407));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        11,
                                                                        sizeof(elements_per_thread_228408),
                                                                        &elements_per_thread_228408));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        12,
                                                                        sizeof(virt_num_groups_228409),
                                                                        &virt_num_groups_228409));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        13,
                                                                        sizeof(threads_per_segment_228411),
                                                                        &threads_per_segment_228411));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        14,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        15,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        16,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        17,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        18,
                                                                        sizeof(mem_224073.mem),
                                                                        &mem_224073.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        19,
                                                                        sizeof(mem_224087.mem),
                                                                        &mem_224087.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        20,
                                                                        sizeof(segred_tmp_mem_228412.mem),
                                                                        &segred_tmp_mem_228412.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216280,
                                                                        21,
                                                                        sizeof(mainzicounter_mem_228414.mem),
                                                                        &mainzicounter_mem_228414.mem));
                                if (1 * ((size_t) num_groups_216274 *
                                         (size_t) segred_group_sizze_216273) !=
                                    0) {
                                    const size_t global_work_sizze_230296[1] =
                                                 {(size_t) num_groups_216274 *
                                                 (size_t) segred_group_sizze_216273};
                                    const size_t local_work_sizze_230300[1] =
                                                 {(size_t) segred_group_sizze_216273};
                                    int64_t time_start_230297 = 0,
                                            time_end_230298 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_large_216280",
                                                global_work_sizze_230296[0],
                                                local_work_sizze_230300[0],
                                                (int) (0 + 1 + (int64_t) 4 *
                                                       segred_group_sizze_216273));
                                        time_start_230297 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_large_216280,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230296,
                                                                                    local_work_sizze_230300,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_large_216280_runs,
                                                                                                                              &ctx->mainzisegred_large_216280_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230298 = get_wall_time();
                                        
                                        long time_diff_230299 =
                                             time_end_230298 -
                                             time_start_230297;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_large_216280",
                                                time_diff_230299);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_228412,
                                                          "segred_tmp_mem_228412") !=
                                    0)
                                    return 1;
                            }
                            
                            int64_t segmap_usable_groups_216315 =
                                    sdiv_up64(nest_sizze_203201,
                                              segmap_group_sizze_216314);
                            struct memblock_device mem_224092;
                            
                            mem_224092.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224092,
                                                      bytes_222488,
                                                      "mem_224092")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216319,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216319,
                                                                    2,
                                                                    sizeof(t_n_m_196759),
                                                                    &t_n_m_196759));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216319,
                                                                    3,
                                                                    sizeof(mem_224087.mem),
                                                                    &mem_224087.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216319,
                                                                    4,
                                                                    sizeof(mem_224092.mem),
                                                                    &mem_224092.mem));
                            if (1 * ((size_t) segmap_usable_groups_216315 *
                                     (size_t) segmap_group_sizze_216314) != 0) {
                                const size_t global_work_sizze_230301[1] =
                                             {(size_t) segmap_usable_groups_216315 *
                                             (size_t) segmap_group_sizze_216314};
                                const size_t local_work_sizze_230305[1] =
                                             {(size_t) segmap_group_sizze_216314};
                                int64_t time_start_230302 = 0, time_end_230303 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_216319",
                                            global_work_sizze_230301[0],
                                            local_work_sizze_230305[0],
                                            (int) 0);
                                    time_start_230302 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_216319,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230301,
                                                                                local_work_sizze_230305,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_216319_runs,
                                                                                                                          &ctx->mainzisegmap_216319_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230303 = get_wall_time();
                                    
                                    long time_diff_230304 = time_end_230303 -
                                         time_start_230302;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_216319",
                                            time_diff_230304);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224087,
                                                      "mem_224087") != 0)
                                return 1;
                            
                            struct memblock_device mem_224097;
                            
                            mem_224097.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224097,
                                                      bytes_222488,
                                                      "mem_224097")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (slt64(q_t_196696 * (int64_t) 2,
                                      segred_group_sizze_216325)) {
                                int64_t segment_sizze_nonzzero_228460 =
                                        smax64((int64_t) 1, q_t_196696);
                                int64_t num_threads_228461 = num_groups_216326 *
                                        segred_group_sizze_216325;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-small");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         t_n_m_196759), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_t_196696, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segments_per_group",
                                            (long long) squot64(segred_group_sizze_216325,
                                                                segment_sizze_nonzzero_228460),
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "required_groups",
                                            (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                               t_n_m_196759,
                                                                               squot64(segred_group_sizze_216325,
                                                                                       segment_sizze_nonzzero_228460))),
                                            '\n');
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        1,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_216325),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        2,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        3,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        4,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        5,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        6,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        7,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        8,
                                                                        sizeof(num_groups_216326),
                                                                        &num_groups_216326));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        9,
                                                                        sizeof(segment_sizze_nonzzero_228460),
                                                                        &segment_sizze_nonzzero_228460));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        10,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        11,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        12,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        13,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        14,
                                                                        sizeof(mem_224073.mem),
                                                                        &mem_224073.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        15,
                                                                        sizeof(mem_224077.mem),
                                                                        &mem_224077.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        16,
                                                                        sizeof(mem_224092.mem),
                                                                        &mem_224092.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_216332,
                                                                        17,
                                                                        sizeof(mem_224097.mem),
                                                                        &mem_224097.mem));
                                if (1 * ((size_t) num_groups_216326 *
                                         (size_t) segred_group_sizze_216325) !=
                                    0) {
                                    const size_t global_work_sizze_230306[1] =
                                                 {(size_t) num_groups_216326 *
                                                 (size_t) segred_group_sizze_216325};
                                    const size_t local_work_sizze_230310[1] =
                                                 {(size_t) segred_group_sizze_216325};
                                    int64_t time_start_230307 = 0,
                                            time_end_230308 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_small_216332",
                                                global_work_sizze_230306[0],
                                                local_work_sizze_230310[0],
                                                (int) (0 + (int64_t) 4 *
                                                       segred_group_sizze_216325));
                                        time_start_230307 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_small_216332,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230306,
                                                                                    local_work_sizze_230310,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_small_216332_runs,
                                                                                                                              &ctx->mainzisegred_small_216332_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230308 = get_wall_time();
                                        
                                        long time_diff_230309 =
                                             time_end_230308 -
                                             time_start_230307;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_small_216332",
                                                time_diff_230309);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                            } else {
                                int64_t groups_per_segment_228489 =
                                        sdiv_up64(num_groups_216326,
                                                  smax64((int64_t) 1, m_196691 *
                                                         t_n_m_196759));
                                int64_t elements_per_thread_228490 =
                                        sdiv_up64(q_t_196696,
                                                  segred_group_sizze_216325 *
                                                  groups_per_segment_228489);
                                int64_t virt_num_groups_228491 =
                                        groups_per_segment_228489 * (m_196691 *
                                                                     t_n_m_196759);
                                int64_t num_threads_228492 = num_groups_216326 *
                                        segred_group_sizze_216325;
                                int64_t threads_per_segment_228493 =
                                        groups_per_segment_228489 *
                                        segred_group_sizze_216325;
                                
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n",
                                            "\n# SegRed-large");
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_segments",
                                            (long long) (m_196691 *
                                                         t_n_m_196759), '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "segment_size",
                                            (long long) q_t_196696, '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "virt_num_groups",
                                            (long long) virt_num_groups_228491,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "num_groups",
                                            (long long) num_groups_216326,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "group_size",
                                            (long long) segred_group_sizze_216325,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "elems_per_thread",
                                            (long long) elements_per_thread_228490,
                                            '\n');
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "groups_per_segment",
                                            (long long) groups_per_segment_228489,
                                            '\n');
                                
                                struct memblock_device segred_tmp_mem_228494;
                                
                                segred_tmp_mem_228494.references = NULL;
                                if (memblock_alloc_device(ctx,
                                                          &segred_tmp_mem_228494,
                                                          (int64_t) 4 *
                                                          virt_num_groups_228491,
                                                          "segred_tmp_mem_228494")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mainzicounter_mem_228496
                                                       =
                                                       ctx->mainzicounter_mem_228496;
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        1,
                                                                        (size_t) 1,
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        2,
                                                                        (size_t) ((int64_t) 4 *
                                                                                  segred_group_sizze_216325),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        3,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        4,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        5,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        6,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        7,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        8,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        9,
                                                                        sizeof(num_groups_216326),
                                                                        &num_groups_216326));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        10,
                                                                        sizeof(groups_per_segment_228489),
                                                                        &groups_per_segment_228489));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        11,
                                                                        sizeof(elements_per_thread_228490),
                                                                        &elements_per_thread_228490));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        12,
                                                                        sizeof(virt_num_groups_228491),
                                                                        &virt_num_groups_228491));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        13,
                                                                        sizeof(threads_per_segment_228493),
                                                                        &threads_per_segment_228493));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        14,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        15,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        16,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        17,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        18,
                                                                        sizeof(mem_224073.mem),
                                                                        &mem_224073.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        19,
                                                                        sizeof(mem_224077.mem),
                                                                        &mem_224077.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        20,
                                                                        sizeof(mem_224092.mem),
                                                                        &mem_224092.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        21,
                                                                        sizeof(mem_224097.mem),
                                                                        &mem_224097.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        22,
                                                                        sizeof(segred_tmp_mem_228494.mem),
                                                                        &segred_tmp_mem_228494.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_216332,
                                                                        23,
                                                                        sizeof(mainzicounter_mem_228496.mem),
                                                                        &mainzicounter_mem_228496.mem));
                                if (1 * ((size_t) num_groups_216326 *
                                         (size_t) segred_group_sizze_216325) !=
                                    0) {
                                    const size_t global_work_sizze_230312[1] =
                                                 {(size_t) num_groups_216326 *
                                                 (size_t) segred_group_sizze_216325};
                                    const size_t local_work_sizze_230316[1] =
                                                 {(size_t) segred_group_sizze_216325};
                                    int64_t time_start_230313 = 0,
                                            time_end_230314 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segred_large_216332",
                                                global_work_sizze_230312[0],
                                                local_work_sizze_230316[0],
                                                (int) (0 + 1 + (int64_t) 4 *
                                                       segred_group_sizze_216325));
                                        time_start_230313 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegred_large_216332,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230312,
                                                                                    local_work_sizze_230316,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegred_large_216332_runs,
                                                                                                                              &ctx->mainzisegred_large_216332_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230314 = get_wall_time();
                                        
                                        long time_diff_230315 =
                                             time_end_230314 -
                                             time_start_230313;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segred_large_216332",
                                                time_diff_230315);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx,
                                                          &segred_tmp_mem_228494,
                                                          "segred_tmp_mem_228494") !=
                                    0)
                                    return 1;
                            }
                            if (memblock_unref_device(ctx, &mem_224092,
                                                      "mem_224092") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224098,
                                                    &mem_224097,
                                                    "mem_224097") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224097,
                                                      "mem_224097") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224092,
                                                      "mem_224092") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224087,
                                                      "mem_224087") != 0)
                                return 1;
                        }
                        if (memblock_unref_device(ctx, &mem_224073,
                                                  "mem_224073") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224077,
                                                  "mem_224077") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224104,
                                                &ext_mem_224098,
                                                "ext_mem_224098") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224098,
                                                  "ext_mem_224098") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224077,
                                                  "mem_224077") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224073,
                                                  "mem_224073") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224068,
                                                  "mem_224068") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_224468,
                                            &ext_mem_224104,
                                            "ext_mem_224104") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224467, &mem_223981,
                                            "mem_223981") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224104,
                                              "ext_mem_224104") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223981, "mem_223981") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_199056 = (int64_t) 1 == d_t_196699;
                    struct memblock_device ext_mem_224466;
                    
                    ext_mem_224466.references = NULL;
                    
                    struct memblock_device ext_mem_224465;
                    
                    ext_mem_224465.references = NULL;
                    if (match_lit_199056) {
                        bool suff_outer_par_216375;
                        
                        suff_outer_par_216375 =
                            *ctx->tuning_params.mainzisuff_outer_par_30 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_30", (long) m_196691,
                                    suff_outer_par_216375 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_216500;
                        
                        segmap_group_sizze_216500 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_216379;
                        
                        int64_t num_groups_216501;
                        int32_t max_num_groups_228534;
                        
                        max_num_groups_228534 =
                            *ctx->tuning_params.mainzisegmap_num_groups_216381;
                        num_groups_216501 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_216500),
                                                                       sext_i32_i64(max_num_groups_228534))));
                        
                        int64_t segmap_group_sizze_217151;
                        
                        segmap_group_sizze_217151 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_217125;
                        
                        int64_t segmap_group_sizze_217167;
                        
                        segmap_group_sizze_217167 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_217069;
                        
                        int64_t segmap_group_sizze_217192;
                        
                        segmap_group_sizze_217192 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_216627;
                        
                        bool suff_outer_par_217196;
                        
                        suff_outer_par_217196 =
                            *ctx->tuning_params.mainzisuff_outer_par_31 <=
                            nest_sizze_203201;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_31",
                                    (long) nest_sizze_203201,
                                    suff_outer_par_217196 ? "true" : "false");
                        
                        int64_t nest_sizze_217308 = q_t_196696 *
                                nest_sizze_203201;
                        int64_t segred_group_sizze_217309;
                        
                        segred_group_sizze_217309 =
                            *ctx->tuning_params.mainzisegred_group_sizze_216838;
                        
                        int64_t num_groups_217310;
                        int32_t max_num_groups_228535;
                        
                        max_num_groups_228535 =
                            *ctx->tuning_params.mainzisegred_num_groups_216840;
                        num_groups_217310 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_217308,
                                                                                 segred_group_sizze_217309),
                                                                       sext_i32_i64(max_num_groups_228535))));
                        
                        int64_t segmap_group_sizze_217360;
                        
                        segmap_group_sizze_217360 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_216816;
                        
                        int64_t segred_group_sizze_217382;
                        
                        segred_group_sizze_217382 =
                            *ctx->tuning_params.mainzisegred_group_sizze_216741;
                        
                        int64_t num_groups_217383;
                        int32_t max_num_groups_228536;
                        
                        max_num_groups_228536 =
                            *ctx->tuning_params.mainzisegred_num_groups_216743;
                        num_groups_217383 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_217308,
                                                                                 segred_group_sizze_217382),
                                                                       sext_i32_i64(max_num_groups_228536))));
                        
                        int64_t binop_y_224124 = (int64_t) 4 * n_196692;
                        int64_t bytes_224125 = smax64((int64_t) 0,
                                                      binop_y_224124);
                        int64_t maxSubHelper_225090 = umax64(bytes_222477,
                                                             bytes_224125);
                        int64_t num_threads_225236 = segmap_group_sizze_216500 *
                                num_groups_216501;
                        int64_t total_sizze_225237 = maxSubHelper_225090 *
                                num_threads_225236;
                        int64_t total_sizze_225238 = bytes_222477 *
                                num_threads_225236;
                        int64_t total_sizze_225239 = bytes_224125 *
                                num_threads_225236;
                        int64_t total_sizze_225240 = bytes_224125 *
                                num_threads_225236;
                        struct memblock_device ext_mem_224276;
                        
                        ext_mem_224276.references = NULL;
                        
                        struct memblock_device ext_mem_224275;
                        
                        ext_mem_224275.references = NULL;
                        
                        int32_t local_memory_capacity_228806;
                        
                        local_memory_capacity_228806 =
                            ctx->opencl.max_local_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228806)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_228806))) &&
                            suff_outer_par_216375) {
                            struct memblock_device mem_224107;
                            
                            mem_224107.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224107,
                                                      binop_y_222520,
                                                      "mem_224107")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224107,
                                                                      (int64_t) 0,
                                                                      Y_mem_222225,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224110;
                            
                            mem_224110.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224110,
                                                      binop_y_222520,
                                                      "mem_224110")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224110,
                                                                      (int64_t) 0,
                                                                      mem_223977,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224113;
                            
                            mem_224113.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224113,
                                                      binop_y_222236,
                                                      "mem_224113")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_224113,
                                                                      (int64_t) 0,
                                                                      ext_mem_222257,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224113,
                                                          "mem_224113") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224116;
                            
                            mem_224116.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224116,
                                                      binop_y_222483,
                                                      "mem_224116")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_224116,
                                                                      (int64_t) 0,
                                                                      ext_mem_222518,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      t_n_m_196759,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224116,
                                                          "mem_224116") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224113,
                                                          "mem_224113") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224119;
                            
                            mem_224119.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224119,
                                                      binop_y_222487,
                                                      "mem_224119")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224119,
                                                                      (int64_t) 0,
                                                                      ext_mem_222517,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      t_n_m_196759,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224119,
                                                          "mem_224119") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224116,
                                                          "mem_224116") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224113,
                                                          "mem_224113") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224122;
                            
                            mem_224122.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224122,
                                                      binop_y_222520,
                                                      "mem_224122")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            int64_t group_sizze_228540;
                            
                            group_sizze_228540 =
                                *ctx->tuning_params.mainzigroup_sizze_228540;
                            
                            int64_t num_groups_228541 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_228540);
                            
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    0,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    1,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    2,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    3,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    4,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    5,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228537,
                                                                    6,
                                                                    sizeof(mem_224122.mem),
                                                                    &mem_224122.mem));
                            if (1 * ((size_t) num_groups_228541 *
                                     (size_t) group_sizze_228540) != 0) {
                                const size_t global_work_sizze_230317[1] =
                                             {(size_t) num_groups_228541 *
                                             (size_t) group_sizze_228540};
                                const size_t local_work_sizze_230321[1] =
                                             {(size_t) group_sizze_228540};
                                int64_t time_start_230318 = 0, time_end_230319 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.copy_228537",
                                            global_work_sizze_230317[0],
                                            local_work_sizze_230321[0],
                                            (int) 0);
                                    time_start_230318 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzicopy_228537,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230317,
                                                                                local_work_sizze_230321,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzicopy_228537_runs,
                                                                                                                          &ctx->mainzicopy_228537_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230319 = get_wall_time();
                                    
                                    long time_diff_230320 = time_end_230319 -
                                         time_start_230318;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.copy_228537",
                                            time_diff_230320);
                                }
                            }
                            
                            struct memblock_device mem_224201;
                            
                            mem_224201.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224201,
                                                      binop_y_222487,
                                                      "mem_224201")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224204;
                            
                            mem_224204.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224204,
                                                      binop_y_222487,
                                                      "mem_224204")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225091;
                            
                            color_225091.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225091,
                                                      total_sizze_225237,
                                                      "color_225091")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225092;
                            
                            color_225092.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225092,
                                                      total_sizze_225238,
                                                      "color_225092")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225093;
                            
                            color_225093.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225093,
                                                      total_sizze_225239,
                                                      "color_225093")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225094;
                            
                            color_225094.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225094,
                                                      total_sizze_225240,
                                                      "color_225094")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    1,
                                                                    sizeof(ctx->failure_is_an_option),
                                                                    &ctx->failure_is_an_option));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    3,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    4,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    5,
                                                                    sizeof(q_t_196696),
                                                                    &q_t_196696));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    6,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    7,
                                                                    sizeof(t_n_m_196759),
                                                                    &t_n_m_196759));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    8,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    9,
                                                                    sizeof(num_groups_216501),
                                                                    &num_groups_216501));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    10,
                                                                    sizeof(num_threads_225236),
                                                                    &num_threads_225236));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    11,
                                                                    sizeof(ext_mem_222256.mem),
                                                                    &ext_mem_222256.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    12,
                                                                    sizeof(mem_224107.mem),
                                                                    &mem_224107.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    13,
                                                                    sizeof(mem_224110.mem),
                                                                    &mem_224110.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    14,
                                                                    sizeof(mem_224113.mem),
                                                                    &mem_224113.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    15,
                                                                    sizeof(mem_224116.mem),
                                                                    &mem_224116.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    16,
                                                                    sizeof(mem_224119.mem),
                                                                    &mem_224119.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    17,
                                                                    sizeof(mem_224122.mem),
                                                                    &mem_224122.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    18,
                                                                    sizeof(mem_224201.mem),
                                                                    &mem_224201.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    19,
                                                                    sizeof(mem_224204.mem),
                                                                    &mem_224204.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    20,
                                                                    sizeof(color_225091.mem),
                                                                    &color_225091.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    21,
                                                                    sizeof(color_225092.mem),
                                                                    &color_225092.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    22,
                                                                    sizeof(color_225093.mem),
                                                                    &color_225093.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_216506,
                                                                    23,
                                                                    sizeof(color_225094.mem),
                                                                    &color_225094.mem));
                            if (1 * ((size_t) num_groups_216501 *
                                     (size_t) segmap_group_sizze_216500) != 0) {
                                const size_t global_work_sizze_230322[1] =
                                             {(size_t) num_groups_216501 *
                                             (size_t) segmap_group_sizze_216500};
                                const size_t local_work_sizze_230326[1] =
                                             {(size_t) segmap_group_sizze_216500};
                                int64_t time_start_230323 = 0, time_end_230324 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_216506",
                                            global_work_sizze_230322[0],
                                            local_work_sizze_230326[0],
                                            (int) 0);
                                    time_start_230323 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_216506,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230322,
                                                                                local_work_sizze_230326,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_216506_runs,
                                                                                                                          &ctx->mainzisegmap_216506_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230324 = get_wall_time();
                                    
                                    long time_diff_230325 = time_end_230324 -
                                         time_start_230323;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_216506",
                                            time_diff_230325);
                                }
                            }
                            ctx->failure_is_an_option = 1;
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224107,
                                                      "mem_224107") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224110,
                                                      "mem_224110") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224113,
                                                      "mem_224113") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224116,
                                                      "mem_224116") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224119,
                                                      "mem_224119") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224122,
                                                      "mem_224122") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225091,
                                                      "color_225091") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225092,
                                                      "color_225092") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225093,
                                                      "color_225093") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225094,
                                                      "color_225094") != 0)
                                return 1;
                            
                            struct memblock_device mem_224268;
                            
                            mem_224268.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224268,
                                                      bytes_222488,
                                                      "mem_224268")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224268,
                                                                      (int64_t) 0,
                                                                      mem_224201,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      t_n_m_196759) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224268,
                                                          "mem_224268") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225094,
                                                          "color_225094") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225093,
                                                          "color_225093") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225092,
                                                          "color_225092") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225091,
                                                          "color_225091") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224204,
                                                          "mem_224204") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224201,
                                                          "mem_224201") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224122,
                                                          "mem_224122") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224119,
                                                          "mem_224119") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224116,
                                                          "mem_224116") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224113,
                                                          "mem_224113") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_224201,
                                                      "mem_224201") != 0)
                                return 1;
                            
                            struct memblock_device mem_224273;
                            
                            mem_224273.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224273,
                                                      bytes_222488,
                                                      "mem_224273")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224273,
                                                                      (int64_t) 0,
                                                                      mem_224204,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      t_n_m_196759) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224273,
                                                          "mem_224273") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224268,
                                                          "mem_224268") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225094,
                                                          "color_225094") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225093,
                                                          "color_225093") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225092,
                                                          "color_225092") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225091,
                                                          "color_225091") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224204,
                                                          "mem_224204") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224201,
                                                          "mem_224201") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224122,
                                                          "mem_224122") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224119,
                                                          "mem_224119") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224116,
                                                          "mem_224116") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224113,
                                                          "mem_224113") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224110,
                                                          "mem_224110") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224107,
                                                          "mem_224107") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224275,
                                                          "ext_mem_224275") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224276,
                                                          "ext_mem_224276") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_224204,
                                                      "mem_224204") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224276,
                                                    &mem_224268,
                                                    "mem_224268") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224275,
                                                    &mem_224273,
                                                    "mem_224273") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224273,
                                                      "mem_224273") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224268,
                                                      "mem_224268") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225094,
                                                      "color_225094") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225093,
                                                      "color_225093") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225092,
                                                      "color_225092") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225091,
                                                      "color_225091") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224204,
                                                      "mem_224204") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224201,
                                                      "mem_224201") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224122,
                                                      "mem_224122") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224119,
                                                      "mem_224119") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224116,
                                                      "mem_224116") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224113,
                                                      "mem_224113") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224110,
                                                      "mem_224110") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224107,
                                                      "mem_224107") != 0)
                                return 1;
                        } else {
                            int64_t segmap_usable_groups_217152 =
                                    sdiv_up64(nest_sizze_200083,
                                              segmap_group_sizze_217151);
                            struct memblock_device mem_224209;
                            
                            mem_224209.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224209,
                                                      bytes_222521,
                                                      "mem_224209")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217156,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217156,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217156,
                                                                    3,
                                                                    sizeof(Y_mem_222225.mem),
                                                                    &Y_mem_222225.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217156,
                                                                    4,
                                                                    sizeof(mem_223977.mem),
                                                                    &mem_223977.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217156,
                                                                    5,
                                                                    sizeof(mem_224209.mem),
                                                                    &mem_224209.mem));
                            if (1 * ((size_t) segmap_usable_groups_217152 *
                                     (size_t) segmap_group_sizze_217151) != 0) {
                                const size_t global_work_sizze_230327[1] =
                                             {(size_t) segmap_usable_groups_217152 *
                                             (size_t) segmap_group_sizze_217151};
                                const size_t local_work_sizze_230331[1] =
                                             {(size_t) segmap_group_sizze_217151};
                                int64_t time_start_230328 = 0, time_end_230329 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_217156",
                                            global_work_sizze_230327[0],
                                            local_work_sizze_230331[0],
                                            (int) 0);
                                    time_start_230328 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_217156,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230327,
                                                                                local_work_sizze_230331,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_217156_runs,
                                                                                                                          &ctx->mainzisegmap_217156_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230329 = get_wall_time();
                                    
                                    long time_diff_230330 = time_end_230329 -
                                         time_start_230328;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_217156",
                                            time_diff_230330);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            
                            int64_t segmap_usable_groups_217168 =
                                    sdiv_up64(nest_sizze_200083,
                                              segmap_group_sizze_217167);
                            struct memblock_device mem_224214;
                            
                            mem_224214.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224214,
                                                      bytes_222521,
                                                      "mem_224214")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224218;
                            
                            mem_224218.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224218,
                                                      bytes_222521,
                                                      "mem_224218")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    1,
                                                                    sizeof(ctx->failure_is_an_option),
                                                                    &ctx->failure_is_an_option));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    3,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    4,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    5,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    6,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    7,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    8,
                                                                    sizeof(ext_mem_222257.mem),
                                                                    &ext_mem_222257.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    9,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    10,
                                                                    sizeof(mem_224209.mem),
                                                                    &mem_224209.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    11,
                                                                    sizeof(mem_224214.mem),
                                                                    &mem_224214.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217173,
                                                                    12,
                                                                    sizeof(mem_224218.mem),
                                                                    &mem_224218.mem));
                            if (1 * ((size_t) segmap_usable_groups_217168 *
                                     (size_t) segmap_group_sizze_217167) != 0) {
                                const size_t global_work_sizze_230332[1] =
                                             {(size_t) segmap_usable_groups_217168 *
                                             (size_t) segmap_group_sizze_217167};
                                const size_t local_work_sizze_230336[1] =
                                             {(size_t) segmap_group_sizze_217167};
                                int64_t time_start_230333 = 0, time_end_230334 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_217173",
                                            global_work_sizze_230332[0],
                                            local_work_sizze_230336[0],
                                            (int) 0);
                                    time_start_230333 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_217173,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230332,
                                                                                local_work_sizze_230336,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_217173_runs,
                                                                                                                          &ctx->mainzisegmap_217173_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230334 = get_wall_time();
                                    
                                    long time_diff_230335 = time_end_230334 -
                                         time_start_230333;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_217173",
                                            time_diff_230335);
                                }
                            }
                            ctx->failure_is_an_option = 1;
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224209,
                                                      "mem_224209") != 0)
                                return 1;
                            
                            int64_t segmap_usable_groups_217193 =
                                    sdiv_up64(nest_sizze_203201,
                                              segmap_group_sizze_217192);
                            struct memblock_device ext_mem_224264;
                            
                            ext_mem_224264.references = NULL;
                            
                            struct memblock_device ext_mem_224263;
                            
                            ext_mem_224263.references = NULL;
                            
                            int32_t local_memory_capacity_228805;
                            
                            local_memory_capacity_228805 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_228805)) &&
                                suff_outer_par_217196) {
                                struct memblock_device mem_224223;
                                
                                mem_224223.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224223,
                                                          bytes_222488,
                                                          "mem_224223")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224227;
                                
                                mem_224227.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224227,
                                                          bytes_222488,
                                                          "mem_224227")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        2,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        3,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        4,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        5,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        6,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        7,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        8,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        9,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        10,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        11,
                                                                        sizeof(mem_224214.mem),
                                                                        &mem_224214.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        12,
                                                                        sizeof(mem_224218.mem),
                                                                        &mem_224218.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        13,
                                                                        sizeof(mem_224223.mem),
                                                                        &mem_224223.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217203,
                                                                        14,
                                                                        sizeof(mem_224227.mem),
                                                                        &mem_224227.mem));
                                if (1 * ((size_t) segmap_usable_groups_217193 *
                                         (size_t) segmap_group_sizze_217192) !=
                                    0) {
                                    const size_t global_work_sizze_230337[1] =
                                                 {(size_t) segmap_usable_groups_217193 *
                                                 (size_t) segmap_group_sizze_217192};
                                    const size_t local_work_sizze_230341[1] =
                                                 {(size_t) segmap_group_sizze_217192};
                                    int64_t time_start_230338 = 0,
                                            time_end_230339 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_217203",
                                                global_work_sizze_230337[0],
                                                local_work_sizze_230341[0],
                                                (int) 0);
                                        time_start_230338 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_217203,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230337,
                                                                                    local_work_sizze_230341,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_217203_runs,
                                                                                                                              &ctx->mainzisegmap_217203_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230339 = get_wall_time();
                                        
                                        long time_diff_230340 =
                                             time_end_230339 -
                                             time_start_230338;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_217203",
                                                time_diff_230340);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_set_device(ctx, &ext_mem_224264,
                                                        &mem_224223,
                                                        "mem_224223") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224263,
                                                        &mem_224227,
                                                        "mem_224227") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224227,
                                                          "mem_224227") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224223,
                                                          "mem_224223") != 0)
                                    return 1;
                            } else {
                                struct memblock_device mem_224232;
                                
                                mem_224232.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224232,
                                                          bytes_222488,
                                                          "mem_224232")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224236;
                                
                                mem_224236.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224236,
                                                          bytes_222488,
                                                          "mem_224236")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224240;
                                
                                mem_224240.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224240,
                                                          bytes_222488,
                                                          "mem_224240")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_t_196696 * (int64_t) 2,
                                          segred_group_sizze_217309)) {
                                    int64_t segment_sizze_nonzzero_228609 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_228610 =
                                            num_groups_217310 *
                                            segred_group_sizze_217309;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_217309,
                                                                    segment_sizze_nonzzero_228609),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   t_n_m_196759,
                                                                                   squot64(segred_group_sizze_217309,
                                                                                           segment_sizze_nonzzero_228609))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            6,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            8,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            10,
                                                                            sizeof(num_groups_217310),
                                                                            &num_groups_217310));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            11,
                                                                            sizeof(segment_sizze_nonzzero_228609),
                                                                            &segment_sizze_nonzzero_228609));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            12,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            13,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            14,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            15,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            16,
                                                                            sizeof(mem_224214.mem),
                                                                            &mem_224214.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            17,
                                                                            sizeof(mem_224232.mem),
                                                                            &mem_224232.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            18,
                                                                            sizeof(mem_224236.mem),
                                                                            &mem_224236.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217318,
                                                                            19,
                                                                            sizeof(mem_224240.mem),
                                                                            &mem_224240.mem));
                                    if (1 * ((size_t) num_groups_217310 *
                                             (size_t) segred_group_sizze_217309) !=
                                        0) {
                                        const size_t global_work_sizze_230342[1]
                                                     =
                                                     {(size_t) num_groups_217310 *
                                                     (size_t) segred_group_sizze_217309};
                                        const size_t local_work_sizze_230346[1]
                                                     =
                                                     {(size_t) segred_group_sizze_217309};
                                        int64_t time_start_230343 = 0,
                                                time_end_230344 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_217318",
                                                    global_work_sizze_230342[0],
                                                    local_work_sizze_230346[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_217309 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217309 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217309));
                                            time_start_230343 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_217318,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230342,
                                                                                        local_work_sizze_230346,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_217318_runs,
                                                                                                                                  &ctx->mainzisegred_small_217318_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230344 = get_wall_time();
                                            
                                            long time_diff_230345 =
                                                 time_end_230344 -
                                                 time_start_230343;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_217318",
                                                    time_diff_230345);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228650 =
                                            sdiv_up64(num_groups_217310,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_228651 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_217309 *
                                                      groups_per_segment_228650);
                                    int64_t virt_num_groups_228652 =
                                            groups_per_segment_228650 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_228653 =
                                            num_groups_217310 *
                                            segred_group_sizze_217309;
                                    int64_t threads_per_segment_228654 =
                                            groups_per_segment_228650 *
                                            segred_group_sizze_217309;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_228652,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_217310,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_217309,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_228651,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228650,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228655;
                                    
                                    segred_tmp_mem_228655.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228655,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228652,
                                                              "segred_tmp_mem_228655")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228657;
                                    
                                    segred_tmp_mem_228657.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228657,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228652,
                                                              "segred_tmp_mem_228657")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228659;
                                    
                                    segred_tmp_mem_228659.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228659,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228652,
                                                              "segred_tmp_mem_228659")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228661 =
                                    ctx->mainzicounter_mem_228661;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217309),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            5,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            6,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            7,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            8,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            9,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            10,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            11,
                                                                            sizeof(num_groups_217310),
                                                                            &num_groups_217310));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            12,
                                                                            sizeof(groups_per_segment_228650),
                                                                            &groups_per_segment_228650));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            13,
                                                                            sizeof(elements_per_thread_228651),
                                                                            &elements_per_thread_228651));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            14,
                                                                            sizeof(virt_num_groups_228652),
                                                                            &virt_num_groups_228652));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            15,
                                                                            sizeof(threads_per_segment_228654),
                                                                            &threads_per_segment_228654));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            16,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            17,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            18,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            19,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            20,
                                                                            sizeof(mem_224214.mem),
                                                                            &mem_224214.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            21,
                                                                            sizeof(mem_224232.mem),
                                                                            &mem_224232.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            22,
                                                                            sizeof(mem_224236.mem),
                                                                            &mem_224236.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            23,
                                                                            sizeof(mem_224240.mem),
                                                                            &mem_224240.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            24,
                                                                            sizeof(segred_tmp_mem_228655.mem),
                                                                            &segred_tmp_mem_228655.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            25,
                                                                            sizeof(segred_tmp_mem_228657.mem),
                                                                            &segred_tmp_mem_228657.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            26,
                                                                            sizeof(segred_tmp_mem_228659.mem),
                                                                            &segred_tmp_mem_228659.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217318,
                                                                            27,
                                                                            sizeof(mainzicounter_mem_228661.mem),
                                                                            &mainzicounter_mem_228661.mem));
                                    if (1 * ((size_t) num_groups_217310 *
                                             (size_t) segred_group_sizze_217309) !=
                                        0) {
                                        const size_t global_work_sizze_230348[1]
                                                     =
                                                     {(size_t) num_groups_217310 *
                                                     (size_t) segred_group_sizze_217309};
                                        const size_t local_work_sizze_230352[1]
                                                     =
                                                     {(size_t) segred_group_sizze_217309};
                                        int64_t time_start_230349 = 0,
                                                time_end_230350 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_217318",
                                                    global_work_sizze_230348[0],
                                                    local_work_sizze_230352[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_217309 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217309 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217309));
                                            time_start_230349 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_217318,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230348,
                                                                                        local_work_sizze_230352,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_217318_runs,
                                                                                                                                  &ctx->mainzisegred_large_217318_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230350 = get_wall_time();
                                            
                                            long time_diff_230351 =
                                                 time_end_230350 -
                                                 time_start_230349;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_217318",
                                                    time_diff_230351);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228659,
                                                              "segred_tmp_mem_228659") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228657,
                                                              "segred_tmp_mem_228657") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228655,
                                                              "segred_tmp_mem_228655") !=
                                        0)
                                        return 1;
                                }
                                
                                int64_t segmap_usable_groups_217361 =
                                        sdiv_up64(nest_sizze_203201,
                                                  segmap_group_sizze_217360);
                                struct memblock_device mem_224245;
                                
                                mem_224245.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224245,
                                                          bytes_222488,
                                                          "mem_224245")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224249;
                                
                                mem_224249.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224249,
                                                          bytes_222488,
                                                          "mem_224249")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224253;
                                
                                mem_224253.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224253,
                                                          bytes_222488,
                                                          "mem_224253")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        2,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        3,
                                                                        sizeof(mem_224232.mem),
                                                                        &mem_224232.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        4,
                                                                        sizeof(mem_224236.mem),
                                                                        &mem_224236.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        5,
                                                                        sizeof(mem_224240.mem),
                                                                        &mem_224240.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        6,
                                                                        sizeof(mem_224245.mem),
                                                                        &mem_224245.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        7,
                                                                        sizeof(mem_224249.mem),
                                                                        &mem_224249.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217367,
                                                                        8,
                                                                        sizeof(mem_224253.mem),
                                                                        &mem_224253.mem));
                                if (1 * ((size_t) segmap_usable_groups_217361 *
                                         (size_t) segmap_group_sizze_217360) !=
                                    0) {
                                    const size_t global_work_sizze_230353[1] =
                                                 {(size_t) segmap_usable_groups_217361 *
                                                 (size_t) segmap_group_sizze_217360};
                                    const size_t local_work_sizze_230357[1] =
                                                 {(size_t) segmap_group_sizze_217360};
                                    int64_t time_start_230354 = 0,
                                            time_end_230355 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_217367",
                                                global_work_sizze_230353[0],
                                                local_work_sizze_230357[0],
                                                (int) 0);
                                        time_start_230354 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_217367,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230353,
                                                                                    local_work_sizze_230357,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_217367_runs,
                                                                                                                              &ctx->mainzisegmap_217367_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230355 = get_wall_time();
                                        
                                        long time_diff_230356 =
                                             time_end_230355 -
                                             time_start_230354;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_217367",
                                                time_diff_230356);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_224232,
                                                          "mem_224232") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224236,
                                                          "mem_224236") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224240,
                                                          "mem_224240") != 0)
                                    return 1;
                                
                                struct memblock_device mem_224258;
                                
                                mem_224258.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224258,
                                                          bytes_222488,
                                                          "mem_224258")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224262;
                                
                                mem_224262.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224262,
                                                          bytes_222488,
                                                          "mem_224262")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_t_196696 * (int64_t) 2,
                                          segred_group_sizze_217382)) {
                                    int64_t segment_sizze_nonzzero_228719 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_228720 =
                                            num_groups_217383 *
                                            segred_group_sizze_217382;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_217382,
                                                                    segment_sizze_nonzzero_228719),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   t_n_m_196759,
                                                                                   squot64(segred_group_sizze_217382,
                                                                                           segment_sizze_nonzzero_228719))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217382),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217382),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            3,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            4,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            5,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            6,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            7,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            8,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            9,
                                                                            sizeof(num_groups_217383),
                                                                            &num_groups_217383));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            10,
                                                                            sizeof(segment_sizze_nonzzero_228719),
                                                                            &segment_sizze_nonzzero_228719));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            11,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            12,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            13,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            14,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            15,
                                                                            sizeof(mem_224214.mem),
                                                                            &mem_224214.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            16,
                                                                            sizeof(mem_224218.mem),
                                                                            &mem_224218.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            17,
                                                                            sizeof(mem_224245.mem),
                                                                            &mem_224245.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            18,
                                                                            sizeof(mem_224249.mem),
                                                                            &mem_224249.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            19,
                                                                            sizeof(mem_224253.mem),
                                                                            &mem_224253.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            20,
                                                                            sizeof(mem_224258.mem),
                                                                            &mem_224258.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_217390,
                                                                            21,
                                                                            sizeof(mem_224262.mem),
                                                                            &mem_224262.mem));
                                    if (1 * ((size_t) num_groups_217383 *
                                             (size_t) segred_group_sizze_217382) !=
                                        0) {
                                        const size_t global_work_sizze_230358[1]
                                                     =
                                                     {(size_t) num_groups_217383 *
                                                     (size_t) segred_group_sizze_217382};
                                        const size_t local_work_sizze_230362[1]
                                                     =
                                                     {(size_t) segred_group_sizze_217382};
                                        int64_t time_start_230359 = 0,
                                                time_end_230360 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_217390",
                                                    global_work_sizze_230358[0],
                                                    local_work_sizze_230362[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_217382 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217382));
                                            time_start_230359 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_217390,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230358,
                                                                                        local_work_sizze_230362,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_217390_runs,
                                                                                                                                  &ctx->mainzisegred_small_217390_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230360 = get_wall_time();
                                            
                                            long time_diff_230361 =
                                                 time_end_230360 -
                                                 time_start_230359;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_217390",
                                                    time_diff_230361);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228754 =
                                            sdiv_up64(num_groups_217383,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_228755 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_217382 *
                                                      groups_per_segment_228754);
                                    int64_t virt_num_groups_228756 =
                                            groups_per_segment_228754 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_228757 =
                                            num_groups_217383 *
                                            segred_group_sizze_217382;
                                    int64_t threads_per_segment_228758 =
                                            groups_per_segment_228754 *
                                            segred_group_sizze_217382;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_228756,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_217383,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_217382,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_228755,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228754,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228759;
                                    
                                    segred_tmp_mem_228759.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228759,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228756,
                                                              "segred_tmp_mem_228759")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228761;
                                    
                                    segred_tmp_mem_228761.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228761,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228756,
                                                              "segred_tmp_mem_228761")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228763 =
                                    ctx->mainzicounter_mem_228763;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217382),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_217382),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            6,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            8,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            10,
                                                                            sizeof(num_groups_217383),
                                                                            &num_groups_217383));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            11,
                                                                            sizeof(groups_per_segment_228754),
                                                                            &groups_per_segment_228754));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            12,
                                                                            sizeof(elements_per_thread_228755),
                                                                            &elements_per_thread_228755));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            13,
                                                                            sizeof(virt_num_groups_228756),
                                                                            &virt_num_groups_228756));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            14,
                                                                            sizeof(threads_per_segment_228758),
                                                                            &threads_per_segment_228758));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            15,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            16,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            17,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            18,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            19,
                                                                            sizeof(mem_224214.mem),
                                                                            &mem_224214.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            20,
                                                                            sizeof(mem_224218.mem),
                                                                            &mem_224218.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            21,
                                                                            sizeof(mem_224245.mem),
                                                                            &mem_224245.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            22,
                                                                            sizeof(mem_224249.mem),
                                                                            &mem_224249.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            23,
                                                                            sizeof(mem_224253.mem),
                                                                            &mem_224253.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            24,
                                                                            sizeof(mem_224258.mem),
                                                                            &mem_224258.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            25,
                                                                            sizeof(mem_224262.mem),
                                                                            &mem_224262.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            26,
                                                                            sizeof(segred_tmp_mem_228759.mem),
                                                                            &segred_tmp_mem_228759.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            27,
                                                                            sizeof(segred_tmp_mem_228761.mem),
                                                                            &segred_tmp_mem_228761.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_217390,
                                                                            28,
                                                                            sizeof(mainzicounter_mem_228763.mem),
                                                                            &mainzicounter_mem_228763.mem));
                                    if (1 * ((size_t) num_groups_217383 *
                                             (size_t) segred_group_sizze_217382) !=
                                        0) {
                                        const size_t global_work_sizze_230364[1]
                                                     =
                                                     {(size_t) num_groups_217383 *
                                                     (size_t) segred_group_sizze_217382};
                                        const size_t local_work_sizze_230368[1]
                                                     =
                                                     {(size_t) segred_group_sizze_217382};
                                        int64_t time_start_230365 = 0,
                                                time_end_230366 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_217390",
                                                    global_work_sizze_230364[0],
                                                    local_work_sizze_230368[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_217382 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_217382));
                                            time_start_230365 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_217390,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230364,
                                                                                        local_work_sizze_230368,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_217390_runs,
                                                                                                                                  &ctx->mainzisegred_large_217390_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230366 = get_wall_time();
                                            
                                            long time_diff_230367 =
                                                 time_end_230366 -
                                                 time_start_230365;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_217390",
                                                    time_diff_230367);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228761,
                                                              "segred_tmp_mem_228761") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228759,
                                                              "segred_tmp_mem_228759") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_unref_device(ctx, &mem_224245,
                                                          "mem_224245") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224249,
                                                          "mem_224249") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224253,
                                                          "mem_224253") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224264,
                                                        &mem_224258,
                                                        "mem_224258") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224263,
                                                        &mem_224262,
                                                        "mem_224262") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224262,
                                                          "mem_224262") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224258,
                                                          "mem_224258") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224253,
                                                          "mem_224253") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224249,
                                                          "mem_224249") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224245,
                                                          "mem_224245") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224240,
                                                          "mem_224240") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224236,
                                                          "mem_224236") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224232,
                                                          "mem_224232") != 0)
                                    return 1;
                            }
                            if (memblock_unref_device(ctx, &mem_224214,
                                                      "mem_224214") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224218,
                                                      "mem_224218") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224276,
                                                    &ext_mem_224264,
                                                    "ext_mem_224264") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224275,
                                                    &ext_mem_224263,
                                                    "ext_mem_224263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224263,
                                                      "ext_mem_224263") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224264,
                                                      "ext_mem_224264") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224218,
                                                      "mem_224218") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224214,
                                                      "mem_224214") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224209,
                                                      "mem_224209") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_224466,
                                                &ext_mem_224276,
                                                "ext_mem_224276") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224465,
                                                &ext_mem_224275,
                                                "ext_mem_224275") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224275,
                                                  "ext_mem_224275") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224276,
                                                  "ext_mem_224276") != 0)
                            return 1;
                    } else {
                        bool suff_outer_par_217449;
                        
                        suff_outer_par_217449 =
                            *ctx->tuning_params.mainzisuff_outer_par_32 <=
                            m_196691;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_32", (long) m_196691,
                                    suff_outer_par_217449 ? "true" : "false");
                        
                        int64_t segmap_group_sizze_217606;
                        
                        segmap_group_sizze_217606 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_217453;
                        
                        int64_t num_groups_217607;
                        int32_t max_num_groups_228807;
                        
                        max_num_groups_228807 =
                            *ctx->tuning_params.mainzisegmap_num_groups_217455;
                        num_groups_217607 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(m_196691,
                                                                                 segmap_group_sizze_217606),
                                                                       sext_i32_i64(max_num_groups_228807))));
                        
                        int64_t segmap_group_sizze_218405;
                        
                        segmap_group_sizze_218405 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_218379;
                        
                        int64_t segmap_group_sizze_218421;
                        
                        segmap_group_sizze_218421 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_218323;
                        
                        int64_t segmap_group_sizze_218446;
                        
                        segmap_group_sizze_218446 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_217765;
                        
                        bool suff_outer_par_218450;
                        
                        suff_outer_par_218450 =
                            *ctx->tuning_params.mainzisuff_outer_par_33 <=
                            nest_sizze_203201;
                        if (ctx->logging)
                            fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                                    "main.suff_outer_par_33",
                                    (long) nest_sizze_203201,
                                    suff_outer_par_218450 ? "true" : "false");
                        
                        int64_t nest_sizze_218594 = q_t_196696 *
                                nest_sizze_203201;
                        int64_t segred_group_sizze_218595;
                        
                        segred_group_sizze_218595 =
                            *ctx->tuning_params.mainzisegred_group_sizze_218044;
                        
                        int64_t num_groups_218596;
                        int32_t max_num_groups_228808;
                        
                        max_num_groups_228808 =
                            *ctx->tuning_params.mainzisegred_num_groups_218046;
                        num_groups_218596 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_218594,
                                                                                 segred_group_sizze_218595),
                                                                       sext_i32_i64(max_num_groups_228808))));
                        
                        int64_t segmap_group_sizze_218656;
                        
                        segmap_group_sizze_218656 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_218003;
                        
                        int64_t segred_group_sizze_218699;
                        
                        segred_group_sizze_218699 =
                            *ctx->tuning_params.mainzisegred_group_sizze_217915;
                        
                        int64_t num_groups_218700;
                        int32_t max_num_groups_228809;
                        
                        max_num_groups_228809 =
                            *ctx->tuning_params.mainzisegred_num_groups_217917;
                        num_groups_218700 = sext_i64_i32(smax64((int64_t) 1,
                                                                smin64(sdiv_up64(nest_sizze_218594,
                                                                                 segred_group_sizze_218699),
                                                                       sext_i32_i64(max_num_groups_228809))));
                        
                        int64_t binop_y_224296 = (int64_t) 4 * n_196692;
                        int64_t bytes_224297 = smax64((int64_t) 0,
                                                      binop_y_224296);
                        int64_t maxSubHelper_225095 = umax64(bytes_222477,
                                                             bytes_224297);
                        int64_t num_threads_225247 = segmap_group_sizze_217606 *
                                num_groups_217607;
                        int64_t total_sizze_225248 = maxSubHelper_225095 *
                                num_threads_225247;
                        int64_t total_sizze_225249 = bytes_222477 *
                                num_threads_225247;
                        int64_t total_sizze_225250 = bytes_224297 *
                                num_threads_225247;
                        int64_t total_sizze_225251 = bytes_224297 *
                                num_threads_225247;
                        struct memblock_device ext_mem_224464;
                        
                        ext_mem_224464.references = NULL;
                        
                        struct memblock_device ext_mem_224463;
                        
                        ext_mem_224463.references = NULL;
                        
                        int32_t local_memory_capacity_229111;
                        
                        local_memory_capacity_229111 =
                            ctx->opencl.max_local_memory;
                        if ((sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229111)) &&
                             sle64((int64_t) 0,
                                   sext_i32_i64(local_memory_capacity_229111))) &&
                            suff_outer_par_217449) {
                            struct memblock_device mem_224279;
                            
                            mem_224279.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224279,
                                                      binop_y_222520,
                                                      "mem_224279")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224279,
                                                                      (int64_t) 0,
                                                                      Y_mem_222225,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224282;
                            
                            mem_224282.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224282,
                                                      binop_y_222520,
                                                      "mem_224282")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224282,
                                                                      (int64_t) 0,
                                                                      mem_223977,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224285;
                            
                            mem_224285.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224285,
                                                      binop_y_222236,
                                                      "mem_224285")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_224285,
                                                                      (int64_t) 0,
                                                                      ext_mem_222257,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      n_196692,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224285,
                                                          "mem_224285") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224288;
                            
                            mem_224288.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224288,
                                                      binop_y_222483,
                                                      "mem_224288")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_i64(ctx,
                                                                      mem_224288,
                                                                      (int64_t) 0,
                                                                      ext_mem_222518,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      t_n_m_196759,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224288,
                                                          "mem_224288") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224285,
                                                          "mem_224285") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224291;
                            
                            mem_224291.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224291,
                                                      binop_y_222487,
                                                      "mem_224291")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224291,
                                                                      (int64_t) 0,
                                                                      ext_mem_222517,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      t_n_m_196759,
                                                                      m_196691) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224291,
                                                          "mem_224291") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224288,
                                                          "mem_224288") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224285,
                                                          "mem_224285") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224294;
                            
                            mem_224294.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224294,
                                                      binop_y_222520,
                                                      "mem_224294")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            int64_t group_sizze_228813;
                            
                            group_sizze_228813 =
                                *ctx->tuning_params.mainzigroup_sizze_228813;
                            
                            int64_t num_groups_228814 = sdiv_up64(m_196691 *
                                                                  n_196692,
                                                                  group_sizze_228813);
                            
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    0,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    1,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    2,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    3,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    4,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    5,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzicopy_228810,
                                                                    6,
                                                                    sizeof(mem_224294.mem),
                                                                    &mem_224294.mem));
                            if (1 * ((size_t) num_groups_228814 *
                                     (size_t) group_sizze_228813) != 0) {
                                const size_t global_work_sizze_230369[1] =
                                             {(size_t) num_groups_228814 *
                                             (size_t) group_sizze_228813};
                                const size_t local_work_sizze_230373[1] =
                                             {(size_t) group_sizze_228813};
                                int64_t time_start_230370 = 0, time_end_230371 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.copy_228810",
                                            global_work_sizze_230369[0],
                                            local_work_sizze_230373[0],
                                            (int) 0);
                                    time_start_230370 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzicopy_228810,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230369,
                                                                                local_work_sizze_230373,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzicopy_228810_runs,
                                                                                                                          &ctx->mainzicopy_228810_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230371 = get_wall_time();
                                    
                                    long time_diff_230372 = time_end_230371 -
                                         time_start_230370;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.copy_228810",
                                            time_diff_230372);
                                }
                            }
                            
                            struct memblock_device mem_224373;
                            
                            mem_224373.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224373,
                                                      binop_y_222487,
                                                      "mem_224373")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224376;
                            
                            mem_224376.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224376,
                                                      binop_y_222487,
                                                      "mem_224376")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225096;
                            
                            color_225096.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225096,
                                                      total_sizze_225248,
                                                      "color_225096")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225097;
                            
                            color_225097.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225097,
                                                      total_sizze_225249,
                                                      "color_225097")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225098;
                            
                            color_225098.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225098,
                                                      total_sizze_225250,
                                                      "color_225098")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device color_225099;
                            
                            color_225099.references = NULL;
                            if (memblock_alloc_device(ctx, &color_225099,
                                                      total_sizze_225251,
                                                      "color_225099")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    1,
                                                                    sizeof(ctx->failure_is_an_option),
                                                                    &ctx->failure_is_an_option));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    3,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    4,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    5,
                                                                    sizeof(q_t_196696),
                                                                    &q_t_196696));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    6,
                                                                    sizeof(jump_t_196702),
                                                                    &jump_t_196702));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    7,
                                                                    sizeof(t_n_m_196759),
                                                                    &t_n_m_196759));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    8,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    9,
                                                                    sizeof(num_groups_217607),
                                                                    &num_groups_217607));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    10,
                                                                    sizeof(num_threads_225247),
                                                                    &num_threads_225247));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    11,
                                                                    sizeof(ext_mem_222256.mem),
                                                                    &ext_mem_222256.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    12,
                                                                    sizeof(mem_224279.mem),
                                                                    &mem_224279.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    13,
                                                                    sizeof(mem_224282.mem),
                                                                    &mem_224282.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    14,
                                                                    sizeof(mem_224285.mem),
                                                                    &mem_224285.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    15,
                                                                    sizeof(mem_224288.mem),
                                                                    &mem_224288.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    16,
                                                                    sizeof(mem_224291.mem),
                                                                    &mem_224291.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    17,
                                                                    sizeof(mem_224294.mem),
                                                                    &mem_224294.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    18,
                                                                    sizeof(mem_224373.mem),
                                                                    &mem_224373.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    19,
                                                                    sizeof(mem_224376.mem),
                                                                    &mem_224376.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    20,
                                                                    sizeof(color_225096.mem),
                                                                    &color_225096.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    21,
                                                                    sizeof(color_225097.mem),
                                                                    &color_225097.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    22,
                                                                    sizeof(color_225098.mem),
                                                                    &color_225098.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_217612,
                                                                    23,
                                                                    sizeof(color_225099.mem),
                                                                    &color_225099.mem));
                            if (1 * ((size_t) num_groups_217607 *
                                     (size_t) segmap_group_sizze_217606) != 0) {
                                const size_t global_work_sizze_230374[1] =
                                             {(size_t) num_groups_217607 *
                                             (size_t) segmap_group_sizze_217606};
                                const size_t local_work_sizze_230378[1] =
                                             {(size_t) segmap_group_sizze_217606};
                                int64_t time_start_230375 = 0, time_end_230376 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_217612",
                                            global_work_sizze_230374[0],
                                            local_work_sizze_230378[0],
                                            (int) 0);
                                    time_start_230375 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_217612,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230374,
                                                                                local_work_sizze_230378,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_217612_runs,
                                                                                                                          &ctx->mainzisegmap_217612_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230376 = get_wall_time();
                                    
                                    long time_diff_230377 = time_end_230376 -
                                         time_start_230375;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_217612",
                                            time_diff_230377);
                                }
                            }
                            ctx->failure_is_an_option = 1;
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224279,
                                                      "mem_224279") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224282,
                                                      "mem_224282") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224285,
                                                      "mem_224285") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224288,
                                                      "mem_224288") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224291,
                                                      "mem_224291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224294,
                                                      "mem_224294") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225096,
                                                      "color_225096") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225097,
                                                      "color_225097") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225098,
                                                      "color_225098") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225099,
                                                      "color_225099") != 0)
                                return 1;
                            
                            struct memblock_device mem_224456;
                            
                            mem_224456.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224456,
                                                      bytes_222488,
                                                      "mem_224456")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224456,
                                                                      (int64_t) 0,
                                                                      mem_224373,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      t_n_m_196759) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224456,
                                                          "mem_224456") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225099,
                                                          "color_225099") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225098,
                                                          "color_225098") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225097,
                                                          "color_225097") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225096,
                                                          "color_225096") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224376,
                                                          "mem_224376") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224373,
                                                          "mem_224373") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224294,
                                                          "mem_224294") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224291,
                                                          "mem_224291") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224288,
                                                          "mem_224288") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224285,
                                                          "mem_224285") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_224373,
                                                      "mem_224373") != 0)
                                return 1;
                            
                            struct memblock_device mem_224461;
                            
                            mem_224461.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224461,
                                                      bytes_222488,
                                                      "mem_224461")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (futrts_builtinzhgpu_map_transpose_f32(ctx,
                                                                      mem_224461,
                                                                      (int64_t) 0,
                                                                      mem_224376,
                                                                      (int64_t) 0,
                                                                      (int64_t) 1,
                                                                      m_196691,
                                                                      t_n_m_196759) !=
                                0) {
                                if (memblock_unref_device(ctx, &mem_224461,
                                                          "mem_224461") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224456,
                                                          "mem_224456") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225099,
                                                          "color_225099") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225098,
                                                          "color_225098") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225097,
                                                          "color_225097") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &color_225096,
                                                          "color_225096") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224376,
                                                          "mem_224376") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224373,
                                                          "mem_224373") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224294,
                                                          "mem_224294") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224291,
                                                          "mem_224291") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224288,
                                                          "mem_224288") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224285,
                                                          "mem_224285") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224282,
                                                          "mem_224282") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224279,
                                                          "mem_224279") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224463,
                                                          "ext_mem_224463") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224464,
                                                          "ext_mem_224464") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224465,
                                                          "ext_mem_224465") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224466,
                                                          "ext_mem_224466") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224467,
                                                          "ext_mem_224467") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224468,
                                                          "ext_mem_224468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224570,
                                                          "ext_mem_224570") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224571,
                                                          "ext_mem_224571") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223977,
                                                          "mem_223977") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223971,
                                                          "ext_mem_223971") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223964,
                                                          "ext_mem_223964") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223965,
                                                          "ext_mem_223965") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223603,
                                                          "ext_mem_223603") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223586,
                                                          "ext_mem_223586") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223569,
                                                          "ext_mem_223569") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223551,
                                                          "ext_mem_223551") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223543,
                                                          "ext_mem_223543") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_223544,
                                                          "ext_mem_223544") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222572,
                                                          "mem_param_222572") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222564,
                                                          "mem_param_222564") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224583,
                                                          "ext_mem_224583") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224584,
                                                          "ext_mem_224584") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222550,
                                                          "mem_param_222550") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222542,
                                                          "mem_param_222542") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx,
                                                          &mem_param_222534,
                                                          "mem_param_222534") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224926,
                                                          "ext_mem_224926") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224927,
                                                          "ext_mem_224927") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_224928,
                                                          "ext_mem_224928") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223608,
                                                          "mem_223608") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223591,
                                                          "mem_223591") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223574,
                                                          "mem_223574") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_223557,
                                                          "mem_223557") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222588,
                                                          "mem_222588") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222583,
                                                          "mem_222583") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222577,
                                                          "mem_222577") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222526,
                                                          "mem_222526") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222522,
                                                          "mem_222522") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222517,
                                                          "ext_mem_222517") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222518,
                                                          "ext_mem_222518") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222468,
                                                          "ext_mem_222468") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222469,
                                                          "ext_mem_222469") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222419,
                                                          "ext_mem_222419") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222420,
                                                          "ext_mem_222420") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222321,
                                                          "ext_mem_222321") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222322,
                                                          "ext_mem_222322") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_222263,
                                                          "mem_222263") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222256,
                                                          "ext_mem_222256") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &ext_mem_222257,
                                                          "ext_mem_222257") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225292,
                                                          "mem_out_225292") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225291,
                                                          "mem_out_225291") !=
                                    0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_out_225290,
                                                          "mem_out_225290") !=
                                    0)
                                    return 1;
                                err = 1;
                                goto cleanup;
                            }
                            if (memblock_unref_device(ctx, &mem_224376,
                                                      "mem_224376") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224464,
                                                    &mem_224456,
                                                    "mem_224456") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224463,
                                                    &mem_224461,
                                                    "mem_224461") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224461,
                                                      "mem_224461") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224456,
                                                      "mem_224456") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225099,
                                                      "color_225099") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225098,
                                                      "color_225098") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225097,
                                                      "color_225097") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &color_225096,
                                                      "color_225096") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224376,
                                                      "mem_224376") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224373,
                                                      "mem_224373") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224294,
                                                      "mem_224294") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224291,
                                                      "mem_224291") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224288,
                                                      "mem_224288") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224285,
                                                      "mem_224285") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224282,
                                                      "mem_224282") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224279,
                                                      "mem_224279") != 0)
                                return 1;
                        } else {
                            int64_t segmap_usable_groups_218406 =
                                    sdiv_up64(nest_sizze_200083,
                                              segmap_group_sizze_218405);
                            struct memblock_device mem_224381;
                            
                            mem_224381.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224381,
                                                      bytes_222521,
                                                      "mem_224381")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218410,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218410,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218410,
                                                                    3,
                                                                    sizeof(Y_mem_222225.mem),
                                                                    &Y_mem_222225.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218410,
                                                                    4,
                                                                    sizeof(mem_223977.mem),
                                                                    &mem_223977.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218410,
                                                                    5,
                                                                    sizeof(mem_224381.mem),
                                                                    &mem_224381.mem));
                            if (1 * ((size_t) segmap_usable_groups_218406 *
                                     (size_t) segmap_group_sizze_218405) != 0) {
                                const size_t global_work_sizze_230379[1] =
                                             {(size_t) segmap_usable_groups_218406 *
                                             (size_t) segmap_group_sizze_218405};
                                const size_t local_work_sizze_230383[1] =
                                             {(size_t) segmap_group_sizze_218405};
                                int64_t time_start_230380 = 0, time_end_230381 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_218410",
                                            global_work_sizze_230379[0],
                                            local_work_sizze_230383[0],
                                            (int) 0);
                                    time_start_230380 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_218410,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230379,
                                                                                local_work_sizze_230383,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_218410_runs,
                                                                                                                          &ctx->mainzisegmap_218410_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230381 = get_wall_time();
                                    
                                    long time_diff_230382 = time_end_230381 -
                                         time_start_230380;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_218410",
                                            time_diff_230382);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            
                            int64_t segmap_usable_groups_218422 =
                                    sdiv_up64(nest_sizze_200083,
                                              segmap_group_sizze_218421);
                            struct memblock_device mem_224386;
                            
                            mem_224386.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224386,
                                                      bytes_222521,
                                                      "mem_224386")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224390;
                            
                            mem_224390.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224390,
                                                      bytes_222521,
                                                      "mem_224390")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    1,
                                                                    sizeof(ctx->failure_is_an_option),
                                                                    &ctx->failure_is_an_option));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    3,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    4,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    5,
                                                                    sizeof(ctx_param_ext_222545),
                                                                    &ctx_param_ext_222545));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    6,
                                                                    sizeof(ctx_param_ext_222546),
                                                                    &ctx_param_ext_222546));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    7,
                                                                    sizeof(ctx_param_ext_222548),
                                                                    &ctx_param_ext_222548));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    8,
                                                                    sizeof(ext_mem_222257.mem),
                                                                    &ext_mem_222257.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    9,
                                                                    sizeof(mem_param_222550.mem),
                                                                    &mem_param_222550.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    10,
                                                                    sizeof(mem_224381.mem),
                                                                    &mem_224381.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    11,
                                                                    sizeof(mem_224386.mem),
                                                                    &mem_224386.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218427,
                                                                    12,
                                                                    sizeof(mem_224390.mem),
                                                                    &mem_224390.mem));
                            if (1 * ((size_t) segmap_usable_groups_218422 *
                                     (size_t) segmap_group_sizze_218421) != 0) {
                                const size_t global_work_sizze_230384[1] =
                                             {(size_t) segmap_usable_groups_218422 *
                                             (size_t) segmap_group_sizze_218421};
                                const size_t local_work_sizze_230388[1] =
                                             {(size_t) segmap_group_sizze_218421};
                                int64_t time_start_230385 = 0, time_end_230386 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_218427",
                                            global_work_sizze_230384[0],
                                            local_work_sizze_230388[0],
                                            (int) 0);
                                    time_start_230385 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_218427,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230384,
                                                                                local_work_sizze_230388,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_218427_runs,
                                                                                                                          &ctx->mainzisegmap_218427_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230386 = get_wall_time();
                                    
                                    long time_diff_230387 = time_end_230386 -
                                         time_start_230385;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_218427",
                                            time_diff_230387);
                                }
                            }
                            ctx->failure_is_an_option = 1;
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224381,
                                                      "mem_224381") != 0)
                                return 1;
                            
                            int64_t segmap_usable_groups_218447 =
                                    sdiv_up64(nest_sizze_203201,
                                              segmap_group_sizze_218446);
                            struct memblock_device ext_mem_224452;
                            
                            ext_mem_224452.references = NULL;
                            
                            struct memblock_device ext_mem_224451;
                            
                            ext_mem_224451.references = NULL;
                            
                            int32_t local_memory_capacity_229110;
                            
                            local_memory_capacity_229110 =
                                ctx->opencl.max_local_memory;
                            if (sle64((int64_t) 0,
                                      sext_i32_i64(local_memory_capacity_229110)) &&
                                suff_outer_par_218450) {
                                struct memblock_device mem_224395;
                                
                                mem_224395.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224395,
                                                          bytes_222488,
                                                          "mem_224395")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224399;
                                
                                mem_224399.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224399,
                                                          bytes_222488,
                                                          "mem_224399")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        2,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        3,
                                                                        sizeof(q_t_196696),
                                                                        &q_t_196696));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        4,
                                                                        sizeof(jump_t_196702),
                                                                        &jump_t_196702));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        5,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        6,
                                                                        sizeof(i_196779),
                                                                        &i_196779));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        7,
                                                                        sizeof(ext_mem_222256.mem),
                                                                        &ext_mem_222256.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        8,
                                                                        sizeof(ext_mem_222257.mem),
                                                                        &ext_mem_222257.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        9,
                                                                        sizeof(ext_mem_222517.mem),
                                                                        &ext_mem_222517.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        10,
                                                                        sizeof(ext_mem_222518.mem),
                                                                        &ext_mem_222518.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        11,
                                                                        sizeof(mem_224386.mem),
                                                                        &mem_224386.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        12,
                                                                        sizeof(mem_224390.mem),
                                                                        &mem_224390.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        13,
                                                                        sizeof(mem_224395.mem),
                                                                        &mem_224395.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218457,
                                                                        14,
                                                                        sizeof(mem_224399.mem),
                                                                        &mem_224399.mem));
                                if (1 * ((size_t) segmap_usable_groups_218447 *
                                         (size_t) segmap_group_sizze_218446) !=
                                    0) {
                                    const size_t global_work_sizze_230389[1] =
                                                 {(size_t) segmap_usable_groups_218447 *
                                                 (size_t) segmap_group_sizze_218446};
                                    const size_t local_work_sizze_230393[1] =
                                                 {(size_t) segmap_group_sizze_218446};
                                    int64_t time_start_230390 = 0,
                                            time_end_230391 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_218457",
                                                global_work_sizze_230389[0],
                                                local_work_sizze_230393[0],
                                                (int) 0);
                                        time_start_230390 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_218457,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230389,
                                                                                    local_work_sizze_230393,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_218457_runs,
                                                                                                                              &ctx->mainzisegmap_218457_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230391 = get_wall_time();
                                        
                                        long time_diff_230392 =
                                             time_end_230391 -
                                             time_start_230390;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_218457",
                                                time_diff_230392);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_set_device(ctx, &ext_mem_224452,
                                                        &mem_224395,
                                                        "mem_224395") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224451,
                                                        &mem_224399,
                                                        "mem_224399") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224399,
                                                          "mem_224399") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224395,
                                                          "mem_224395") != 0)
                                    return 1;
                            } else {
                                struct memblock_device mem_224404;
                                
                                mem_224404.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224404,
                                                          bytes_222488,
                                                          "mem_224404")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224408;
                                
                                mem_224408.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224408,
                                                          bytes_222488,
                                                          "mem_224408")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224412;
                                
                                mem_224412.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224412,
                                                          bytes_222488,
                                                          "mem_224412")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224416;
                                
                                mem_224416.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224416,
                                                          bytes_222488,
                                                          "mem_224416")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224420;
                                
                                mem_224420.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224420,
                                                          bytes_222488,
                                                          "mem_224420")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_t_196696 * (int64_t) 2,
                                          segred_group_sizze_218595)) {
                                    int64_t segment_sizze_nonzzero_228886 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_228887 =
                                            num_groups_218596 *
                                            segred_group_sizze_218595;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_218595,
                                                                    segment_sizze_nonzzero_228886),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   t_n_m_196759,
                                                                                   squot64(segred_group_sizze_218595,
                                                                                           segment_sizze_nonzzero_228886))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            6,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            7,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            8,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            9,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            10,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            11,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            12,
                                                                            sizeof(num_groups_218596),
                                                                            &num_groups_218596));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            13,
                                                                            sizeof(segment_sizze_nonzzero_228886),
                                                                            &segment_sizze_nonzzero_228886));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            14,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            15,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            16,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            17,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            18,
                                                                            sizeof(mem_224386.mem),
                                                                            &mem_224386.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            19,
                                                                            sizeof(mem_224404.mem),
                                                                            &mem_224404.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            20,
                                                                            sizeof(mem_224408.mem),
                                                                            &mem_224408.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            21,
                                                                            sizeof(mem_224412.mem),
                                                                            &mem_224412.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            22,
                                                                            sizeof(mem_224416.mem),
                                                                            &mem_224416.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218606,
                                                                            23,
                                                                            sizeof(mem_224420.mem),
                                                                            &mem_224420.mem));
                                    if (1 * ((size_t) num_groups_218596 *
                                             (size_t) segred_group_sizze_218595) !=
                                        0) {
                                        const size_t global_work_sizze_230394[1]
                                                     =
                                                     {(size_t) num_groups_218596 *
                                                     (size_t) segred_group_sizze_218595};
                                        const size_t local_work_sizze_230398[1]
                                                     =
                                                     {(size_t) segred_group_sizze_218595};
                                        int64_t time_start_230395 = 0,
                                                time_end_230396 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_218606",
                                                    global_work_sizze_230394[0],
                                                    local_work_sizze_230398[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595));
                                            time_start_230395 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_218606,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230394,
                                                                                        local_work_sizze_230398,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_218606_runs,
                                                                                                                                  &ctx->mainzisegred_small_218606_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230396 = get_wall_time();
                                            
                                            long time_diff_230397 =
                                                 time_end_230396 -
                                                 time_start_230395;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_218606",
                                                    time_diff_230397);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_228939 =
                                            sdiv_up64(num_groups_218596,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_228940 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_218595 *
                                                      groups_per_segment_228939);
                                    int64_t virt_num_groups_228941 =
                                            groups_per_segment_228939 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_228942 =
                                            num_groups_218596 *
                                            segred_group_sizze_218595;
                                    int64_t threads_per_segment_228943 =
                                            groups_per_segment_228939 *
                                            segred_group_sizze_218595;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_228941,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_218596,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_218595,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_228940,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_228939,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228944;
                                    
                                    segred_tmp_mem_228944.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228944,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228941,
                                                              "segred_tmp_mem_228944")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228946;
                                    
                                    segred_tmp_mem_228946.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228946,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228941,
                                                              "segred_tmp_mem_228946")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228948;
                                    
                                    segred_tmp_mem_228948.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228948,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228941,
                                                              "segred_tmp_mem_228948")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228950;
                                    
                                    segred_tmp_mem_228950.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228950,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228941,
                                                              "segred_tmp_mem_228950")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_228952;
                                    
                                    segred_tmp_mem_228952.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_228952,
                                                              (int64_t) 4 *
                                                              virt_num_groups_228941,
                                                              "segred_tmp_mem_228952")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_228954 =
                                    ctx->mainzicounter_mem_228954;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            4,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            5,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            6,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218595),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            7,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            8,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            9,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            10,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            11,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            12,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            13,
                                                                            sizeof(num_groups_218596),
                                                                            &num_groups_218596));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            14,
                                                                            sizeof(groups_per_segment_228939),
                                                                            &groups_per_segment_228939));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            15,
                                                                            sizeof(elements_per_thread_228940),
                                                                            &elements_per_thread_228940));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            16,
                                                                            sizeof(virt_num_groups_228941),
                                                                            &virt_num_groups_228941));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            17,
                                                                            sizeof(threads_per_segment_228943),
                                                                            &threads_per_segment_228943));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            18,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            19,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            20,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            21,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            22,
                                                                            sizeof(mem_224386.mem),
                                                                            &mem_224386.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            23,
                                                                            sizeof(mem_224404.mem),
                                                                            &mem_224404.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            24,
                                                                            sizeof(mem_224408.mem),
                                                                            &mem_224408.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            25,
                                                                            sizeof(mem_224412.mem),
                                                                            &mem_224412.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            26,
                                                                            sizeof(mem_224416.mem),
                                                                            &mem_224416.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            27,
                                                                            sizeof(mem_224420.mem),
                                                                            &mem_224420.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            28,
                                                                            sizeof(segred_tmp_mem_228944.mem),
                                                                            &segred_tmp_mem_228944.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            29,
                                                                            sizeof(segred_tmp_mem_228946.mem),
                                                                            &segred_tmp_mem_228946.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            30,
                                                                            sizeof(segred_tmp_mem_228948.mem),
                                                                            &segred_tmp_mem_228948.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            31,
                                                                            sizeof(segred_tmp_mem_228950.mem),
                                                                            &segred_tmp_mem_228950.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            32,
                                                                            sizeof(segred_tmp_mem_228952.mem),
                                                                            &segred_tmp_mem_228952.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218606,
                                                                            33,
                                                                            sizeof(mainzicounter_mem_228954.mem),
                                                                            &mainzicounter_mem_228954.mem));
                                    if (1 * ((size_t) num_groups_218596 *
                                             (size_t) segred_group_sizze_218595) !=
                                        0) {
                                        const size_t global_work_sizze_230400[1]
                                                     =
                                                     {(size_t) num_groups_218596 *
                                                     (size_t) segred_group_sizze_218595};
                                        const size_t local_work_sizze_230404[1]
                                                     =
                                                     {(size_t) segred_group_sizze_218595};
                                        int64_t time_start_230401 = 0,
                                                time_end_230402 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_218606",
                                                    global_work_sizze_230400[0],
                                                    local_work_sizze_230404[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218595));
                                            time_start_230401 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_218606,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230400,
                                                                                        local_work_sizze_230404,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_218606_runs,
                                                                                                                                  &ctx->mainzisegred_large_218606_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230402 = get_wall_time();
                                            
                                            long time_diff_230403 =
                                                 time_end_230402 -
                                                 time_start_230401;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_218606",
                                                    time_diff_230403);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228952,
                                                              "segred_tmp_mem_228952") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228950,
                                                              "segred_tmp_mem_228950") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228948,
                                                              "segred_tmp_mem_228948") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228946,
                                                              "segred_tmp_mem_228946") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_228944,
                                                              "segred_tmp_mem_228944") !=
                                        0)
                                        return 1;
                                }
                                
                                int64_t segmap_usable_groups_218657 =
                                        sdiv_up64(nest_sizze_203201,
                                                  segmap_group_sizze_218656);
                                struct memblock_device mem_224425;
                                
                                mem_224425.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224425,
                                                          bytes_222488,
                                                          "mem_224425")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224429;
                                
                                mem_224429.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224429,
                                                          bytes_222488,
                                                          "mem_224429")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224433;
                                
                                mem_224433.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224433,
                                                          bytes_222488,
                                                          "mem_224433")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224437;
                                
                                mem_224437.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224437,
                                                          bytes_222488,
                                                          "mem_224437")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224441;
                                
                                mem_224441.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224441,
                                                          bytes_222488,
                                                          "mem_224441")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        2,
                                                                        sizeof(t_n_m_196759),
                                                                        &t_n_m_196759));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        3,
                                                                        sizeof(mem_224404.mem),
                                                                        &mem_224404.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        4,
                                                                        sizeof(mem_224408.mem),
                                                                        &mem_224408.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        5,
                                                                        sizeof(mem_224412.mem),
                                                                        &mem_224412.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        6,
                                                                        sizeof(mem_224416.mem),
                                                                        &mem_224416.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        7,
                                                                        sizeof(mem_224420.mem),
                                                                        &mem_224420.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        8,
                                                                        sizeof(mem_224425.mem),
                                                                        &mem_224425.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        9,
                                                                        sizeof(mem_224429.mem),
                                                                        &mem_224429.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        10,
                                                                        sizeof(mem_224433.mem),
                                                                        &mem_224433.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        11,
                                                                        sizeof(mem_224437.mem),
                                                                        &mem_224437.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218665,
                                                                        12,
                                                                        sizeof(mem_224441.mem),
                                                                        &mem_224441.mem));
                                if (1 * ((size_t) segmap_usable_groups_218657 *
                                         (size_t) segmap_group_sizze_218656) !=
                                    0) {
                                    const size_t global_work_sizze_230405[1] =
                                                 {(size_t) segmap_usable_groups_218657 *
                                                 (size_t) segmap_group_sizze_218656};
                                    const size_t local_work_sizze_230409[1] =
                                                 {(size_t) segmap_group_sizze_218656};
                                    int64_t time_start_230406 = 0,
                                            time_end_230407 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.segmap_218665",
                                                global_work_sizze_230405[0],
                                                local_work_sizze_230409[0],
                                                (int) 0);
                                        time_start_230406 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainzisegmap_218665,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230405,
                                                                                    local_work_sizze_230409,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainzisegmap_218665_runs,
                                                                                                                              &ctx->mainzisegmap_218665_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230407 = get_wall_time();
                                        
                                        long time_diff_230408 =
                                             time_end_230407 -
                                             time_start_230406;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.segmap_218665",
                                                time_diff_230408);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "");
                                if (memblock_unref_device(ctx, &mem_224404,
                                                          "mem_224404") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224408,
                                                          "mem_224408") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224412,
                                                          "mem_224412") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224416,
                                                          "mem_224416") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224420,
                                                          "mem_224420") != 0)
                                    return 1;
                                
                                struct memblock_device mem_224446;
                                
                                mem_224446.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224446,
                                                          bytes_222488,
                                                          "mem_224446")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                
                                struct memblock_device mem_224450;
                                
                                mem_224450.references = NULL;
                                if (memblock_alloc_device(ctx, &mem_224450,
                                                          bytes_222488,
                                                          "mem_224450")) {
                                    err = 1;
                                    goto cleanup;
                                }
                                if (slt64(q_t_196696 * (int64_t) 2,
                                          segred_group_sizze_218699)) {
                                    int64_t segment_sizze_nonzzero_229024 =
                                            smax64((int64_t) 1, q_t_196696);
                                    int64_t num_threads_229025 =
                                            num_groups_218700 *
                                            segred_group_sizze_218699;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-small");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segments_per_group",
                                                (long long) squot64(segred_group_sizze_218699,
                                                                    segment_sizze_nonzzero_229024),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "required_groups",
                                                (long long) sext_i64_i32(sdiv_up64(m_196691 *
                                                                                   t_n_m_196759,
                                                                                   squot64(segred_group_sizze_218699,
                                                                                           segment_sizze_nonzzero_229024))),
                                                '\n');
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            1,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218699),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218699),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            3,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            4,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            5,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            6,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            7,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            8,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            9,
                                                                            sizeof(num_groups_218700),
                                                                            &num_groups_218700));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            10,
                                                                            sizeof(segment_sizze_nonzzero_229024),
                                                                            &segment_sizze_nonzzero_229024));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            11,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            12,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            13,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            14,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            15,
                                                                            sizeof(mem_224386.mem),
                                                                            &mem_224386.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            16,
                                                                            sizeof(mem_224390.mem),
                                                                            &mem_224390.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            17,
                                                                            sizeof(mem_224425.mem),
                                                                            &mem_224425.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            18,
                                                                            sizeof(mem_224429.mem),
                                                                            &mem_224429.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            19,
                                                                            sizeof(mem_224433.mem),
                                                                            &mem_224433.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            20,
                                                                            sizeof(mem_224437.mem),
                                                                            &mem_224437.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            21,
                                                                            sizeof(mem_224441.mem),
                                                                            &mem_224441.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            22,
                                                                            sizeof(mem_224446.mem),
                                                                            &mem_224446.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_218707,
                                                                            23,
                                                                            sizeof(mem_224450.mem),
                                                                            &mem_224450.mem));
                                    if (1 * ((size_t) num_groups_218700 *
                                             (size_t) segred_group_sizze_218699) !=
                                        0) {
                                        const size_t global_work_sizze_230410[1]
                                                     =
                                                     {(size_t) num_groups_218700 *
                                                     (size_t) segred_group_sizze_218699};
                                        const size_t local_work_sizze_230414[1]
                                                     =
                                                     {(size_t) segred_group_sizze_218699};
                                        int64_t time_start_230411 = 0,
                                                time_end_230412 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_small_218707",
                                                    global_work_sizze_230410[0],
                                                    local_work_sizze_230414[0],
                                                    (int) (0 + (int64_t) 4 *
                                                           segred_group_sizze_218699 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218699));
                                            time_start_230411 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_small_218707,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230410,
                                                                                        local_work_sizze_230414,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_small_218707_runs,
                                                                                                                                  &ctx->mainzisegred_small_218707_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230412 = get_wall_time();
                                            
                                            long time_diff_230413 =
                                                 time_end_230412 -
                                                 time_start_230411;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_small_218707",
                                                    time_diff_230413);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                } else {
                                    int64_t groups_per_segment_229059 =
                                            sdiv_up64(num_groups_218700,
                                                      smax64((int64_t) 1,
                                                             m_196691 *
                                                             t_n_m_196759));
                                    int64_t elements_per_thread_229060 =
                                            sdiv_up64(q_t_196696,
                                                      segred_group_sizze_218699 *
                                                      groups_per_segment_229059);
                                    int64_t virt_num_groups_229061 =
                                            groups_per_segment_229059 *
                                            (m_196691 * t_n_m_196759);
                                    int64_t num_threads_229062 =
                                            num_groups_218700 *
                                            segred_group_sizze_218699;
                                    int64_t threads_per_segment_229063 =
                                            groups_per_segment_229059 *
                                            segred_group_sizze_218699;
                                    
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n",
                                                "\n# SegRed-large");
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_segments",
                                                (long long) (m_196691 *
                                                             t_n_m_196759),
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "segment_size",
                                                (long long) q_t_196696, '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "virt_num_groups",
                                                (long long) virt_num_groups_229061,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "num_groups",
                                                (long long) num_groups_218700,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "group_size",
                                                (long long) segred_group_sizze_218699,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "elems_per_thread",
                                                (long long) elements_per_thread_229060,
                                                '\n');
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s: %llu%c",
                                                "groups_per_segment",
                                                (long long) groups_per_segment_229059,
                                                '\n');
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229064;
                                    
                                    segred_tmp_mem_229064.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229064,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229061,
                                                              "segred_tmp_mem_229064")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    segred_tmp_mem_229066;
                                    
                                    segred_tmp_mem_229066.references = NULL;
                                    if (memblock_alloc_device(ctx,
                                                              &segred_tmp_mem_229066,
                                                              (int64_t) 4 *
                                                              virt_num_groups_229061,
                                                              "segred_tmp_mem_229066")) {
                                        err = 1;
                                        goto cleanup;
                                    }
                                    
                                    struct memblock_device
                                    mainzicounter_mem_229068 =
                                    ctx->mainzicounter_mem_229068;
                                    
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            1,
                                                                            (size_t) 1,
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            2,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218699),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            3,
                                                                            (size_t) ((int64_t) 4 *
                                                                                      segred_group_sizze_218699),
                                                                            NULL));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            4,
                                                                            sizeof(m_196691),
                                                                            &m_196691));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            5,
                                                                            sizeof(n_196692),
                                                                            &n_196692));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            6,
                                                                            sizeof(q_t_196696),
                                                                            &q_t_196696));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            7,
                                                                            sizeof(jump_t_196702),
                                                                            &jump_t_196702));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            8,
                                                                            sizeof(t_n_m_196759),
                                                                            &t_n_m_196759));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            9,
                                                                            sizeof(i_196779),
                                                                            &i_196779));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            10,
                                                                            sizeof(num_groups_218700),
                                                                            &num_groups_218700));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            11,
                                                                            sizeof(groups_per_segment_229059),
                                                                            &groups_per_segment_229059));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            12,
                                                                            sizeof(elements_per_thread_229060),
                                                                            &elements_per_thread_229060));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            13,
                                                                            sizeof(virt_num_groups_229061),
                                                                            &virt_num_groups_229061));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            14,
                                                                            sizeof(threads_per_segment_229063),
                                                                            &threads_per_segment_229063));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            15,
                                                                            sizeof(ext_mem_222256.mem),
                                                                            &ext_mem_222256.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            16,
                                                                            sizeof(ext_mem_222257.mem),
                                                                            &ext_mem_222257.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            17,
                                                                            sizeof(ext_mem_222517.mem),
                                                                            &ext_mem_222517.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            18,
                                                                            sizeof(ext_mem_222518.mem),
                                                                            &ext_mem_222518.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            19,
                                                                            sizeof(mem_224386.mem),
                                                                            &mem_224386.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            20,
                                                                            sizeof(mem_224390.mem),
                                                                            &mem_224390.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            21,
                                                                            sizeof(mem_224425.mem),
                                                                            &mem_224425.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            22,
                                                                            sizeof(mem_224429.mem),
                                                                            &mem_224429.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            23,
                                                                            sizeof(mem_224433.mem),
                                                                            &mem_224433.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            24,
                                                                            sizeof(mem_224437.mem),
                                                                            &mem_224437.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            25,
                                                                            sizeof(mem_224441.mem),
                                                                            &mem_224441.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            26,
                                                                            sizeof(mem_224446.mem),
                                                                            &mem_224446.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            27,
                                                                            sizeof(mem_224450.mem),
                                                                            &mem_224450.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            28,
                                                                            sizeof(segred_tmp_mem_229064.mem),
                                                                            &segred_tmp_mem_229064.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            29,
                                                                            sizeof(segred_tmp_mem_229066.mem),
                                                                            &segred_tmp_mem_229066.mem));
                                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_218707,
                                                                            30,
                                                                            sizeof(mainzicounter_mem_229068.mem),
                                                                            &mainzicounter_mem_229068.mem));
                                    if (1 * ((size_t) num_groups_218700 *
                                             (size_t) segred_group_sizze_218699) !=
                                        0) {
                                        const size_t global_work_sizze_230416[1]
                                                     =
                                                     {(size_t) num_groups_218700 *
                                                     (size_t) segred_group_sizze_218699};
                                        const size_t local_work_sizze_230420[1]
                                                     =
                                                     {(size_t) segred_group_sizze_218699};
                                        int64_t time_start_230417 = 0,
                                                time_end_230418 = 0;
                                        
                                        if (ctx->debugging) {
                                            fprintf(ctx->log,
                                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                    "main.segred_large_218707",
                                                    global_work_sizze_230416[0],
                                                    local_work_sizze_230420[0],
                                                    (int) (0 + 1 + (int64_t) 4 *
                                                           segred_group_sizze_218699 +
                                                           (int64_t) 4 *
                                                           segred_group_sizze_218699));
                                            time_start_230417 = get_wall_time();
                                        }
                                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                        ctx->mainzisegred_large_218707,
                                                                                        1,
                                                                                        NULL,
                                                                                        global_work_sizze_230416,
                                                                                        local_work_sizze_230420,
                                                                                        0,
                                                                                        NULL,
                                                                                        ctx->profiling_paused ||
                                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                                  &ctx->mainzisegred_large_218707_runs,
                                                                                                                                  &ctx->mainzisegred_large_218707_total_runtime)));
                                        if (ctx->debugging) {
                                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                            time_end_230418 = get_wall_time();
                                            
                                            long time_diff_230419 =
                                                 time_end_230418 -
                                                 time_start_230417;
                                            
                                            fprintf(ctx->log,
                                                    "kernel %s runtime: %ldus\n",
                                                    "main.segred_large_218707",
                                                    time_diff_230419);
                                        }
                                    }
                                    if (ctx->debugging)
                                        fprintf(ctx->log, "%s\n", "");
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229066,
                                                              "segred_tmp_mem_229066") !=
                                        0)
                                        return 1;
                                    if (memblock_unref_device(ctx,
                                                              &segred_tmp_mem_229064,
                                                              "segred_tmp_mem_229064") !=
                                        0)
                                        return 1;
                                }
                                if (memblock_unref_device(ctx, &mem_224425,
                                                          "mem_224425") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224429,
                                                          "mem_224429") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224433,
                                                          "mem_224433") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224437,
                                                          "mem_224437") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224441,
                                                          "mem_224441") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224452,
                                                        &mem_224446,
                                                        "mem_224446") != 0)
                                    return 1;
                                if (memblock_set_device(ctx, &ext_mem_224451,
                                                        &mem_224450,
                                                        "mem_224450") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224450,
                                                          "mem_224450") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224446,
                                                          "mem_224446") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224441,
                                                          "mem_224441") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224437,
                                                          "mem_224437") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224433,
                                                          "mem_224433") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224429,
                                                          "mem_224429") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224425,
                                                          "mem_224425") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224420,
                                                          "mem_224420") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224416,
                                                          "mem_224416") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224412,
                                                          "mem_224412") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224408,
                                                          "mem_224408") != 0)
                                    return 1;
                                if (memblock_unref_device(ctx, &mem_224404,
                                                          "mem_224404") != 0)
                                    return 1;
                            }
                            if (memblock_unref_device(ctx, &mem_224386,
                                                      "mem_224386") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224390,
                                                      "mem_224390") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224464,
                                                    &ext_mem_224452,
                                                    "ext_mem_224452") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224463,
                                                    &ext_mem_224451,
                                                    "ext_mem_224451") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224451,
                                                      "ext_mem_224451") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &ext_mem_224452,
                                                      "ext_mem_224452") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224390,
                                                      "mem_224390") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224386,
                                                      "mem_224386") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224381,
                                                      "mem_224381") != 0)
                                return 1;
                        }
                        if (memblock_set_device(ctx, &ext_mem_224466,
                                                &ext_mem_224464,
                                                "ext_mem_224464") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224465,
                                                &ext_mem_224463,
                                                "ext_mem_224463") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224463,
                                                  "ext_mem_224463") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224464,
                                                  "ext_mem_224464") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_224468,
                                            &ext_mem_224466,
                                            "ext_mem_224466") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224467,
                                            &ext_mem_224465,
                                            "ext_mem_224465") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224465,
                                              "ext_mem_224465") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224466,
                                              "ext_mem_224466") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_224571, &ext_mem_224468,
                                        "ext_mem_224468") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224570, &ext_mem_224467,
                                        "ext_mem_224467") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224467,
                                          "ext_mem_224467") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224468,
                                          "ext_mem_224468") != 0)
                    return 1;
            } else {
                bool match_lit_199327 = (int64_t) 0 == d_t_196699;
                int64_t binop_y_224489 = (int64_t) 4 * q_t_196696;
                int64_t bytes_224490 = smax64((int64_t) 0, binop_y_224489);
                struct memblock_device ext_mem_224569;
                
                ext_mem_224569.references = NULL;
                
                struct memblock_device ext_mem_224568;
                
                ext_mem_224568.references = NULL;
                if (match_lit_199327) {
                    struct memblock_device mem_224472;
                    
                    mem_224472.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224472, bytes_222488,
                                              "mem_224472")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (futrts_builtinzhreplicate_f32(ctx, mem_224472,
                                                      m_196691 * t_n_m_196759,
                                                      0.0F) != 0) {
                        if (memblock_unref_device(ctx, &mem_224472,
                                                  "mem_224472") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224568,
                                                  "ext_mem_224568") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224569,
                                                  "ext_mem_224569") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224570,
                                                  "ext_mem_224570") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224571,
                                                  "ext_mem_224571") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223977,
                                                  "mem_223977") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223971,
                                                  "ext_mem_223971") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223964,
                                                  "ext_mem_223964") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223965,
                                                  "ext_mem_223965") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223603,
                                                  "ext_mem_223603") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223586,
                                                  "ext_mem_223586") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223569,
                                                  "ext_mem_223569") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223551,
                                                  "ext_mem_223551") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223543,
                                                  "ext_mem_223543") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_223544,
                                                  "ext_mem_223544") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222572,
                                                  "mem_param_222572") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222564,
                                                  "mem_param_222564") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224583,
                                                  "ext_mem_224583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224584,
                                                  "ext_mem_224584") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222550,
                                                  "mem_param_222550") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222542,
                                                  "mem_param_222542") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_222534,
                                                  "mem_param_222534") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224926,
                                                  "ext_mem_224926") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224927,
                                                  "ext_mem_224927") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224928,
                                                  "ext_mem_224928") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223608,
                                                  "mem_223608") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223591,
                                                  "mem_223591") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223574,
                                                  "mem_223574") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_223557,
                                                  "mem_223557") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222588,
                                                  "mem_222588") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222583,
                                                  "mem_222583") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222577,
                                                  "mem_222577") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222526,
                                                  "mem_222526") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222522,
                                                  "mem_222522") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222517,
                                                  "ext_mem_222517") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222518,
                                                  "ext_mem_222518") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222468,
                                                  "ext_mem_222468") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222469,
                                                  "ext_mem_222469") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222419,
                                                  "ext_mem_222419") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222420,
                                                  "ext_mem_222420") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222321,
                                                  "ext_mem_222321") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222322,
                                                  "ext_mem_222322") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_222263,
                                                  "mem_222263") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222256,
                                                  "ext_mem_222256") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_222257,
                                                  "ext_mem_222257") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225292,
                                                  "mem_out_225292") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225291,
                                                  "mem_out_225291") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_out_225290,
                                                  "mem_out_225290") != 0)
                            return 1;
                        err = 1;
                        goto cleanup;
                    }
                    
                    int64_t segmap_group_sizze_218951;
                    
                    segmap_group_sizze_218951 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_218925;
                    
                    int64_t segmap_usable_groups_218952 =
                            sdiv_up64(nest_sizze_200083,
                                      segmap_group_sizze_218951);
                    struct memblock_device mem_224477;
                    
                    mem_224477.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224477, bytes_222521,
                                              "mem_224477")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218956,
                                                            1, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218956,
                                                            2, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218956,
                                                            3,
                                                            sizeof(Y_mem_222225.mem),
                                                            &Y_mem_222225.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218956,
                                                            4,
                                                            sizeof(mem_223977.mem),
                                                            &mem_223977.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218956,
                                                            5,
                                                            sizeof(mem_224477.mem),
                                                            &mem_224477.mem));
                    if (1 * ((size_t) segmap_usable_groups_218952 *
                             (size_t) segmap_group_sizze_218951) != 0) {
                        const size_t global_work_sizze_230421[1] =
                                     {(size_t) segmap_usable_groups_218952 *
                                     (size_t) segmap_group_sizze_218951};
                        const size_t local_work_sizze_230425[1] =
                                     {(size_t) segmap_group_sizze_218951};
                        int64_t time_start_230422 = 0, time_end_230423 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_218956",
                                    global_work_sizze_230421[0],
                                    local_work_sizze_230425[0], (int) 0);
                            time_start_230422 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_218956,
                                                                        1, NULL,
                                                                        global_work_sizze_230421,
                                                                        local_work_sizze_230425,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_218956_runs,
                                                                                                                  &ctx->mainzisegmap_218956_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230423 = get_wall_time();
                            
                            long time_diff_230424 = time_end_230423 -
                                 time_start_230422;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_218956", time_diff_230424);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    
                    int64_t segmap_group_sizze_218967;
                    
                    segmap_group_sizze_218967 =
                        *ctx->tuning_params.mainzisegmap_group_sizze_218869;
                    
                    int64_t segmap_usable_groups_218968 =
                            sdiv_up64(nest_sizze_200083,
                                      segmap_group_sizze_218967);
                    struct memblock_device mem_224482;
                    
                    mem_224482.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224482, bytes_222521,
                                              "mem_224482")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mem_224486;
                    
                    mem_224486.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224486, bytes_222521,
                                              "mem_224486")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            1,
                                                            sizeof(ctx->failure_is_an_option),
                                                            &ctx->failure_is_an_option));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            3, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            4, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            5,
                                                            sizeof(ctx_param_ext_222545),
                                                            &ctx_param_ext_222545));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            6,
                                                            sizeof(ctx_param_ext_222546),
                                                            &ctx_param_ext_222546));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            7,
                                                            sizeof(ctx_param_ext_222548),
                                                            &ctx_param_ext_222548));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            8,
                                                            sizeof(ext_mem_222257.mem),
                                                            &ext_mem_222257.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            9,
                                                            sizeof(mem_param_222550.mem),
                                                            &mem_param_222550.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            10,
                                                            sizeof(mem_224477.mem),
                                                            &mem_224477.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            11,
                                                            sizeof(mem_224482.mem),
                                                            &mem_224482.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_218973,
                                                            12,
                                                            sizeof(mem_224486.mem),
                                                            &mem_224486.mem));
                    if (1 * ((size_t) segmap_usable_groups_218968 *
                             (size_t) segmap_group_sizze_218967) != 0) {
                        const size_t global_work_sizze_230426[1] =
                                     {(size_t) segmap_usable_groups_218968 *
                                     (size_t) segmap_group_sizze_218967};
                        const size_t local_work_sizze_230430[1] =
                                     {(size_t) segmap_group_sizze_218967};
                        int64_t time_start_230427 = 0, time_end_230428 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_218973",
                                    global_work_sizze_230426[0],
                                    local_work_sizze_230430[0], (int) 0);
                            time_start_230427 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_218973,
                                                                        1, NULL,
                                                                        global_work_sizze_230426,
                                                                        local_work_sizze_230430,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_218973_runs,
                                                                                                                  &ctx->mainzisegmap_218973_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230428 = get_wall_time();
                            
                            long time_diff_230429 = time_end_230428 -
                                 time_start_230427;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_218973", time_diff_230429);
                        }
                    }
                    ctx->failure_is_an_option = 1;
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &mem_224477, "mem_224477") !=
                        0)
                        return 1;
                    
                    struct memblock_device mem_224496;
                    
                    mem_224496.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224496, bytes_222488,
                                              "mem_224496")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_t_196696),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      q_t_196696),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            3,
                                                            (size_t) bytes_224490,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            4, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            5, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            6,
                                                            sizeof(q_t_196696),
                                                            &q_t_196696));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            7,
                                                            sizeof(jump_t_196702),
                                                            &jump_t_196702));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            8,
                                                            sizeof(t_n_m_196759),
                                                            &t_n_m_196759));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            9, sizeof(i_196779),
                                                            &i_196779));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            10,
                                                            sizeof(ext_mem_222256.mem),
                                                            &ext_mem_222256.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            11,
                                                            sizeof(ext_mem_222257.mem),
                                                            &ext_mem_222257.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            12,
                                                            sizeof(ext_mem_222517.mem),
                                                            &ext_mem_222517.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            13,
                                                            sizeof(ext_mem_222518.mem),
                                                            &ext_mem_222518.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            14,
                                                            sizeof(mem_224482.mem),
                                                            &mem_224482.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            15,
                                                            sizeof(mem_224486.mem),
                                                            &mem_224486.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219000,
                                                            16,
                                                            sizeof(mem_224496.mem),
                                                            &mem_224496.mem));
                    if (1 * ((size_t) nest_sizze_203201 *
                             (size_t) q_t_196696) != 0) {
                        const size_t global_work_sizze_230431[1] =
                                     {(size_t) nest_sizze_203201 *
                                     (size_t) q_t_196696};
                        const size_t local_work_sizze_230435[1] =
                                     {(size_t) q_t_196696};
                        int64_t time_start_230432 = 0, time_end_230433 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_intragroup_219000",
                                    global_work_sizze_230431[0],
                                    local_work_sizze_230435[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       q_t_196696 +
                                                                       (int64_t) 4 *
                                                                       q_t_196696 +
                                                                       bytes_224490));
                            time_start_230432 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_intragroup_219000,
                                                                        1, NULL,
                                                                        global_work_sizze_230431,
                                                                        local_work_sizze_230435,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_intragroup_219000_runs,
                                                                                                                  &ctx->mainzisegmap_intragroup_219000_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230433 = get_wall_time();
                            
                            long time_diff_230434 = time_end_230433 -
                                 time_start_230432;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_219000",
                                    time_diff_230434);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &mem_224482, "mem_224482") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224486, "mem_224486") !=
                        0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224569, &mem_224496,
                                            "mem_224496") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224568, &mem_224472,
                                            "mem_224472") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224496, "mem_224496") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224486, "mem_224486") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224482, "mem_224482") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224477, "mem_224477") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224472, "mem_224472") !=
                        0)
                        return 1;
                } else {
                    bool match_lit_199404 = (int64_t) 1 == d_t_196699;
                    struct memblock_device ext_mem_224567;
                    
                    ext_mem_224567.references = NULL;
                    
                    struct memblock_device ext_mem_224566;
                    
                    ext_mem_224566.references = NULL;
                    if (match_lit_199404) {
                        int64_t segmap_group_sizze_219263;
                        
                        segmap_group_sizze_219263 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_219237;
                        
                        int64_t segmap_usable_groups_219264 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_219263);
                        struct memblock_device mem_224501;
                        
                        mem_224501.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224501,
                                                  bytes_222521, "mem_224501")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219268,
                                                                1,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219268,
                                                                2,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219268,
                                                                3,
                                                                sizeof(Y_mem_222225.mem),
                                                                &Y_mem_222225.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219268,
                                                                4,
                                                                sizeof(mem_223977.mem),
                                                                &mem_223977.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219268,
                                                                5,
                                                                sizeof(mem_224501.mem),
                                                                &mem_224501.mem));
                        if (1 * ((size_t) segmap_usable_groups_219264 *
                                 (size_t) segmap_group_sizze_219263) != 0) {
                            const size_t global_work_sizze_230436[1] =
                                         {(size_t) segmap_usable_groups_219264 *
                                         (size_t) segmap_group_sizze_219263};
                            const size_t local_work_sizze_230440[1] =
                                         {(size_t) segmap_group_sizze_219263};
                            int64_t time_start_230437 = 0, time_end_230438 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_219268",
                                        global_work_sizze_230436[0],
                                        local_work_sizze_230440[0], (int) 0);
                                time_start_230437 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_219268,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230436,
                                                                            local_work_sizze_230440,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_219268_runs,
                                                                                                                      &ctx->mainzisegmap_219268_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230438 = get_wall_time();
                                
                                long time_diff_230439 = time_end_230438 -
                                     time_start_230437;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_219268", time_diff_230439);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        
                        int64_t segmap_group_sizze_219279;
                        
                        segmap_group_sizze_219279 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_219181;
                        
                        int64_t segmap_usable_groups_219280 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_219279);
                        struct memblock_device mem_224506;
                        
                        mem_224506.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224506,
                                                  bytes_222521, "mem_224506")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_224510;
                        
                        mem_224510.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224510,
                                                  bytes_222521, "mem_224510")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                1,
                                                                sizeof(ctx->failure_is_an_option),
                                                                &ctx->failure_is_an_option));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                3,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                4,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                5,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                6,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                7,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                8,
                                                                sizeof(ext_mem_222257.mem),
                                                                &ext_mem_222257.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                9,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                10,
                                                                sizeof(mem_224501.mem),
                                                                &mem_224501.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                11,
                                                                sizeof(mem_224506.mem),
                                                                &mem_224506.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219285,
                                                                12,
                                                                sizeof(mem_224510.mem),
                                                                &mem_224510.mem));
                        if (1 * ((size_t) segmap_usable_groups_219280 *
                                 (size_t) segmap_group_sizze_219279) != 0) {
                            const size_t global_work_sizze_230441[1] =
                                         {(size_t) segmap_usable_groups_219280 *
                                         (size_t) segmap_group_sizze_219279};
                            const size_t local_work_sizze_230445[1] =
                                         {(size_t) segmap_group_sizze_219279};
                            int64_t time_start_230442 = 0, time_end_230443 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_219285",
                                        global_work_sizze_230441[0],
                                        local_work_sizze_230445[0], (int) 0);
                                time_start_230442 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_219285,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230441,
                                                                            local_work_sizze_230445,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_219285_runs,
                                                                                                                      &ctx->mainzisegmap_219285_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230443 = get_wall_time();
                                
                                long time_diff_230444 = time_end_230443 -
                                     time_start_230442;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_219285", time_diff_230444);
                            }
                        }
                        ctx->failure_is_an_option = 1;
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_224501,
                                                  "mem_224501") != 0)
                            return 1;
                        
                        struct memblock_device mem_224523;
                        
                        mem_224523.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224523,
                                                  bytes_222488, "mem_224523")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_224527;
                        
                        mem_224527.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224527,
                                                  bytes_222488, "mem_224527")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                6,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                7,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                8,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                9,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                10,
                                                                sizeof(q_t_196696),
                                                                &q_t_196696));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                11,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                12,
                                                                sizeof(t_n_m_196759),
                                                                &t_n_m_196759));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                13,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                14,
                                                                sizeof(ext_mem_222256.mem),
                                                                &ext_mem_222256.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                15,
                                                                sizeof(ext_mem_222257.mem),
                                                                &ext_mem_222257.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                16,
                                                                sizeof(ext_mem_222517.mem),
                                                                &ext_mem_222517.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                17,
                                                                sizeof(ext_mem_222518.mem),
                                                                &ext_mem_222518.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                18,
                                                                sizeof(mem_224506.mem),
                                                                &mem_224506.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                19,
                                                                sizeof(mem_224510.mem),
                                                                &mem_224510.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                20,
                                                                sizeof(mem_224523.mem),
                                                                &mem_224523.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219313,
                                                                21,
                                                                sizeof(mem_224527.mem),
                                                                &mem_224527.mem));
                        if (1 * ((size_t) nest_sizze_203201 *
                                 (size_t) q_t_196696) != 0) {
                            const size_t global_work_sizze_230446[1] =
                                         {(size_t) nest_sizze_203201 *
                                         (size_t) q_t_196696};
                            const size_t local_work_sizze_230450[1] =
                                         {(size_t) q_t_196696};
                            int64_t time_start_230447 = 0, time_end_230448 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_219313",
                                        global_work_sizze_230446[0],
                                        local_work_sizze_230450[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           bytes_224490 +
                                                                           bytes_224490));
                                time_start_230447 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_219313,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230446,
                                                                            local_work_sizze_230450,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_219313_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_219313_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230448 = get_wall_time();
                                
                                long time_diff_230449 = time_end_230448 -
                                     time_start_230447;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_219313",
                                        time_diff_230449);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_224506,
                                                  "mem_224506") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224510,
                                                  "mem_224510") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224567,
                                                &mem_224523, "mem_224523") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224566,
                                                &mem_224527, "mem_224527") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224527,
                                                  "mem_224527") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224523,
                                                  "mem_224523") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224510,
                                                  "mem_224510") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224506,
                                                  "mem_224506") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224501,
                                                  "mem_224501") != 0)
                            return 1;
                    } else {
                        int64_t segmap_group_sizze_219667;
                        
                        segmap_group_sizze_219667 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_219641;
                        
                        int64_t segmap_usable_groups_219668 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_219667);
                        struct memblock_device mem_224532;
                        
                        mem_224532.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224532,
                                                  bytes_222521, "mem_224532")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219672,
                                                                1,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219672,
                                                                2,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219672,
                                                                3,
                                                                sizeof(Y_mem_222225.mem),
                                                                &Y_mem_222225.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219672,
                                                                4,
                                                                sizeof(mem_223977.mem),
                                                                &mem_223977.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219672,
                                                                5,
                                                                sizeof(mem_224532.mem),
                                                                &mem_224532.mem));
                        if (1 * ((size_t) segmap_usable_groups_219668 *
                                 (size_t) segmap_group_sizze_219667) != 0) {
                            const size_t global_work_sizze_230451[1] =
                                         {(size_t) segmap_usable_groups_219668 *
                                         (size_t) segmap_group_sizze_219667};
                            const size_t local_work_sizze_230455[1] =
                                         {(size_t) segmap_group_sizze_219667};
                            int64_t time_start_230452 = 0, time_end_230453 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_219672",
                                        global_work_sizze_230451[0],
                                        local_work_sizze_230455[0], (int) 0);
                                time_start_230452 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_219672,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230451,
                                                                            local_work_sizze_230455,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_219672_runs,
                                                                                                                      &ctx->mainzisegmap_219672_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230453 = get_wall_time();
                                
                                long time_diff_230454 = time_end_230453 -
                                     time_start_230452;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_219672", time_diff_230454);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        
                        int64_t segmap_group_sizze_219683;
                        
                        segmap_group_sizze_219683 =
                            *ctx->tuning_params.mainzisegmap_group_sizze_219585;
                        
                        int64_t segmap_usable_groups_219684 =
                                sdiv_up64(nest_sizze_200083,
                                          segmap_group_sizze_219683);
                        struct memblock_device mem_224537;
                        
                        mem_224537.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224537,
                                                  bytes_222521, "mem_224537")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_224541;
                        
                        mem_224541.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224541,
                                                  bytes_222521, "mem_224541")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                1,
                                                                sizeof(ctx->failure_is_an_option),
                                                                &ctx->failure_is_an_option));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                3,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                4,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                5,
                                                                sizeof(ctx_param_ext_222545),
                                                                &ctx_param_ext_222545));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                6,
                                                                sizeof(ctx_param_ext_222546),
                                                                &ctx_param_ext_222546));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                7,
                                                                sizeof(ctx_param_ext_222548),
                                                                &ctx_param_ext_222548));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                8,
                                                                sizeof(ext_mem_222257.mem),
                                                                &ext_mem_222257.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                9,
                                                                sizeof(mem_param_222550.mem),
                                                                &mem_param_222550.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                10,
                                                                sizeof(mem_224532.mem),
                                                                &mem_224532.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                11,
                                                                sizeof(mem_224537.mem),
                                                                &mem_224537.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219689,
                                                                12,
                                                                sizeof(mem_224541.mem),
                                                                &mem_224541.mem));
                        if (1 * ((size_t) segmap_usable_groups_219684 *
                                 (size_t) segmap_group_sizze_219683) != 0) {
                            const size_t global_work_sizze_230456[1] =
                                         {(size_t) segmap_usable_groups_219684 *
                                         (size_t) segmap_group_sizze_219683};
                            const size_t local_work_sizze_230460[1] =
                                         {(size_t) segmap_group_sizze_219683};
                            int64_t time_start_230457 = 0, time_end_230458 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_219689",
                                        global_work_sizze_230456[0],
                                        local_work_sizze_230460[0], (int) 0);
                                time_start_230457 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_219689,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230456,
                                                                            local_work_sizze_230460,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_219689_runs,
                                                                                                                      &ctx->mainzisegmap_219689_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230458 = get_wall_time();
                                
                                long time_diff_230459 = time_end_230458 -
                                     time_start_230457;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_219689", time_diff_230459);
                            }
                        }
                        ctx->failure_is_an_option = 1;
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_224532,
                                                  "mem_224532") != 0)
                            return 1;
                        
                        struct memblock_device mem_224561;
                        
                        mem_224561.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224561,
                                                  bytes_222488, "mem_224561")) {
                            err = 1;
                            goto cleanup;
                        }
                        
                        struct memblock_device mem_224565;
                        
                        mem_224565.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224565,
                                                  bytes_222488, "mem_224565")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "\n# SegMap");
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                1,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                2,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                3,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                4,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                5,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                6,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                7,
                                                                (size_t) ((int64_t) 4 *
                                                                          q_t_196696),
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                8,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                9,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                10,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                11,
                                                                (size_t) bytes_224490,
                                                                NULL));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                12,
                                                                sizeof(m_196691),
                                                                &m_196691));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                13,
                                                                sizeof(n_196692),
                                                                &n_196692));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                14,
                                                                sizeof(q_t_196696),
                                                                &q_t_196696));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                15,
                                                                sizeof(jump_t_196702),
                                                                &jump_t_196702));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                16,
                                                                sizeof(t_n_m_196759),
                                                                &t_n_m_196759));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                17,
                                                                sizeof(i_196779),
                                                                &i_196779));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                18,
                                                                sizeof(ext_mem_222256.mem),
                                                                &ext_mem_222256.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                19,
                                                                sizeof(ext_mem_222257.mem),
                                                                &ext_mem_222257.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                20,
                                                                sizeof(ext_mem_222517.mem),
                                                                &ext_mem_222517.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                21,
                                                                sizeof(ext_mem_222518.mem),
                                                                &ext_mem_222518.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                22,
                                                                sizeof(mem_224537.mem),
                                                                &mem_224537.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                23,
                                                                sizeof(mem_224541.mem),
                                                                &mem_224541.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                24,
                                                                sizeof(mem_224561.mem),
                                                                &mem_224561.mem));
                        OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_219717,
                                                                25,
                                                                sizeof(mem_224565.mem),
                                                                &mem_224565.mem));
                        if (1 * ((size_t) nest_sizze_203201 *
                                 (size_t) q_t_196696) != 0) {
                            const size_t global_work_sizze_230461[1] =
                                         {(size_t) nest_sizze_203201 *
                                         (size_t) q_t_196696};
                            const size_t local_work_sizze_230465[1] =
                                         {(size_t) q_t_196696};
                            int64_t time_start_230462 = 0, time_end_230463 = 0;
                            
                            if (ctx->debugging) {
                                fprintf(ctx->log,
                                        "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                        "main.segmap_intragroup_219717",
                                        global_work_sizze_230461[0],
                                        local_work_sizze_230465[0], (int) (0 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           (int64_t) 4 *
                                                                           q_t_196696 +
                                                                           bytes_224490 +
                                                                           bytes_224490 +
                                                                           bytes_224490 +
                                                                           bytes_224490));
                                time_start_230462 = get_wall_time();
                            }
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                            ctx->mainzisegmap_intragroup_219717,
                                                                            1,
                                                                            NULL,
                                                                            global_work_sizze_230461,
                                                                            local_work_sizze_230465,
                                                                            0,
                                                                            NULL,
                                                                            ctx->profiling_paused ||
                                                                            !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                      &ctx->mainzisegmap_intragroup_219717_runs,
                                                                                                                      &ctx->mainzisegmap_intragroup_219717_total_runtime)));
                            if (ctx->debugging) {
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                time_end_230463 = get_wall_time();
                                
                                long time_diff_230464 = time_end_230463 -
                                     time_start_230462;
                                
                                fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                        "main.segmap_intragroup_219717",
                                        time_diff_230464);
                            }
                        }
                        if (ctx->debugging)
                            fprintf(ctx->log, "%s\n", "");
                        if (memblock_unref_device(ctx, &mem_224537,
                                                  "mem_224537") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224541,
                                                  "mem_224541") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224567,
                                                &mem_224561, "mem_224561") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &ext_mem_224566,
                                                &mem_224565, "mem_224565") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224565,
                                                  "mem_224565") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224561,
                                                  "mem_224561") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224541,
                                                  "mem_224541") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224537,
                                                  "mem_224537") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224532,
                                                  "mem_224532") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_224569,
                                            &ext_mem_224567,
                                            "ext_mem_224567") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224568,
                                            &ext_mem_224566,
                                            "ext_mem_224566") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224566,
                                              "ext_mem_224566") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224567,
                                              "ext_mem_224567") != 0)
                        return 1;
                }
                if (memblock_set_device(ctx, &ext_mem_224571, &ext_mem_224569,
                                        "ext_mem_224569") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224570, &ext_mem_224568,
                                        "ext_mem_224568") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224568,
                                          "ext_mem_224568") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224569,
                                          "ext_mem_224569") != 0)
                    return 1;
            }
            
            struct memblock_device ext_mem_224577;
            
            ext_mem_224577.references = NULL;
            if (cond_197221) {
                bool zzero_199693 = jump_t_196702 == (int64_t) 0;
                bool nonzzero_199694 = !zzero_199693;
                bool nonzzero_cert_199695;
                
                if (!nonzzero_199694) {
                    ctx->error = msgprintf("Error: %s\n\nBacktrace:\n%s",
                                           "division by zero",
                                           "-> #0  loess.fut:546:20-27\n   #1  /prelude/soacs.fut:59:3-10\n   #2  /prelude/array.fut:195:3-17\n   #3  utils.fut:6:3-16\n   #4  loess.fut:545:3-549:9\n   #5  stl.fut:304:23-75\n   #6  /prelude/soacs.fut:67:19-23\n   #7  /prelude/soacs.fut:67:3-37\n   #8  stl.fut:303:15-305:43\n   #9  stl.fut:401:3-415:29\n   #10 stl.fut:385:1-415:29\n");
                    if (memblock_unref_device(ctx, &ext_mem_224577,
                                              "ext_mem_224577") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224570,
                                              "ext_mem_224570") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224571,
                                              "ext_mem_224571") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223977, "mem_223977") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223971,
                                              "ext_mem_223971") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223964,
                                              "ext_mem_223964") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223965,
                                              "ext_mem_223965") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223603,
                                              "ext_mem_223603") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                int64_t y_199696 = sub64(t_n_m_196759, (int64_t) 1);
                int64_t segmap_group_sizze_219972;
                
                segmap_group_sizze_219972 =
                    *ctx->tuning_params.mainzisegmap_group_sizze_219854;
                
                int64_t segmap_usable_groups_219973 =
                        sdiv_up64(nest_sizze_200083, segmap_group_sizze_219972);
                struct memblock_device mem_224576;
                
                mem_224576.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224576, bytes_222521,
                                          "mem_224576")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        3, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        4, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        5,
                                                        sizeof(jump_t_196702),
                                                        &jump_t_196702));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        6, sizeof(t_n_m_196759),
                                                        &t_n_m_196759));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        7, sizeof(i_196779),
                                                        &i_196779));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        8, sizeof(y_199696),
                                                        &y_199696));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        9,
                                                        sizeof(ext_mem_224570.mem),
                                                        &ext_mem_224570.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        10,
                                                        sizeof(ext_mem_224571.mem),
                                                        &ext_mem_224571.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_219977,
                                                        11,
                                                        sizeof(mem_224576.mem),
                                                        &mem_224576.mem));
                if (1 * ((size_t) segmap_usable_groups_219973 *
                         (size_t) segmap_group_sizze_219972) != 0) {
                    const size_t global_work_sizze_230466[1] =
                                 {(size_t) segmap_usable_groups_219973 *
                                 (size_t) segmap_group_sizze_219972};
                    const size_t local_work_sizze_230470[1] =
                                 {(size_t) segmap_group_sizze_219972};
                    int64_t time_start_230467 = 0, time_end_230468 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_219977",
                                global_work_sizze_230466[0],
                                local_work_sizze_230470[0], (int) 0);
                        time_start_230467 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_219977,
                                                                    1, NULL,
                                                                    global_work_sizze_230466,
                                                                    local_work_sizze_230470,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_219977_runs,
                                                                                                              &ctx->mainzisegmap_219977_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230468 = get_wall_time();
                        
                        long time_diff_230469 = time_end_230468 -
                             time_start_230467;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_219977", time_diff_230469);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_set_device(ctx, &ext_mem_224577, &mem_224576,
                                        "mem_224576") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224576, "mem_224576") != 0)
                    return 1;
            } else {
                bool dim_match_199749 = n_196692 == t_n_m_196759;
                bool empty_or_match_cert_199750;
                
                if (!dim_match_199749) {
                    ctx->error =
                        msgprintf("Error: %s%lld%s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                                  "Value of (core language) shape (",
                                  (long long) m_196691, ", ",
                                  (long long) t_n_m_196759,
                                  ") cannot match shape of type `[",
                                  (long long) m_196691, "][",
                                  (long long) n_196692, "]t`.",
                                  "-> #0  stl.fut:307:15-36\n   #1  stl.fut:401:3-415:29\n   #2  stl.fut:385:1-415:29\n");
                    if (memblock_unref_device(ctx, &ext_mem_224577,
                                              "ext_mem_224577") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224570,
                                              "ext_mem_224570") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224571,
                                              "ext_mem_224571") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223977, "mem_223977") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223971,
                                              "ext_mem_223971") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223964,
                                              "ext_mem_223964") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223965,
                                              "ext_mem_223965") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223603,
                                              "ext_mem_223603") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223586,
                                              "ext_mem_223586") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223569,
                                              "ext_mem_223569") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223551,
                                              "ext_mem_223551") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223543,
                                              "ext_mem_223543") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_223544,
                                              "ext_mem_223544") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                if (memblock_set_device(ctx, &ext_mem_224577, &ext_mem_224571,
                                        "ext_mem_224571") != 0)
                    return 1;
            }
            if (memblock_unref_device(ctx, &ext_mem_224570, "ext_mem_224570") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224571, "ext_mem_224571") !=
                0)
                return 1;
            
            int64_t ctx_param_ext_tmp_225834 = ext_224578;
            int64_t ctx_param_ext_tmp_225835 = ext_224578;
            struct memblock_device mem_param_tmp_225836;
            
            mem_param_tmp_225836.references = NULL;
            if (memblock_set_device(ctx, &mem_param_tmp_225836, &mem_223977,
                                    "mem_223977") != 0)
                return 1;
            
            struct memblock_device mem_param_tmp_225837;
            
            mem_param_tmp_225837.references = NULL;
            if (memblock_set_device(ctx, &mem_param_tmp_225837, &ext_mem_224577,
                                    "ext_mem_224577") != 0)
                return 1;
            ctx_param_ext_222566 = ctx_param_ext_tmp_225834;
            ctx_param_ext_222568 = ctx_param_ext_tmp_225835;
            if (memblock_set_device(ctx, &mem_param_222564,
                                    &mem_param_tmp_225836,
                                    "mem_param_tmp_225836") != 0)
                return 1;
            if (memblock_set_device(ctx, &mem_param_222572,
                                    &mem_param_tmp_225837,
                                    "mem_param_tmp_225837") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_param_tmp_225837,
                                      "mem_param_tmp_225837") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_param_tmp_225836,
                                      "mem_param_tmp_225836") != 0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224577, "ext_mem_224577") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224570, "ext_mem_224570") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224571, "ext_mem_224571") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &mem_223977, "mem_223977") != 0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223971, "ext_mem_223971") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223964, "ext_mem_223964") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223965, "ext_mem_223965") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223603, "ext_mem_223603") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223586, "ext_mem_223586") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223569, "ext_mem_223569") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223551, "ext_mem_223551") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223543, "ext_mem_223543") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_223544, "ext_mem_223544") !=
                0)
                return 1;
        }
        ext_224590 = ctx_param_ext_222566;
        ext_224588 = ctx_param_ext_222568;
        if (memblock_set_device(ctx, &ext_mem_224584, &mem_param_222564,
                                "mem_param_222564") != 0)
            return 1;
        if (memblock_set_device(ctx, &ext_mem_224583, &mem_param_222572,
                                "mem_param_222572") != 0)
            return 1;
        
        bool cond_199752 = slt64(i_outer_197305, y_197222);
        int64_t ext_224925;
        
        if (cond_199752) {
            ext_224925 = m_196691;
        } else {
            ext_224925 = ctx_param_ext_222547;
        }
        
        int64_t ext_224924;
        
        if (cond_199752) {
            ext_224924 = n_196692;
        } else {
            ext_224924 = ctx_param_ext_222549;
        }
        
        int64_t ext_224923;
        
        if (cond_199752) {
            ext_224923 = m_196691;
        } else {
            ext_224923 = ctx_param_ext_222543;
        }
        
        int64_t ext_224922;
        
        if (cond_199752) {
            ext_224922 = n_196692;
        } else {
            ext_224922 = ctx_param_ext_222544;
        }
        
        int64_t ext_224921;
        
        if (cond_199752) {
            ext_224921 = n_196692;
        } else {
            ext_224921 = ctx_param_ext_222546;
        }
        
        int64_t ext_224920;
        
        if (cond_199752) {
            ext_224920 = (int64_t) 1;
        } else {
            ext_224920 = ctx_param_ext_222548;
        }
        
        int64_t ext_224919;
        
        if (cond_199752) {
            ext_224919 = (int64_t) 0;
        } else {
            ext_224919 = ctx_param_ext_222545;
        }
        
        struct memblock_device ext_mem_224918;
        
        ext_mem_224918.references = NULL;
        if (cond_199752) {
            bool suff_intra_par_220060;
            
            suff_intra_par_220060 =
                *ctx->tuning_params.mainzisuff_intra_par_34 <= n_196692;
            if (ctx->logging)
                fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                        "main.suff_intra_par_34", (long) n_196692,
                        suff_intra_par_220060 ? "true" : "false");
            
            bool intra_suff_and_fits_220063 = fits_199971 &&
                 suff_intra_par_220060;
            int64_t segmap_group_sizze_220189;
            
            segmap_group_sizze_220189 =
                *ctx->tuning_params.mainzisegmap_group_sizze_220153;
            
            int64_t segmap_group_sizze_220210;
            
            segmap_group_sizze_220210 =
                *ctx->tuning_params.mainzisegmap_group_sizze_220110;
            
            int64_t binop_y_224601 = (int64_t) 4 * n_196692;
            int64_t bytes_224602 = smax64((int64_t) 0, binop_y_224601);
            struct memblock_device ext_mem_224627;
            
            ext_mem_224627.references = NULL;
            
            struct memblock_device ext_mem_224626;
            
            ext_mem_224626.references = NULL;
            
            int32_t local_memory_capacity_229290;
            
            local_memory_capacity_229290 = ctx->opencl.max_local_memory;
            if (sle64(bytes_224602 + srem64((int64_t) 8 - srem64(bytes_224602,
                                                                 (int64_t) 8),
                                            (int64_t) 8) + (bytes_224602 +
                                                            srem64((int64_t) 8 -
                                                                   srem64(bytes_224602,
                                                                          (int64_t) 8),
                                                                   (int64_t) 8)),
                      sext_i32_i64(local_memory_capacity_229290)) &&
                intra_suff_and_fits_220063) {
                struct memblock_device mem_224611;
                
                mem_224611.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224611, bytes_222521,
                                          "mem_224611")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224615;
                
                mem_224615.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224615, bytes_222521,
                                          "mem_224615")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        3,
                                                        (size_t) bytes_224602,
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        4,
                                                        (size_t) bytes_224602,
                                                        NULL));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        5, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        6, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        7, sizeof(ext_224588),
                                                        &ext_224588));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        8,
                                                        sizeof(Y_mem_222225.mem),
                                                        &Y_mem_222225.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        9,
                                                        sizeof(ext_mem_222257.mem),
                                                        &ext_mem_222257.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        10,
                                                        sizeof(ext_mem_224583.mem),
                                                        &ext_mem_224583.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        11,
                                                        sizeof(ext_mem_224584.mem),
                                                        &ext_mem_224584.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        12,
                                                        sizeof(mem_224611.mem),
                                                        &mem_224611.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220067,
                                                        13,
                                                        sizeof(mem_224615.mem),
                                                        &mem_224615.mem));
                if (1 * ((size_t) m_196691 * (size_t) n_196692) != 0) {
                    const size_t global_work_sizze_230471[1] =
                                 {(size_t) m_196691 * (size_t) n_196692};
                    const size_t local_work_sizze_230475[1] =
                                 {(size_t) n_196692};
                    int64_t time_start_230472 = 0, time_end_230473 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_intragroup_220067",
                                global_work_sizze_230471[0],
                                local_work_sizze_230475[0], (int) (0 +
                                                                   bytes_224602 +
                                                                   bytes_224602));
                        time_start_230472 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_intragroup_220067,
                                                                    1, NULL,
                                                                    global_work_sizze_230471,
                                                                    local_work_sizze_230475,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_intragroup_220067_runs,
                                                                                                              &ctx->mainzisegmap_intragroup_220067_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230473 = get_wall_time();
                        
                        long time_diff_230474 = time_end_230473 -
                             time_start_230472;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_intragroup_220067",
                                time_diff_230474);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_set_device(ctx, &ext_mem_224627, &mem_224611,
                                        "mem_224611") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224626, &mem_224615,
                                        "mem_224615") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224615, "mem_224615") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224611, "mem_224611") != 0)
                    return 1;
            } else {
                int64_t segmap_usable_groups_220190 =
                        sdiv_up64(nest_sizze_200083, segmap_group_sizze_220189);
                struct memblock_device mem_224620;
                
                mem_224620.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224620, bytes_222521,
                                          "mem_224620")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        2, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        3, sizeof(ext_224588),
                                                        &ext_224588));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        4,
                                                        sizeof(Y_mem_222225.mem),
                                                        &Y_mem_222225.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        5,
                                                        sizeof(ext_mem_224583.mem),
                                                        &ext_mem_224583.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        6,
                                                        sizeof(ext_mem_224584.mem),
                                                        &ext_mem_224584.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220194,
                                                        7,
                                                        sizeof(mem_224620.mem),
                                                        &mem_224620.mem));
                if (1 * ((size_t) segmap_usable_groups_220190 *
                         (size_t) segmap_group_sizze_220189) != 0) {
                    const size_t global_work_sizze_230476[1] =
                                 {(size_t) segmap_usable_groups_220190 *
                                 (size_t) segmap_group_sizze_220189};
                    const size_t local_work_sizze_230480[1] =
                                 {(size_t) segmap_group_sizze_220189};
                    int64_t time_start_230477 = 0, time_end_230478 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_220194",
                                global_work_sizze_230476[0],
                                local_work_sizze_230480[0], (int) 0);
                        time_start_230477 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_220194,
                                                                    1, NULL,
                                                                    global_work_sizze_230476,
                                                                    local_work_sizze_230480,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_220194_runs,
                                                                                                              &ctx->mainzisegmap_220194_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230478 = get_wall_time();
                        
                        long time_diff_230479 = time_end_230478 -
                             time_start_230477;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_220194", time_diff_230479);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                
                int64_t segmap_usable_groups_220211 =
                        sdiv_up64(nest_sizze_200083, segmap_group_sizze_220210);
                struct memblock_device mem_224625;
                
                mem_224625.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224625, bytes_222521,
                                          "mem_224625")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        1,
                                                        sizeof(ctx->failure_is_an_option),
                                                        &ctx->failure_is_an_option));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        3, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        4, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        5,
                                                        sizeof(ext_mem_222257.mem),
                                                        &ext_mem_222257.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        6,
                                                        sizeof(mem_224620.mem),
                                                        &mem_224620.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220215,
                                                        7,
                                                        sizeof(mem_224625.mem),
                                                        &mem_224625.mem));
                if (1 * ((size_t) segmap_usable_groups_220211 *
                         (size_t) segmap_group_sizze_220210) != 0) {
                    const size_t global_work_sizze_230481[1] =
                                 {(size_t) segmap_usable_groups_220211 *
                                 (size_t) segmap_group_sizze_220210};
                    const size_t local_work_sizze_230485[1] =
                                 {(size_t) segmap_group_sizze_220210};
                    int64_t time_start_230482 = 0, time_end_230483 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_220215",
                                global_work_sizze_230481[0],
                                local_work_sizze_230485[0], (int) 0);
                        time_start_230482 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_220215,
                                                                    1, NULL,
                                                                    global_work_sizze_230481,
                                                                    local_work_sizze_230485,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_220215_runs,
                                                                                                              &ctx->mainzisegmap_220215_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230483 = get_wall_time();
                        
                        long time_diff_230484 = time_end_230483 -
                             time_start_230482;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_220215", time_diff_230484);
                    }
                }
                ctx->failure_is_an_option = 1;
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_set_device(ctx, &ext_mem_224627, &mem_224625,
                                        "mem_224625") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224626, &mem_224620,
                                        "mem_224620") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224625, "mem_224625") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224620, "mem_224620") != 0)
                    return 1;
            }
            
            int32_t iters_199778;
            
            if (empty_slice_197232) {
                iters_199778 = 0;
            } else {
                iters_199778 = 16;
            }
            
            bool loop_nonempty_199779 = slt32(0, iters_199778);
            bool loop_not_taken_199780 = !loop_nonempty_199779;
            bool protect_assert_disj_199781 = bounds_check_196782 ||
                 loop_not_taken_199780;
            bool index_certs_199782;
            
            if (!protect_assert_disj_199781) {
                ctx->error =
                    msgprintf("Error: %s%lld%s%lld%s\n\nBacktrace:\n%s",
                              "Index [", (long long) i_196779,
                              "] out of bounds for array of shape [",
                              (long long) n_196692, "].",
                              "-> #0  /prelude/array.fut:26:29-34\n   #1  lib/github.com/diku-dk/sorts/radix_sort.fut:25:24-35\n   #2  lib/github.com/diku-dk/sorts/radix_sort.fut:53:31-62\n   #3  lib/github.com/diku-dk/sorts/radix_sort.fut:104:6-36\n   #4  stl.fut:338:35-77\n   #5  stl.fut:337:28-339:40\n   #6  stl.fut:401:3-415:29\n   #7  stl.fut:385:1-415:29\n");
                if (memblock_unref_device(ctx, &ext_mem_224626,
                                          "ext_mem_224626") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224627,
                                          "ext_mem_224627") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224918,
                                          "ext_mem_224918") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222572,
                                          "mem_param_222572") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222564,
                                          "mem_param_222564") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224583,
                                          "ext_mem_224583") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224584,
                                          "ext_mem_224584") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222550,
                                          "mem_param_222550") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222542,
                                          "mem_param_222542") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222534,
                                          "mem_param_222534") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224926,
                                          "ext_mem_224926") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224927,
                                          "ext_mem_224927") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224928,
                                          "ext_mem_224928") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223608, "mem_223608") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223591, "mem_223591") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223574, "mem_223574") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223557, "mem_223557") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222588, "mem_222588") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222583, "mem_222583") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222577, "mem_222577") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222517,
                                          "ext_mem_222517") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222518,
                                          "ext_mem_222518") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222468,
                                          "ext_mem_222468") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222469,
                                          "ext_mem_222469") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222419,
                                          "ext_mem_222419") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222420,
                                          "ext_mem_222420") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222321,
                                          "ext_mem_222321") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222322,
                                          "ext_mem_222322") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222256,
                                          "ext_mem_222256") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222257,
                                          "ext_mem_222257") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225292,
                                          "mem_out_225292") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225291,
                                          "mem_out_225291") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225290,
                                          "mem_out_225290") != 0)
                    return 1;
                err = 1;
                goto cleanup;
            }
            
            bool suff_outer_par_220237;
            
            suff_outer_par_220237 =
                *ctx->tuning_params.mainzisuff_outer_par_35 <= m_196691;
            if (ctx->logging)
                fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                        "main.suff_outer_par_35", (long) m_196691,
                        suff_outer_par_220237 ? "true" : "false");
            
            bool suff_intra_par_220426;
            
            suff_intra_par_220426 =
                *ctx->tuning_params.mainzisuff_intra_par_36 <= n_196692;
            if (ctx->logging)
                fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                        "main.suff_intra_par_36", (long) n_196692,
                        suff_intra_par_220426 ? "true" : "false");
            
            bool intra_suff_and_fits_220429 = fits_199971 &&
                 suff_intra_par_220426;
            int64_t segmap_group_sizze_220334;
            
            segmap_group_sizze_220334 =
                *ctx->tuning_params.mainzisegmap_group_sizze_220241;
            
            int64_t num_groups_220335;
            int32_t max_num_groups_229291;
            
            max_num_groups_229291 =
                *ctx->tuning_params.mainzisegmap_num_groups_220243;
            num_groups_220335 = sext_i64_i32(smax64((int64_t) 1,
                                                    smin64(sdiv_up64(m_196691,
                                                                     segmap_group_sizze_220334),
                                                           sext_i32_i64(max_num_groups_229291))));
            
            bool suff_intra_par_220867;
            
            suff_intra_par_220867 =
                *ctx->tuning_params.mainzisuff_intra_par_37 <= n_196692;
            if (ctx->logging)
                fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                        "main.suff_intra_par_37", (long) n_196692,
                        suff_intra_par_220867 ? "true" : "false");
            
            bool intra_suff_and_fits_220868 = fits_199971 &&
                 suff_intra_par_220867;
            int64_t segscan_group_sizze_220959;
            
            segscan_group_sizze_220959 =
                *ctx->tuning_params.mainzisegscan_group_sizze_220690;
            
            int64_t num_groups_220960;
            int32_t max_num_groups_229292;
            
            max_num_groups_229292 =
                *ctx->tuning_params.mainzisegscan_num_groups_220692;
            num_groups_220960 = sext_i64_i32(smax64((int64_t) 1,
                                                    smin64(sdiv_up64(nest_sizze_200083,
                                                                     segscan_group_sizze_220959),
                                                           sext_i32_i64(max_num_groups_229292))));
            
            int64_t segmap_group_sizze_221032;
            
            segmap_group_sizze_221032 =
                *ctx->tuning_params.mainzisegmap_group_sizze_220642;
            
            int64_t segmap_usable_groups_221033 =
                    sdiv_up_safe64(nest_sizze_200083,
                                   segmap_group_sizze_221032);
            int64_t num_bytes_225001 = (int64_t) 4 * n_196692;
            int64_t num_bytes_225006 = (int64_t) 4 * n_196692;
            int64_t num_threads_225271 = segmap_group_sizze_220334 *
                    num_groups_220335;
            int64_t total_sizze_225272 = num_bytes_225001 * num_threads_225271;
            int64_t total_sizze_225273 = bytes_224602 * num_threads_225271;
            int64_t total_sizze_225274 = bytes_224602 * num_threads_225271;
            int64_t total_sizze_225275 = bytes_222229 * num_threads_225271;
            int64_t total_sizze_225276 = bytes_222229 * num_threads_225271;
            int64_t total_sizze_225277 = bytes_222229 * num_threads_225271;
            int64_t total_sizze_225278 = bytes_222229 * num_threads_225271;
            int64_t total_sizze_225280 = m_196691 * num_bytes_225006;
            int64_t total_sizze_225281 = m_196691 * bytes_224602;
            struct memblock_device ext_mem_224882;
            
            ext_mem_224882.references = NULL;
            
            int32_t local_memory_capacity_229534;
            
            local_memory_capacity_229534 = ctx->opencl.max_local_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_229534)) &&
                suff_outer_par_220237) {
                struct memblock_device mem_224630;
                
                mem_224630.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224630, binop_y_222520,
                                          "mem_224630")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_224630,
                                                          (int64_t) 0,
                                                          ext_mem_224627,
                                                          (int64_t) 0,
                                                          (int64_t) 1, n_196692,
                                                          m_196691) != 0) {
                    if (memblock_unref_device(ctx, &mem_224630, "mem_224630") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224882,
                                              "ext_mem_224882") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224626,
                                              "ext_mem_224626") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224627,
                                              "ext_mem_224627") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224918,
                                              "ext_mem_224918") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224740;
                
                mem_224740.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224740, binop_y_222520,
                                          "mem_224740")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225109;
                
                color_225109.references = NULL;
                if (memblock_alloc_device(ctx, &color_225109,
                                          total_sizze_225272, "color_225109")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225110;
                
                color_225110.references = NULL;
                if (memblock_alloc_device(ctx, &color_225110,
                                          total_sizze_225273, "color_225110")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225111;
                
                color_225111.references = NULL;
                if (memblock_alloc_device(ctx, &color_225111,
                                          total_sizze_225274, "color_225111")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225112;
                
                color_225112.references = NULL;
                if (memblock_alloc_device(ctx, &color_225112,
                                          total_sizze_225275, "color_225112")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225113;
                
                color_225113.references = NULL;
                if (memblock_alloc_device(ctx, &color_225113,
                                          total_sizze_225276, "color_225113")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225114;
                
                color_225114.references = NULL;
                if (memblock_alloc_device(ctx, &color_225114,
                                          total_sizze_225277, "color_225114")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device color_225115;
                
                color_225115.references = NULL;
                if (memblock_alloc_device(ctx, &color_225115,
                                          total_sizze_225278, "color_225115")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        2, sizeof(n_196692),
                                                        &n_196692));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        3, sizeof(i_196779),
                                                        &i_196779));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        4, sizeof(iters_199778),
                                                        &iters_199778));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        5,
                                                        sizeof(num_groups_220335),
                                                        &num_groups_220335));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        6,
                                                        sizeof(num_threads_225271),
                                                        &num_threads_225271));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        7,
                                                        sizeof(mem_224630.mem),
                                                        &mem_224630.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        8,
                                                        sizeof(mem_224740.mem),
                                                        &mem_224740.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        9,
                                                        sizeof(color_225109.mem),
                                                        &color_225109.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        10,
                                                        sizeof(color_225110.mem),
                                                        &color_225110.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        11,
                                                        sizeof(color_225111.mem),
                                                        &color_225111.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        12,
                                                        sizeof(color_225112.mem),
                                                        &color_225112.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        13,
                                                        sizeof(color_225113.mem),
                                                        &color_225113.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        14,
                                                        sizeof(color_225114.mem),
                                                        &color_225114.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_220339,
                                                        15,
                                                        sizeof(color_225115.mem),
                                                        &color_225115.mem));
                if (1 * ((size_t) num_groups_220335 *
                         (size_t) segmap_group_sizze_220334) != 0) {
                    const size_t global_work_sizze_230486[1] =
                                 {(size_t) num_groups_220335 *
                                 (size_t) segmap_group_sizze_220334};
                    const size_t local_work_sizze_230490[1] =
                                 {(size_t) segmap_group_sizze_220334};
                    int64_t time_start_230487 = 0, time_end_230488 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_220339",
                                global_work_sizze_230486[0],
                                local_work_sizze_230490[0], (int) 0);
                        time_start_230487 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_220339,
                                                                    1, NULL,
                                                                    global_work_sizze_230486,
                                                                    local_work_sizze_230490,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_220339_runs,
                                                                                                              &ctx->mainzisegmap_220339_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230488 = get_wall_time();
                        
                        long time_diff_230489 = time_end_230488 -
                             time_start_230487;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_220339", time_diff_230489);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_224630, "mem_224630") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225109, "color_225109") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225110, "color_225110") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225111, "color_225111") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225112, "color_225112") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225113, "color_225113") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225114, "color_225114") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225115, "color_225115") !=
                    0)
                    return 1;
                
                struct memblock_device mem_224875;
                
                mem_224875.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224875, bytes_222521,
                                          "mem_224875")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_224875,
                                                          (int64_t) 0,
                                                          mem_224740,
                                                          (int64_t) 0,
                                                          (int64_t) 1, m_196691,
                                                          n_196692) != 0) {
                    if (memblock_unref_device(ctx, &mem_224875, "mem_224875") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225115,
                                              "color_225115") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225114,
                                              "color_225114") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225113,
                                              "color_225113") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225112,
                                              "color_225112") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225111,
                                              "color_225111") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225110,
                                              "color_225110") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225109,
                                              "color_225109") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224740, "mem_224740") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224630, "mem_224630") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224882,
                                              "ext_mem_224882") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224626,
                                              "ext_mem_224626") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224627,
                                              "ext_mem_224627") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224918,
                                              "ext_mem_224918") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                if (memblock_unref_device(ctx, &mem_224740, "mem_224740") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224882, &mem_224875,
                                        "mem_224875") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224875, "mem_224875") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225115, "color_225115") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225114, "color_225114") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225113, "color_225113") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225112, "color_225112") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225111, "color_225111") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225110, "color_225110") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &color_225109, "color_225109") !=
                    0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224740, "mem_224740") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224630, "mem_224630") != 0)
                    return 1;
            } else {
                struct memblock_device ext_mem_224864;
                
                ext_mem_224864.references = NULL;
                
                int32_t local_memory_capacity_229533;
                
                local_memory_capacity_229533 = ctx->opencl.max_local_memory;
                if (sle64(bytes_224602 + srem64((int64_t) 8 -
                                                srem64(bytes_224602,
                                                       (int64_t) 8),
                                                (int64_t) 8) + (bytes_224602 +
                                                                srem64((int64_t) 8 -
                                                                       srem64(bytes_224602,
                                                                              (int64_t) 8),
                                                                       (int64_t) 8)) +
                          (bytes_222229 + srem64((int64_t) 8 -
                                                 srem64(bytes_222229,
                                                        (int64_t) 8),
                                                 (int64_t) 8)) + (bytes_222229 +
                                                                  srem64((int64_t) 8 -
                                                                         srem64(bytes_222229,
                                                                                (int64_t) 8),
                                                                         (int64_t) 8)) +
                          (bytes_222229 + srem64((int64_t) 8 -
                                                 srem64(bytes_222229,
                                                        (int64_t) 8),
                                                 (int64_t) 8)) + (bytes_222229 +
                                                                  srem64((int64_t) 8 -
                                                                         srem64(bytes_222229,
                                                                                (int64_t) 8),
                                                                         (int64_t) 8)),
                          sext_i32_i64(local_memory_capacity_229533)) &&
                    intra_suff_and_fits_220429) {
                    struct memblock_device mem_224787;
                    
                    mem_224787.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224787, bytes_222521,
                                              "mem_224787")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device color_225116;
                    
                    color_225116.references = NULL;
                    if (memblock_alloc_device(ctx, &color_225116,
                                              total_sizze_225280,
                                              "color_225116")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device color_225117;
                    
                    color_225117.references = NULL;
                    if (memblock_alloc_device(ctx, &color_225117,
                                              total_sizze_225281,
                                              "color_225117")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegMap");
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            1,
                                                            (size_t) bytes_222229,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            2,
                                                            (size_t) bytes_222229,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            3,
                                                            (size_t) bytes_222229,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            4,
                                                            (size_t) bytes_222229,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            5,
                                                            (size_t) bytes_224602,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            6,
                                                            (size_t) bytes_224602,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            7, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            8, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            9, sizeof(i_196779),
                                                            &i_196779));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            10,
                                                            sizeof(iters_199778),
                                                            &iters_199778));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            11,
                                                            sizeof(ext_mem_224627.mem),
                                                            &ext_mem_224627.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            12,
                                                            sizeof(mem_224787.mem),
                                                            &mem_224787.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            13,
                                                            sizeof(color_225116.mem),
                                                            &color_225116.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220432,
                                                            14,
                                                            sizeof(color_225117.mem),
                                                            &color_225117.mem));
                    if (1 * ((size_t) m_196691 * (size_t) n_196692) != 0) {
                        const size_t global_work_sizze_230491[1] =
                                     {(size_t) m_196691 * (size_t) n_196692};
                        const size_t local_work_sizze_230495[1] =
                                     {(size_t) n_196692};
                        int64_t time_start_230492 = 0, time_end_230493 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segmap_intragroup_220432",
                                    global_work_sizze_230491[0],
                                    local_work_sizze_230495[0], (int) (0 +
                                                                       bytes_222229 +
                                                                       bytes_222229 +
                                                                       bytes_222229 +
                                                                       bytes_222229 +
                                                                       bytes_224602 +
                                                                       bytes_224602));
                            time_start_230492 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegmap_intragroup_220432,
                                                                        1, NULL,
                                                                        global_work_sizze_230491,
                                                                        local_work_sizze_230495,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegmap_intragroup_220432_runs,
                                                                                                                  &ctx->mainzisegmap_intragroup_220432_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230493 = get_wall_time();
                            
                            long time_diff_230494 = time_end_230493 -
                                 time_start_230492;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segmap_intragroup_220432",
                                    time_diff_230494);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &color_225116,
                                              "color_225116") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225117,
                                              "color_225117") != 0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224864, &mem_224787,
                                            "mem_224787") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225117,
                                              "color_225117") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &color_225116,
                                              "color_225116") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224787, "mem_224787") !=
                        0)
                        return 1;
                } else {
                    struct memblock_device mem_224791;
                    
                    mem_224791.references = NULL;
                    if (memblock_alloc_device(ctx, &mem_224791, bytes_222521,
                                              "mem_224791")) {
                        err = 1;
                        goto cleanup;
                    }
                    if (m_196691 * n_196692 * (int64_t) 4 > 0) {
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                                     ext_mem_224627.mem,
                                                                     mem_224791.mem,
                                                                     (size_t) (int64_t) 0,
                                                                     (size_t) (int64_t) 0,
                                                                     (size_t) (m_196691 *
                                                                               n_196692 *
                                                                               (int64_t) 4),
                                                                     0, NULL,
                                                                     ctx->profiling_paused ||
                                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                               &ctx->copy_dev_to_dev_runs,
                                                                                                               &ctx->copy_dev_to_dev_total_runtime)));
                        if (ctx->debugging)
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    }
                    
                    struct memblock_device ext_mem_224856;
                    
                    ext_mem_224856.references = NULL;
                    
                    struct memblock_device mem_param_224799;
                    
                    mem_param_224799.references = NULL;
                    if (memblock_set_device(ctx, &mem_param_224799, &mem_224791,
                                            "mem_224791") != 0)
                        return 1;
                    for (int32_t i_220855 = 0; i_220855 < iters_199778;
                         i_220855++) {
                        struct memblock_device mem_224805;
                        
                        mem_224805.references = NULL;
                        if (memblock_alloc_device(ctx, &mem_224805,
                                                  bytes_222521, "mem_224805")) {
                            err = 1;
                            goto cleanup;
                        }
                        if (m_196691 * n_196692 * (int64_t) 4 > 0) {
                            OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                                         mem_param_224799.mem,
                                                                         mem_224805.mem,
                                                                         (size_t) (int64_t) 0,
                                                                         (size_t) (int64_t) 0,
                                                                         (size_t) (m_196691 *
                                                                                   n_196692 *
                                                                                   (int64_t) 4),
                                                                         0,
                                                                         NULL,
                                                                         ctx->profiling_paused ||
                                                                         !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                   &ctx->copy_dev_to_dev_runs,
                                                                                                                   &ctx->copy_dev_to_dev_total_runtime)));
                            if (ctx->debugging)
                                OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        }
                        
                        int32_t defunc_2_radix_sort_step_arg_220858 = mul32(2,
                                                                            i_220855);
                        int32_t defunc_0_get_bit_arg_220859 = add32(1,
                                                                    defunc_2_radix_sort_step_arg_220858);
                        bool cond_f_res_220860 = defunc_0_get_bit_arg_220859 ==
                             31;
                        bool cond_f_res_220861 =
                             defunc_2_radix_sort_step_arg_220858 == 31;
                        struct memblock_device ext_mem_224853;
                        
                        ext_mem_224853.references = NULL;
                        
                        int32_t local_memory_capacity_229532;
                        
                        local_memory_capacity_229532 =
                            ctx->opencl.max_local_memory;
                        if (sle64(bytes_224602 + srem64((int64_t) 8 -
                                                        srem64(bytes_224602,
                                                               (int64_t) 8),
                                                        (int64_t) 8) +
                                  (bytes_222229 + srem64((int64_t) 8 -
                                                         srem64(bytes_222229,
                                                                (int64_t) 8),
                                                         (int64_t) 8)) +
                                  (bytes_222229 + srem64((int64_t) 8 -
                                                         srem64(bytes_222229,
                                                                (int64_t) 8),
                                                         (int64_t) 8)) +
                                  (bytes_222229 + srem64((int64_t) 8 -
                                                         srem64(bytes_222229,
                                                                (int64_t) 8),
                                                         (int64_t) 8)) +
                                  (bytes_222229 + srem64((int64_t) 8 -
                                                         srem64(bytes_222229,
                                                                (int64_t) 8),
                                                         (int64_t) 8)) +
                                  (bytes_224602 + srem64((int64_t) 8 -
                                                         srem64(bytes_224602,
                                                                (int64_t) 8),
                                                         (int64_t) 8)),
                                  sext_i32_i64(local_memory_capacity_229532)) &&
                            intra_suff_and_fits_220868) {
                            struct memblock_device mem_224830;
                            
                            mem_224830.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224830,
                                                      bytes_222521,
                                                      "mem_224830")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    1,
                                                                    (size_t) bytes_224602,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    2,
                                                                    (size_t) bytes_222229,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    3,
                                                                    (size_t) bytes_222229,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    4,
                                                                    (size_t) bytes_222229,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    5,
                                                                    (size_t) bytes_222229,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    6,
                                                                    (size_t) bytes_224602,
                                                                    NULL));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    7,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    8,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    9,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    10,
                                                                    sizeof(defunc_2_radix_sort_step_arg_220858),
                                                                    &defunc_2_radix_sort_step_arg_220858));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    11,
                                                                    sizeof(defunc_0_get_bit_arg_220859),
                                                                    &defunc_0_get_bit_arg_220859));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    12,
                                                                    sizeof(cond_f_res_220860),
                                                                    &cond_f_res_220860));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    13,
                                                                    sizeof(cond_f_res_220861),
                                                                    &cond_f_res_220861));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    14,
                                                                    sizeof(mem_param_224799.mem),
                                                                    &mem_param_224799.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_intragroup_220872,
                                                                    15,
                                                                    sizeof(mem_224830.mem),
                                                                    &mem_224830.mem));
                            if (1 * ((size_t) m_196691 * (size_t) n_196692) !=
                                0) {
                                const size_t global_work_sizze_230496[1] =
                                             {(size_t) m_196691 *
                                             (size_t) n_196692};
                                const size_t local_work_sizze_230500[1] =
                                             {(size_t) n_196692};
                                int64_t time_start_230497 = 0, time_end_230498 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_intragroup_220872",
                                            global_work_sizze_230496[0],
                                            local_work_sizze_230500[0],
                                            (int) (0 + bytes_224602 +
                                                   bytes_222229 + bytes_222229 +
                                                   bytes_222229 + bytes_222229 +
                                                   bytes_224602));
                                    time_start_230497 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_intragroup_220872,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230496,
                                                                                local_work_sizze_230500,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_intragroup_220872_runs,
                                                                                                                          &ctx->mainzisegmap_intragroup_220872_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230498 = get_wall_time();
                                    
                                    long time_diff_230499 = time_end_230498 -
                                         time_start_230497;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_intragroup_220872",
                                            time_diff_230499);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_set_device(ctx, &ext_mem_224853,
                                                    &mem_224830,
                                                    "mem_224830") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224830,
                                                      "mem_224830") != 0)
                                return 1;
                        } else {
                            struct memblock_device mem_224835;
                            
                            mem_224835.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224835,
                                                      bytes_222237,
                                                      "mem_224835")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224839;
                            
                            mem_224839.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224839,
                                                      bytes_222237,
                                                      "mem_224839")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224843;
                            
                            mem_224843.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224843,
                                                      bytes_222237,
                                                      "mem_224843")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224847;
                            
                            mem_224847.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224847,
                                                      bytes_222237,
                                                      "mem_224847")) {
                                err = 1;
                                goto cleanup;
                            }
                            
                            struct memblock_device mem_224851;
                            
                            mem_224851.references = NULL;
                            if (memblock_alloc_device(ctx, &mem_224851,
                                                      bytes_222521,
                                                      "mem_224851")) {
                                err = 1;
                                goto cleanup;
                            }
                            if (slt64((int64_t) 0, m_196691 * n_196692)) {
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s\n", "\n# SegScan");
                                
                                int64_t stage1_max_num_groups_229409;
                                
                                stage1_max_num_groups_229409 =
                                    ctx->opencl.max_group_size;
                                
                                int64_t stage1_num_groups_229410 =
                                        smin64(stage1_max_num_groups_229409,
                                               num_groups_220960);
                                int32_t num_threads_229411 =
                                        sext_i64_i32(stage1_num_groups_229410 *
                                        segscan_group_sizze_220959);
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        1,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        segscan_group_sizze_220959),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        2,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        segscan_group_sizze_220959),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        3,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        segscan_group_sizze_220959),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        4,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        segscan_group_sizze_220959),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        5,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        6,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        7,
                                                                        sizeof(defunc_2_radix_sort_step_arg_220858),
                                                                        &defunc_2_radix_sort_step_arg_220858));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        8,
                                                                        sizeof(defunc_0_get_bit_arg_220859),
                                                                        &defunc_0_get_bit_arg_220859));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        9,
                                                                        sizeof(cond_f_res_220860),
                                                                        &cond_f_res_220860));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        10,
                                                                        sizeof(cond_f_res_220861),
                                                                        &cond_f_res_220861));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        11,
                                                                        sizeof(num_threads_229411),
                                                                        &num_threads_229411));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        12,
                                                                        sizeof(mem_param_224799.mem),
                                                                        &mem_param_224799.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        13,
                                                                        sizeof(mem_224835.mem),
                                                                        &mem_224835.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        14,
                                                                        sizeof(mem_224839.mem),
                                                                        &mem_224839.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        15,
                                                                        sizeof(mem_224843.mem),
                                                                        &mem_224843.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        16,
                                                                        sizeof(mem_224847.mem),
                                                                        &mem_224847.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage1_220969,
                                                                        17,
                                                                        sizeof(mem_224851.mem),
                                                                        &mem_224851.mem));
                                if (1 * ((size_t) stage1_num_groups_229410 *
                                         (size_t) segscan_group_sizze_220959) !=
                                    0) {
                                    const size_t global_work_sizze_230501[1] =
                                                 {(size_t) stage1_num_groups_229410 *
                                                 (size_t) segscan_group_sizze_220959};
                                    const size_t local_work_sizze_230505[1] =
                                                 {(size_t) segscan_group_sizze_220959};
                                    int64_t time_start_230502 = 0,
                                            time_end_230503 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.scan_stage1_220969",
                                                global_work_sizze_230501[0],
                                                local_work_sizze_230505[0],
                                                (int) (0 + smax64((int64_t) 1,
                                                                  (int64_t) 8 *
                                                                  segscan_group_sizze_220959) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              segscan_group_sizze_220959) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              segscan_group_sizze_220959) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              segscan_group_sizze_220959)));
                                        time_start_230502 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainziscan_stage1_220969,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230501,
                                                                                    local_work_sizze_230505,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainziscan_stage1_220969_runs,
                                                                                                                              &ctx->mainziscan_stage1_220969_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230503 = get_wall_time();
                                        
                                        long time_diff_230504 =
                                             time_end_230503 -
                                             time_start_230502;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.scan_stage1_220969",
                                                time_diff_230504);
                                    }
                                }
                                if (ctx->debugging)
                                    fprintf(ctx->log, "%s: %llu%c",
                                            "elems_per_group",
                                            (long long) (segscan_group_sizze_220959 *
                                                         sdiv_up64(m_196691 *
                                                                   n_196692,
                                                                   sext_i32_i64(num_threads_229411))),
                                            '\n');
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        1,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        stage1_num_groups_229410),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        2,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        stage1_num_groups_229410),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        3,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        stage1_num_groups_229410),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        4,
                                                                        (size_t) smax64((int64_t) 1,
                                                                                        (int64_t) 8 *
                                                                                        stage1_num_groups_229410),
                                                                        NULL));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        5,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        6,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        7,
                                                                        sizeof(stage1_num_groups_229410),
                                                                        &stage1_num_groups_229410));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        8,
                                                                        sizeof(num_threads_229411),
                                                                        &num_threads_229411));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        9,
                                                                        sizeof(mem_224835.mem),
                                                                        &mem_224835.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        10,
                                                                        sizeof(mem_224839.mem),
                                                                        &mem_224839.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        11,
                                                                        sizeof(mem_224843.mem),
                                                                        &mem_224843.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage2_220969,
                                                                        12,
                                                                        sizeof(mem_224847.mem),
                                                                        &mem_224847.mem));
                                if (1 * ((size_t) (int64_t) 1 *
                                         (size_t) stage1_num_groups_229410) !=
                                    0) {
                                    const size_t global_work_sizze_230506[1] =
                                                 {(size_t) (int64_t) 1 *
                                                 (size_t) stage1_num_groups_229410};
                                    const size_t local_work_sizze_230510[1] =
                                                 {(size_t) stage1_num_groups_229410};
                                    int64_t time_start_230507 = 0,
                                            time_end_230508 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.scan_stage2_220969",
                                                global_work_sizze_230506[0],
                                                local_work_sizze_230510[0],
                                                (int) (0 + smax64((int64_t) 1,
                                                                  (int64_t) 8 *
                                                                  stage1_num_groups_229410) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              stage1_num_groups_229410) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              stage1_num_groups_229410) +
                                                       smax64((int64_t) 1,
                                                              (int64_t) 8 *
                                                              stage1_num_groups_229410)));
                                        time_start_230507 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainziscan_stage2_220969,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230506,
                                                                                    local_work_sizze_230510,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainziscan_stage2_220969_runs,
                                                                                                                              &ctx->mainziscan_stage2_220969_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230508 = get_wall_time();
                                        
                                        long time_diff_230509 =
                                             time_end_230508 -
                                             time_start_230507;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.scan_stage2_220969",
                                                time_diff_230509);
                                    }
                                }
                                
                                int32_t required_groups_229510 =
                                        sext_i64_i32(sdiv_up64(m_196691 *
                                                               n_196692,
                                                               segscan_group_sizze_220959));
                                
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        1,
                                                                        sizeof(m_196691),
                                                                        &m_196691));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        2,
                                                                        sizeof(n_196692),
                                                                        &n_196692));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        3,
                                                                        sizeof(num_groups_220960),
                                                                        &num_groups_220960));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        4,
                                                                        sizeof(num_threads_229411),
                                                                        &num_threads_229411));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        5,
                                                                        sizeof(required_groups_229510),
                                                                        &required_groups_229510));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        6,
                                                                        sizeof(mem_224835.mem),
                                                                        &mem_224835.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        7,
                                                                        sizeof(mem_224839.mem),
                                                                        &mem_224839.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        8,
                                                                        sizeof(mem_224843.mem),
                                                                        &mem_224843.mem));
                                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainziscan_stage3_220969,
                                                                        9,
                                                                        sizeof(mem_224847.mem),
                                                                        &mem_224847.mem));
                                if (1 * ((size_t) num_groups_220960 *
                                         (size_t) segscan_group_sizze_220959) !=
                                    0) {
                                    const size_t global_work_sizze_230511[1] =
                                                 {(size_t) num_groups_220960 *
                                                 (size_t) segscan_group_sizze_220959};
                                    const size_t local_work_sizze_230515[1] =
                                                 {(size_t) segscan_group_sizze_220959};
                                    int64_t time_start_230512 = 0,
                                            time_end_230513 = 0;
                                    
                                    if (ctx->debugging) {
                                        fprintf(ctx->log,
                                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                                "main.scan_stage3_220969",
                                                global_work_sizze_230511[0],
                                                local_work_sizze_230515[0],
                                                (int) 0);
                                        time_start_230512 = get_wall_time();
                                    }
                                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                    ctx->mainziscan_stage3_220969,
                                                                                    1,
                                                                                    NULL,
                                                                                    global_work_sizze_230511,
                                                                                    local_work_sizze_230515,
                                                                                    0,
                                                                                    NULL,
                                                                                    ctx->profiling_paused ||
                                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                              &ctx->mainziscan_stage3_220969_runs,
                                                                                                                              &ctx->mainziscan_stage3_220969_total_runtime)));
                                    if (ctx->debugging) {
                                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                        time_end_230513 = get_wall_time();
                                        
                                        long time_diff_230514 =
                                             time_end_230513 -
                                             time_start_230512;
                                        
                                        fprintf(ctx->log,
                                                "kernel %s runtime: %ldus\n",
                                                "main.scan_stage3_220969",
                                                time_diff_230514);
                                    }
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "\n# SegMap");
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    1,
                                                                    sizeof(m_196691),
                                                                    &m_196691));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    2,
                                                                    sizeof(n_196692),
                                                                    &n_196692));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    3,
                                                                    sizeof(i_196779),
                                                                    &i_196779));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    4,
                                                                    sizeof(mem_param_224799.mem),
                                                                    &mem_param_224799.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    5,
                                                                    sizeof(mem_224805.mem),
                                                                    &mem_224805.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    6,
                                                                    sizeof(mem_224835.mem),
                                                                    &mem_224835.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    7,
                                                                    sizeof(mem_224839.mem),
                                                                    &mem_224839.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    8,
                                                                    sizeof(mem_224843.mem),
                                                                    &mem_224843.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    9,
                                                                    sizeof(mem_224847.mem),
                                                                    &mem_224847.mem));
                            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221037,
                                                                    10,
                                                                    sizeof(mem_224851.mem),
                                                                    &mem_224851.mem));
                            if (1 * ((size_t) segmap_usable_groups_221033 *
                                     (size_t) segmap_group_sizze_221032) != 0) {
                                const size_t global_work_sizze_230516[1] =
                                             {(size_t) segmap_usable_groups_221033 *
                                             (size_t) segmap_group_sizze_221032};
                                const size_t local_work_sizze_230520[1] =
                                             {(size_t) segmap_group_sizze_221032};
                                int64_t time_start_230517 = 0, time_end_230518 =
                                        0;
                                
                                if (ctx->debugging) {
                                    fprintf(ctx->log,
                                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                            "main.segmap_221037",
                                            global_work_sizze_230516[0],
                                            local_work_sizze_230520[0],
                                            (int) 0);
                                    time_start_230517 = get_wall_time();
                                }
                                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                                ctx->mainzisegmap_221037,
                                                                                1,
                                                                                NULL,
                                                                                global_work_sizze_230516,
                                                                                local_work_sizze_230520,
                                                                                0,
                                                                                NULL,
                                                                                ctx->profiling_paused ||
                                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                          &ctx->mainzisegmap_221037_runs,
                                                                                                                          &ctx->mainzisegmap_221037_total_runtime)));
                                if (ctx->debugging) {
                                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                                    time_end_230518 = get_wall_time();
                                    
                                    long time_diff_230519 = time_end_230518 -
                                         time_start_230517;
                                    
                                    fprintf(ctx->log,
                                            "kernel %s runtime: %ldus\n",
                                            "main.segmap_221037",
                                            time_diff_230519);
                                }
                            }
                            if (ctx->debugging)
                                fprintf(ctx->log, "%s\n", "");
                            if (memblock_unref_device(ctx, &mem_224835,
                                                      "mem_224835") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224839,
                                                      "mem_224839") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224843,
                                                      "mem_224843") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224847,
                                                      "mem_224847") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224851,
                                                      "mem_224851") != 0)
                                return 1;
                            if (memblock_set_device(ctx, &ext_mem_224853,
                                                    &mem_224805,
                                                    "mem_224805") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224851,
                                                      "mem_224851") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224847,
                                                      "mem_224847") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224843,
                                                      "mem_224843") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224839,
                                                      "mem_224839") != 0)
                                return 1;
                            if (memblock_unref_device(ctx, &mem_224835,
                                                      "mem_224835") != 0)
                                return 1;
                        }
                        if (memblock_unref_device(ctx, &mem_224805,
                                                  "mem_224805") != 0)
                            return 1;
                        
                        struct memblock_device mem_param_tmp_229369;
                        
                        mem_param_tmp_229369.references = NULL;
                        if (memblock_set_device(ctx, &mem_param_tmp_229369,
                                                &ext_mem_224853,
                                                "ext_mem_224853") != 0)
                            return 1;
                        if (memblock_set_device(ctx, &mem_param_224799,
                                                &mem_param_tmp_229369,
                                                "mem_param_tmp_229369") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_param_tmp_229369,
                                                  "mem_param_tmp_229369") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &ext_mem_224853,
                                                  "ext_mem_224853") != 0)
                            return 1;
                        if (memblock_unref_device(ctx, &mem_224805,
                                                  "mem_224805") != 0)
                            return 1;
                    }
                    if (memblock_set_device(ctx, &ext_mem_224856,
                                            &mem_param_224799,
                                            "mem_param_224799") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224791, "mem_224791") !=
                        0)
                        return 1;
                    if (memblock_set_device(ctx, &ext_mem_224864,
                                            &ext_mem_224856,
                                            "ext_mem_224856") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_224799,
                                              "mem_param_224799") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224856,
                                              "ext_mem_224856") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_224791, "mem_224791") !=
                        0)
                        return 1;
                }
                
                struct memblock_device mem_224880;
                
                mem_224880.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224880, bytes_222521,
                                          "mem_224880")) {
                    err = 1;
                    goto cleanup;
                }
                if (m_196691 * n_196692 * (int64_t) 4 > 0) {
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                                 ext_mem_224864.mem,
                                                                 mem_224880.mem,
                                                                 (size_t) (int64_t) 0,
                                                                 (size_t) (int64_t) 0,
                                                                 (size_t) (m_196691 *
                                                                           n_196692 *
                                                                           (int64_t) 4),
                                                                 0, NULL,
                                                                 ctx->profiling_paused ||
                                                                 !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                           &ctx->copy_dev_to_dev_runs,
                                                                                                           &ctx->copy_dev_to_dev_total_runtime)));
                    if (ctx->debugging)
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                }
                if (memblock_unref_device(ctx, &ext_mem_224864,
                                          "ext_mem_224864") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224882, &mem_224880,
                                        "mem_224880") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224880, "mem_224880") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224864,
                                          "ext_mem_224864") != 0)
                    return 1;
            }
            if (memblock_unref_device(ctx, &ext_mem_224627, "ext_mem_224627") !=
                0)
                return 1;
            
            bool empty_slice_199896 = j_m_i_197246 == (int64_t) 0;
            int64_t m_199897 = sub64(j_m_i_197246, (int64_t) 1);
            int64_t i_p_m_t_s_199898 = add64(stl_res_196773, m_199897);
            bool zzero_leq_i_p_m_t_s_199899 = sle64((int64_t) 0,
                                                    i_p_m_t_s_199898);
            bool i_p_m_t_s_leq_w_199900 = slt64(i_p_m_t_s_199898, n_196692);
            bool zzero_lte_i_199901 = sle64((int64_t) 0, stl_res_196773);
            bool i_lte_j_199902 = sle64(stl_res_196773, stl_res_196774);
            bool y_199903 = i_p_m_t_s_leq_w_199900 && zzero_lte_i_199901;
            bool y_199904 = zzero_leq_i_p_m_t_s_199899 && y_199903;
            bool y_199905 = i_lte_j_199902 && y_199904;
            bool forwards_ok_199906 = zzero_lte_i_199901 && y_199905;
            bool ok_or_empty_199907 = empty_slice_199896 || forwards_ok_199906;
            bool index_certs_199908;
            
            if (!ok_or_empty_199907) {
                ctx->error =
                    msgprintf("Error: %s%lld%s%lld%s%lld%s\n\nBacktrace:\n%s",
                              "Index [", (long long) stl_res_196773, ":",
                              (long long) stl_res_196774,
                              "] out of bounds for array of shape [",
                              (long long) n_196692, "].",
                              "-> #0  stl.fut:344:33-51\n   #1  stl.fut:342:13-349:28\n   #2  stl.fut:401:3-415:29\n   #3  stl.fut:385:1-415:29\n");
                if (memblock_unref_device(ctx, &ext_mem_224882,
                                          "ext_mem_224882") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224626,
                                          "ext_mem_224626") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224627,
                                          "ext_mem_224627") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224918,
                                          "ext_mem_224918") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222572,
                                          "mem_param_222572") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222564,
                                          "mem_param_222564") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224583,
                                          "ext_mem_224583") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224584,
                                          "ext_mem_224584") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222550,
                                          "mem_param_222550") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222542,
                                          "mem_param_222542") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_param_222534,
                                          "mem_param_222534") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224926,
                                          "ext_mem_224926") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224927,
                                          "ext_mem_224927") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_224928,
                                          "ext_mem_224928") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223608, "mem_223608") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223591, "mem_223591") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223574, "mem_223574") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_223557, "mem_223557") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222588, "mem_222588") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222583, "mem_222583") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222577, "mem_222577") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222517,
                                          "ext_mem_222517") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222518,
                                          "ext_mem_222518") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222468,
                                          "ext_mem_222468") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222469,
                                          "ext_mem_222469") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222419,
                                          "ext_mem_222419") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222420,
                                          "ext_mem_222420") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222321,
                                          "ext_mem_222321") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222322,
                                          "ext_mem_222322") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222256,
                                          "ext_mem_222256") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &ext_mem_222257,
                                          "ext_mem_222257") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225292,
                                          "mem_out_225292") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225291,
                                          "mem_out_225291") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_out_225290,
                                          "mem_out_225290") != 0)
                    return 1;
                err = 1;
                goto cleanup;
            }
            
            bool suff_outer_par_221067;
            
            suff_outer_par_221067 =
                *ctx->tuning_params.mainzisuff_outer_par_38 <= m_196691;
            if (ctx->logging)
                fprintf(ctx->log, "Compared %s <= %ld: %s.\n",
                        "main.suff_outer_par_38", (long) m_196691,
                        suff_outer_par_221067 ? "true" : "false");
            
            int64_t segmap_group_sizze_221086;
            
            segmap_group_sizze_221086 =
                *ctx->tuning_params.mainzisegmap_group_sizze_221071;
            
            int64_t nest_sizze_221134 = m_196691 * j_m_i_197246;
            int64_t segred_group_sizze_221135;
            
            segred_group_sizze_221135 =
                *ctx->tuning_params.mainzisegred_group_sizze_221118;
            
            int64_t num_groups_221136;
            int32_t max_num_groups_229535;
            
            max_num_groups_229535 =
                *ctx->tuning_params.mainzisegred_num_groups_221120;
            num_groups_221136 = sext_i64_i32(smax64((int64_t) 1,
                                                    smin64(sdiv_up64(nest_sizze_221134,
                                                                     segred_group_sizze_221135),
                                                           sext_i32_i64(max_num_groups_229535))));
            
            int64_t segmap_group_sizze_221148;
            
            segmap_group_sizze_221148 =
                *ctx->tuning_params.mainzisegmap_group_sizze_221106;
            
            struct memblock_device ext_mem_224912;
            
            ext_mem_224912.references = NULL;
            
            struct memblock_device ext_mem_224911;
            
            ext_mem_224911.references = NULL;
            
            struct memblock_device ext_mem_224910;
            
            ext_mem_224910.references = NULL;
            
            int32_t local_memory_capacity_229621;
            
            local_memory_capacity_229621 = ctx->opencl.max_local_memory;
            if (sle64((int64_t) 0,
                      sext_i32_i64(local_memory_capacity_229621)) &&
                suff_outer_par_221067) {
                int64_t segmap_usable_groups_221087 = sdiv_up64(m_196691,
                                                                segmap_group_sizze_221086);
                struct memblock_device mem_224885;
                
                mem_224885.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224885, binop_y_222520,
                                          "mem_224885")) {
                    err = 1;
                    goto cleanup;
                }
                if (futrts_builtinzhgpu_map_transpose_f32(ctx, mem_224885,
                                                          (int64_t) 0,
                                                          ext_mem_224882,
                                                          (int64_t) 0,
                                                          (int64_t) 1, n_196692,
                                                          m_196691) != 0) {
                    if (memblock_unref_device(ctx, &mem_224885, "mem_224885") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224910,
                                              "ext_mem_224910") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224911,
                                              "ext_mem_224911") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224912,
                                              "ext_mem_224912") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224882,
                                              "ext_mem_224882") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224626,
                                              "ext_mem_224626") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224627,
                                              "ext_mem_224627") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224918,
                                              "ext_mem_224918") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222572,
                                              "mem_param_222572") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222564,
                                              "mem_param_222564") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224583,
                                              "ext_mem_224583") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224584,
                                              "ext_mem_224584") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222550,
                                              "mem_param_222550") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222542,
                                              "mem_param_222542") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_param_222534,
                                              "mem_param_222534") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224926,
                                              "ext_mem_224926") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224927,
                                              "ext_mem_224927") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_224928,
                                              "ext_mem_224928") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222517,
                                              "ext_mem_222517") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222518,
                                              "ext_mem_222518") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222468,
                                              "ext_mem_222468") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222469,
                                              "ext_mem_222469") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222419,
                                              "ext_mem_222419") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222420,
                                              "ext_mem_222420") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222321,
                                              "ext_mem_222321") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222322,
                                              "ext_mem_222322") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") !=
                        0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222256,
                                              "ext_mem_222256") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &ext_mem_222257,
                                              "ext_mem_222257") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225292,
                                              "mem_out_225292") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225291,
                                              "mem_out_225291") != 0)
                        return 1;
                    if (memblock_unref_device(ctx, &mem_out_225290,
                                              "mem_out_225290") != 0)
                        return 1;
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224889;
                
                mem_224889.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224889, bytes_222457,
                                          "mem_224889")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224892;
                
                mem_224892.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224892, bytes_222457,
                                          "mem_224892")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224895;
                
                mem_224895.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224895, bytes_222457,
                                          "mem_224895")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        2,
                                                        sizeof(stl_res_196773),
                                                        &stl_res_196773));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        3, sizeof(j_m_i_197246),
                                                        &j_m_i_197246));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        4,
                                                        sizeof(mem_224885.mem),
                                                        &mem_224885.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        5,
                                                        sizeof(mem_224889.mem),
                                                        &mem_224889.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        6,
                                                        sizeof(mem_224892.mem),
                                                        &mem_224892.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221092,
                                                        7,
                                                        sizeof(mem_224895.mem),
                                                        &mem_224895.mem));
                if (1 * ((size_t) segmap_usable_groups_221087 *
                         (size_t) segmap_group_sizze_221086) != 0) {
                    const size_t global_work_sizze_230521[1] =
                                 {(size_t) segmap_usable_groups_221087 *
                                 (size_t) segmap_group_sizze_221086};
                    const size_t local_work_sizze_230525[1] =
                                 {(size_t) segmap_group_sizze_221086};
                    int64_t time_start_230522 = 0, time_end_230523 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_221092",
                                global_work_sizze_230521[0],
                                local_work_sizze_230525[0], (int) 0);
                        time_start_230522 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_221092,
                                                                    1, NULL,
                                                                    global_work_sizze_230521,
                                                                    local_work_sizze_230525,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_221092_runs,
                                                                                                              &ctx->mainzisegmap_221092_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230523 = get_wall_time();
                        
                        long time_diff_230524 = time_end_230523 -
                             time_start_230522;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_221092", time_diff_230524);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_224885, "mem_224885") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224912, &mem_224889,
                                        "mem_224889") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224911, &mem_224892,
                                        "mem_224892") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224910, &mem_224895,
                                        "mem_224895") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224895, "mem_224895") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224892, "mem_224892") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224889, "mem_224889") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224885, "mem_224885") != 0)
                    return 1;
            } else {
                struct memblock_device mem_224899;
                
                mem_224899.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224899, bytes_222457,
                                          "mem_224899")) {
                    err = 1;
                    goto cleanup;
                }
                if (slt64(j_m_i_197246 * (int64_t) 2,
                          segred_group_sizze_221135)) {
                    int64_t segment_sizze_nonzzero_229545 = smax64((int64_t) 1,
                                                                   j_m_i_197246);
                    int64_t num_threads_229546 = num_groups_221136 *
                            segred_group_sizze_221135;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-small");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) j_m_i_197246, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segments_per_group",
                                (long long) squot64(segred_group_sizze_221135,
                                                    segment_sizze_nonzzero_229545),
                                '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "required_groups",
                                (long long) sext_i64_i32(sdiv_up64(m_196691,
                                                                   squot64(segred_group_sizze_221135,
                                                                           segment_sizze_nonzzero_229545))),
                                '\n');
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            1,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_221135),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            2, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            3, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            4,
                                                            sizeof(stl_res_196773),
                                                            &stl_res_196773));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            5,
                                                            sizeof(j_m_i_197246),
                                                            &j_m_i_197246));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            6,
                                                            sizeof(num_groups_221136),
                                                            &num_groups_221136));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            7,
                                                            sizeof(segment_sizze_nonzzero_229545),
                                                            &segment_sizze_nonzzero_229545));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            8,
                                                            sizeof(ext_mem_224882.mem),
                                                            &ext_mem_224882.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_small_221141,
                                                            9,
                                                            sizeof(mem_224899.mem),
                                                            &mem_224899.mem));
                    if (1 * ((size_t) num_groups_221136 *
                             (size_t) segred_group_sizze_221135) != 0) {
                        const size_t global_work_sizze_230526[1] =
                                     {(size_t) num_groups_221136 *
                                     (size_t) segred_group_sizze_221135};
                        const size_t local_work_sizze_230530[1] =
                                     {(size_t) segred_group_sizze_221135};
                        int64_t time_start_230527 = 0, time_end_230528 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_small_221141",
                                    global_work_sizze_230526[0],
                                    local_work_sizze_230530[0], (int) (0 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_221135));
                            time_start_230527 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_small_221141,
                                                                        1, NULL,
                                                                        global_work_sizze_230526,
                                                                        local_work_sizze_230530,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_small_221141_runs,
                                                                                                                  &ctx->mainzisegred_small_221141_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230528 = get_wall_time();
                            
                            long time_diff_230529 = time_end_230528 -
                                 time_start_230527;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_small_221141",
                                    time_diff_230529);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                } else {
                    int64_t groups_per_segment_229572 =
                            sdiv_up64(num_groups_221136, smax64((int64_t) 1,
                                                                m_196691));
                    int64_t elements_per_thread_229573 = sdiv_up64(j_m_i_197246,
                                                                   segred_group_sizze_221135 *
                                                                   groups_per_segment_229572);
                    int64_t virt_num_groups_229574 = groups_per_segment_229572 *
                            m_196691;
                    int64_t num_threads_229575 = num_groups_221136 *
                            segred_group_sizze_221135;
                    int64_t threads_per_segment_229576 =
                            groups_per_segment_229572 *
                            segred_group_sizze_221135;
                    
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "\n# SegRed-large");
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_segments",
                                (long long) m_196691, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "segment_size",
                                (long long) j_m_i_197246, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "virt_num_groups",
                                (long long) virt_num_groups_229574, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "num_groups",
                                (long long) num_groups_221136, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "group_size",
                                (long long) segred_group_sizze_221135, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "elems_per_thread",
                                (long long) elements_per_thread_229573, '\n');
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s: %llu%c", "groups_per_segment",
                                (long long) groups_per_segment_229572, '\n');
                    
                    struct memblock_device segred_tmp_mem_229577;
                    
                    segred_tmp_mem_229577.references = NULL;
                    if (memblock_alloc_device(ctx, &segred_tmp_mem_229577,
                                              (int64_t) 4 *
                                              virt_num_groups_229574,
                                              "segred_tmp_mem_229577")) {
                        err = 1;
                        goto cleanup;
                    }
                    
                    struct memblock_device mainzicounter_mem_229579 =
                                           ctx->mainzicounter_mem_229579;
                    
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            1, (size_t) 1,
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            2,
                                                            (size_t) ((int64_t) 4 *
                                                                      segred_group_sizze_221135),
                                                            NULL));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            3, sizeof(m_196691),
                                                            &m_196691));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            4, sizeof(n_196692),
                                                            &n_196692));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            5,
                                                            sizeof(stl_res_196773),
                                                            &stl_res_196773));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            6,
                                                            sizeof(j_m_i_197246),
                                                            &j_m_i_197246));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            7,
                                                            sizeof(num_groups_221136),
                                                            &num_groups_221136));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            8,
                                                            sizeof(groups_per_segment_229572),
                                                            &groups_per_segment_229572));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            9,
                                                            sizeof(elements_per_thread_229573),
                                                            &elements_per_thread_229573));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            10,
                                                            sizeof(virt_num_groups_229574),
                                                            &virt_num_groups_229574));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            11,
                                                            sizeof(threads_per_segment_229576),
                                                            &threads_per_segment_229576));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            12,
                                                            sizeof(ext_mem_224882.mem),
                                                            &ext_mem_224882.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            13,
                                                            sizeof(mem_224899.mem),
                                                            &mem_224899.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            14,
                                                            sizeof(segred_tmp_mem_229577.mem),
                                                            &segred_tmp_mem_229577.mem));
                    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegred_large_221141,
                                                            15,
                                                            sizeof(mainzicounter_mem_229579.mem),
                                                            &mainzicounter_mem_229579.mem));
                    if (1 * ((size_t) num_groups_221136 *
                             (size_t) segred_group_sizze_221135) != 0) {
                        const size_t global_work_sizze_230532[1] =
                                     {(size_t) num_groups_221136 *
                                     (size_t) segred_group_sizze_221135};
                        const size_t local_work_sizze_230536[1] =
                                     {(size_t) segred_group_sizze_221135};
                        int64_t time_start_230533 = 0, time_end_230534 = 0;
                        
                        if (ctx->debugging) {
                            fprintf(ctx->log,
                                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                    "main.segred_large_221141",
                                    global_work_sizze_230532[0],
                                    local_work_sizze_230536[0], (int) (0 + 1 +
                                                                       (int64_t) 4 *
                                                                       segred_group_sizze_221135));
                            time_start_230533 = get_wall_time();
                        }
                        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                        ctx->mainzisegred_large_221141,
                                                                        1, NULL,
                                                                        global_work_sizze_230532,
                                                                        local_work_sizze_230536,
                                                                        0, NULL,
                                                                        ctx->profiling_paused ||
                                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                                  &ctx->mainzisegred_large_221141_runs,
                                                                                                                  &ctx->mainzisegred_large_221141_total_runtime)));
                        if (ctx->debugging) {
                            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                            time_end_230534 = get_wall_time();
                            
                            long time_diff_230535 = time_end_230534 -
                                 time_start_230533;
                            
                            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                    "main.segred_large_221141",
                                    time_diff_230535);
                        }
                    }
                    if (ctx->debugging)
                        fprintf(ctx->log, "%s\n", "");
                    if (memblock_unref_device(ctx, &segred_tmp_mem_229577,
                                              "segred_tmp_mem_229577") != 0)
                        return 1;
                }
                
                int64_t segmap_usable_groups_221149 = sdiv_up64(m_196691,
                                                                segmap_group_sizze_221148);
                struct memblock_device mem_224903;
                
                mem_224903.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224903, bytes_222457,
                                          "mem_224903")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224906;
                
                mem_224906.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224906, bytes_222457,
                                          "mem_224906")) {
                    err = 1;
                    goto cleanup;
                }
                
                struct memblock_device mem_224909;
                
                mem_224909.references = NULL;
                if (memblock_alloc_device(ctx, &mem_224909, bytes_222457,
                                          "mem_224909")) {
                    err = 1;
                    goto cleanup;
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "\n# SegMap");
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221154,
                                                        1, sizeof(m_196691),
                                                        &m_196691));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221154,
                                                        2,
                                                        sizeof(mem_224899.mem),
                                                        &mem_224899.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221154,
                                                        3,
                                                        sizeof(mem_224903.mem),
                                                        &mem_224903.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221154,
                                                        4,
                                                        sizeof(mem_224906.mem),
                                                        &mem_224906.mem));
                OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221154,
                                                        5,
                                                        sizeof(mem_224909.mem),
                                                        &mem_224909.mem));
                if (1 * ((size_t) segmap_usable_groups_221149 *
                         (size_t) segmap_group_sizze_221148) != 0) {
                    const size_t global_work_sizze_230537[1] =
                                 {(size_t) segmap_usable_groups_221149 *
                                 (size_t) segmap_group_sizze_221148};
                    const size_t local_work_sizze_230541[1] =
                                 {(size_t) segmap_group_sizze_221148};
                    int64_t time_start_230538 = 0, time_end_230539 = 0;
                    
                    if (ctx->debugging) {
                        fprintf(ctx->log,
                                "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                                "main.segmap_221154",
                                global_work_sizze_230537[0],
                                local_work_sizze_230541[0], (int) 0);
                        time_start_230538 = get_wall_time();
                    }
                    OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                    ctx->mainzisegmap_221154,
                                                                    1, NULL,
                                                                    global_work_sizze_230537,
                                                                    local_work_sizze_230541,
                                                                    0, NULL,
                                                                    ctx->profiling_paused ||
                                                                    !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                              &ctx->mainzisegmap_221154_runs,
                                                                                                              &ctx->mainzisegmap_221154_total_runtime)));
                    if (ctx->debugging) {
                        OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                        time_end_230539 = get_wall_time();
                        
                        long time_diff_230540 = time_end_230539 -
                             time_start_230538;
                        
                        fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                                "main.segmap_221154", time_diff_230540);
                    }
                }
                if (ctx->debugging)
                    fprintf(ctx->log, "%s\n", "");
                if (memblock_unref_device(ctx, &mem_224899, "mem_224899") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224912, &mem_224903,
                                        "mem_224903") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224911, &mem_224906,
                                        "mem_224906") != 0)
                    return 1;
                if (memblock_set_device(ctx, &ext_mem_224910, &mem_224909,
                                        "mem_224909") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224909, "mem_224909") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224906, "mem_224906") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224903, "mem_224903") != 0)
                    return 1;
                if (memblock_unref_device(ctx, &mem_224899, "mem_224899") != 0)
                    return 1;
            }
            if (memblock_unref_device(ctx, &ext_mem_224882, "ext_mem_224882") !=
                0)
                return 1;
            
            int64_t segmap_group_sizze_221235;
            
            segmap_group_sizze_221235 =
                *ctx->tuning_params.mainzisegmap_group_sizze_221175;
            
            int64_t segmap_usable_groups_221236 = sdiv_up64(nest_sizze_200083,
                                                            segmap_group_sizze_221235);
            struct memblock_device mem_224917;
            
            mem_224917.references = NULL;
            if (memblock_alloc_device(ctx, &mem_224917, bytes_222521,
                                      "mem_224917")) {
                err = 1;
                goto cleanup;
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "\n# SegMap");
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 1,
                                                    sizeof(m_196691),
                                                    &m_196691));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 2,
                                                    sizeof(n_196692),
                                                    &n_196692));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 3,
                                                    sizeof(ext_mem_224626.mem),
                                                    &ext_mem_224626.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 4,
                                                    sizeof(ext_mem_224910.mem),
                                                    &ext_mem_224910.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 5,
                                                    sizeof(ext_mem_224911.mem),
                                                    &ext_mem_224911.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 6,
                                                    sizeof(ext_mem_224912.mem),
                                                    &ext_mem_224912.mem));
            OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221240, 7,
                                                    sizeof(mem_224917.mem),
                                                    &mem_224917.mem));
            if (1 * ((size_t) segmap_usable_groups_221236 *
                     (size_t) segmap_group_sizze_221235) != 0) {
                const size_t global_work_sizze_230542[1] =
                             {(size_t) segmap_usable_groups_221236 *
                             (size_t) segmap_group_sizze_221235};
                const size_t local_work_sizze_230546[1] =
                             {(size_t) segmap_group_sizze_221235};
                int64_t time_start_230543 = 0, time_end_230544 = 0;
                
                if (ctx->debugging) {
                    fprintf(ctx->log,
                            "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                            "main.segmap_221240", global_work_sizze_230542[0],
                            local_work_sizze_230546[0], (int) 0);
                    time_start_230543 = get_wall_time();
                }
                OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                                ctx->mainzisegmap_221240,
                                                                1, NULL,
                                                                global_work_sizze_230542,
                                                                local_work_sizze_230546,
                                                                0, NULL,
                                                                ctx->profiling_paused ||
                                                                !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                          &ctx->mainzisegmap_221240_runs,
                                                                                                          &ctx->mainzisegmap_221240_total_runtime)));
                if (ctx->debugging) {
                    OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
                    time_end_230544 = get_wall_time();
                    
                    long time_diff_230545 = time_end_230544 - time_start_230543;
                    
                    fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                            "main.segmap_221240", time_diff_230545);
                }
            }
            if (ctx->debugging)
                fprintf(ctx->log, "%s\n", "");
            if (memblock_unref_device(ctx, &ext_mem_224626, "ext_mem_224626") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224910, "ext_mem_224910") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224911, "ext_mem_224911") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224912, "ext_mem_224912") !=
                0)
                return 1;
            if (memblock_set_device(ctx, &ext_mem_224918, &mem_224917,
                                    "mem_224917") != 0)
                return 1;
            if (memblock_unref_device(ctx, &mem_224917, "mem_224917") != 0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224910, "ext_mem_224910") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224911, "ext_mem_224911") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224912, "ext_mem_224912") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224882, "ext_mem_224882") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224626, "ext_mem_224626") !=
                0)
                return 1;
            if (memblock_unref_device(ctx, &ext_mem_224627, "ext_mem_224627") !=
                0)
                return 1;
        } else {
            if (memblock_set_device(ctx, &ext_mem_224918, &mem_param_222550,
                                    "mem_param_222550") != 0)
                return 1;
        }
        
        int64_t ctx_param_ext_tmp_225819 = ext_224590;
        int64_t ctx_param_ext_tmp_225820 = ext_224588;
        int64_t ctx_param_ext_tmp_225821 = ext_224923;
        int64_t ctx_param_ext_tmp_225822 = ext_224922;
        int64_t ctx_param_ext_tmp_225823 = ext_224919;
        int64_t ctx_param_ext_tmp_225824 = ext_224921;
        int64_t ctx_param_ext_tmp_225825 = ext_224925;
        int64_t ctx_param_ext_tmp_225826 = ext_224920;
        int64_t ctx_param_ext_tmp_225827 = ext_224924;
        struct memblock_device mem_param_tmp_225828;
        
        mem_param_tmp_225828.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225828, &ext_mem_224584,
                                "ext_mem_224584") != 0)
            return 1;
        
        struct memblock_device mem_param_tmp_225829;
        
        mem_param_tmp_225829.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225829, &ext_mem_224583,
                                "ext_mem_224583") != 0)
            return 1;
        
        struct memblock_device mem_param_tmp_225830;
        
        mem_param_tmp_225830.references = NULL;
        if (memblock_set_device(ctx, &mem_param_tmp_225830, &ext_mem_224918,
                                "ext_mem_224918") != 0)
            return 1;
        ctx_param_ext_222536 = ctx_param_ext_tmp_225819;
        ctx_param_ext_222538 = ctx_param_ext_tmp_225820;
        ctx_param_ext_222543 = ctx_param_ext_tmp_225821;
        ctx_param_ext_222544 = ctx_param_ext_tmp_225822;
        ctx_param_ext_222545 = ctx_param_ext_tmp_225823;
        ctx_param_ext_222546 = ctx_param_ext_tmp_225824;
        ctx_param_ext_222547 = ctx_param_ext_tmp_225825;
        ctx_param_ext_222548 = ctx_param_ext_tmp_225826;
        ctx_param_ext_222549 = ctx_param_ext_tmp_225827;
        if (memblock_set_device(ctx, &mem_param_222534, &mem_param_tmp_225828,
                                "mem_param_tmp_225828") != 0)
            return 1;
        if (memblock_set_device(ctx, &mem_param_222542, &mem_param_tmp_225829,
                                "mem_param_tmp_225829") != 0)
            return 1;
        if (memblock_set_device(ctx, &mem_param_222550, &mem_param_tmp_225830,
                                "mem_param_tmp_225830") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225830,
                                  "mem_param_tmp_225830") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225829,
                                  "mem_param_tmp_225829") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_tmp_225828,
                                  "mem_param_tmp_225828") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_224918, "ext_mem_224918") != 0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_222572, "mem_param_222572") !=
            0)
            return 1;
        if (memblock_unref_device(ctx, &mem_param_222564, "mem_param_222564") !=
            0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_224583, "ext_mem_224583") != 0)
            return 1;
        if (memblock_unref_device(ctx, &ext_mem_224584, "ext_mem_224584") != 0)
            return 1;
    }
    ext_224941 = ctx_param_ext_222536;
    ext_224939 = ctx_param_ext_222538;
    ext_224935 = ctx_param_ext_222543;
    ext_224934 = ctx_param_ext_222544;
    ext_224933 = ctx_param_ext_222545;
    ext_224932 = ctx_param_ext_222546;
    ext_224931 = ctx_param_ext_222547;
    ext_224930 = ctx_param_ext_222548;
    ext_224929 = ctx_param_ext_222549;
    if (memblock_set_device(ctx, &ext_mem_224928, &mem_param_222534,
                            "mem_param_222534") != 0)
        return 1;
    if (memblock_set_device(ctx, &ext_mem_224927, &mem_param_222542,
                            "mem_param_222542") != 0)
        return 1;
    if (memblock_set_device(ctx, &ext_mem_224926, &mem_param_222550,
                            "mem_param_222550") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") != 0)
        return 1;
    
    int64_t segmap_group_sizze_221305;
    
    segmap_group_sizze_221305 =
        *ctx->tuning_params.mainzisegmap_group_sizze_221275;
    
    int64_t segmap_usable_groups_221306 = sdiv_up64(nest_sizze_200083,
                                                    segmap_group_sizze_221305);
    struct memblock_device mem_224954;
    
    mem_224954.references = NULL;
    if (memblock_alloc_device(ctx, &mem_224954, bytes_222521, "mem_224954")) {
        err = 1;
        goto cleanup;
    }
    if (ctx->debugging)
        fprintf(ctx->log, "%s\n", "\n# SegMap");
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 1,
                                            sizeof(m_196691), &m_196691));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 2,
                                            sizeof(n_196692), &n_196692));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 3,
                                            sizeof(ext_224939), &ext_224939));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 4,
                                            sizeof(Y_mem_222225.mem),
                                            &Y_mem_222225.mem));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 5,
                                            sizeof(ext_mem_224927.mem),
                                            &ext_mem_224927.mem));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 6,
                                            sizeof(ext_mem_224928.mem),
                                            &ext_mem_224928.mem));
    OPENCL_SUCCEED_OR_RETURN(clSetKernelArg(ctx->mainzisegmap_221310, 7,
                                            sizeof(mem_224954.mem),
                                            &mem_224954.mem));
    if (1 * ((size_t) segmap_usable_groups_221306 *
             (size_t) segmap_group_sizze_221305) != 0) {
        const size_t global_work_sizze_230547[1] =
                     {(size_t) segmap_usable_groups_221306 *
                     (size_t) segmap_group_sizze_221305};
        const size_t local_work_sizze_230551[1] =
                     {(size_t) segmap_group_sizze_221305};
        int64_t time_start_230548 = 0, time_end_230549 = 0;
        
        if (ctx->debugging) {
            fprintf(ctx->log,
                    "Launching %s with global work size [%zu] and local work size [%zu]; local memory: %d bytes.\n",
                    "main.segmap_221310", global_work_sizze_230547[0],
                    local_work_sizze_230551[0], (int) 0);
            time_start_230548 = get_wall_time();
        }
        OPENCL_SUCCEED_OR_RETURN(clEnqueueNDRangeKernel(ctx->opencl.queue,
                                                        ctx->mainzisegmap_221310,
                                                        1, NULL,
                                                        global_work_sizze_230547,
                                                        local_work_sizze_230551,
                                                        0, NULL,
                                                        ctx->profiling_paused ||
                                                        !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                                  &ctx->mainzisegmap_221310_runs,
                                                                                                  &ctx->mainzisegmap_221310_total_runtime)));
        if (ctx->debugging) {
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
            time_end_230549 = get_wall_time();
            
            long time_diff_230550 = time_end_230549 - time_start_230548;
            
            fprintf(ctx->log, "kernel %s runtime: %ldus\n",
                    "main.segmap_221310", time_diff_230550);
        }
    }
    if (ctx->debugging)
        fprintf(ctx->log, "%s\n", "");
    
    struct memblock_device mem_224958;
    
    mem_224958.references = NULL;
    if (memblock_alloc_device(ctx, &mem_224958, bytes_222521, "mem_224958")) {
        err = 1;
        goto cleanup;
    }
    if (m_196691 * n_196692 * (int64_t) 4 > 0) {
        OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                     ext_mem_224928.mem,
                                                     mem_224958.mem,
                                                     (size_t) (int64_t) 0,
                                                     (size_t) (int64_t) 0,
                                                     (size_t) (m_196691 *
                                                               n_196692 *
                                                               (int64_t) 4), 0,
                                                     NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_dev_to_dev_runs,
                                                                                               &ctx->copy_dev_to_dev_total_runtime)));
        if (ctx->debugging)
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
    }
    if (memblock_unref_device(ctx, &ext_mem_224928, "ext_mem_224928") != 0)
        return 1;
    
    struct memblock_device mem_224963;
    
    mem_224963.references = NULL;
    if (memblock_alloc_device(ctx, &mem_224963, bytes_222521, "mem_224963")) {
        err = 1;
        goto cleanup;
    }
    if (m_196691 * n_196692 * (int64_t) 4 > 0) {
        OPENCL_SUCCEED_OR_RETURN(clEnqueueCopyBuffer(ctx->opencl.queue,
                                                     ext_mem_224927.mem,
                                                     mem_224963.mem,
                                                     (size_t) (int64_t) 0,
                                                     (size_t) (int64_t) 0,
                                                     (size_t) (m_196691 *
                                                               n_196692 *
                                                               (int64_t) 4), 0,
                                                     NULL,
                                                     ctx->profiling_paused ||
                                                     !ctx->profiling ? NULL : opencl_get_event(&ctx->opencl,
                                                                                               &ctx->copy_dev_to_dev_runs,
                                                                                               &ctx->copy_dev_to_dev_total_runtime)));
        if (ctx->debugging)
            OPENCL_SUCCEED_FATAL(clFinish(ctx->opencl.queue));
    }
    if (memblock_unref_device(ctx, &ext_mem_224927, "ext_mem_224927") != 0)
        return 1;
    if (memblock_set_device(ctx, &mem_out_225290, &mem_224958, "mem_224958") !=
        0)
        return 1;
    if (memblock_set_device(ctx, &mem_out_225291, &mem_224963, "mem_224963") !=
        0)
        return 1;
    if (memblock_set_device(ctx, &mem_out_225292, &mem_224954, "mem_224954") !=
        0)
        return 1;
    (*mem_out_p_229692).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_229692, &mem_out_225290,
                            "mem_out_225290") != 0)
        return 1;
    (*mem_out_p_229693).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_229693, &mem_out_225291,
                            "mem_out_225291") != 0)
        return 1;
    (*mem_out_p_229694).references = NULL;
    if (memblock_set_device(ctx, &*mem_out_p_229694, &mem_out_225292,
                            "mem_out_225292") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_224963, "mem_224963") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_224958, "mem_224958") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_224954, "mem_224954") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_param_222550, "mem_param_222550") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_param_222542, "mem_param_222542") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_param_222534, "mem_param_222534") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_224926, "ext_mem_224926") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_224927, "ext_mem_224927") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_224928, "ext_mem_224928") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223608, "mem_223608") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223591, "mem_223591") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223574, "mem_223574") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_223557, "mem_223557") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222588, "mem_222588") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222583, "mem_222583") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222577, "mem_222577") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222526, "mem_222526") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222522, "mem_222522") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222517, "ext_mem_222517") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222518, "ext_mem_222518") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222468, "ext_mem_222468") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222469, "ext_mem_222469") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222419, "ext_mem_222419") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222420, "ext_mem_222420") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222321, "ext_mem_222321") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222322, "ext_mem_222322") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_222263, "mem_222263") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222256, "ext_mem_222256") != 0)
        return 1;
    if (memblock_unref_device(ctx, &ext_mem_222257, "ext_mem_222257") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_out_225292, "mem_out_225292") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_out_225291, "mem_out_225291") != 0)
        return 1;
    if (memblock_unref_device(ctx, &mem_out_225290, "mem_out_225290") != 0)
        return 1;
    
  cleanup:
    { }
    return err;
}

int futhark_entry_main(struct futhark_context *ctx,
                       struct futhark_f32_2d **out0,
                       struct futhark_f32_2d **out1,
                       struct futhark_f32_2d **out2, const
                       struct futhark_f32_2d *in0, const int64_t in1, const
                       int64_t in2, const int64_t in3, const int64_t in4, const
                       int64_t in5, const int64_t in6, const int64_t in7, const
                       int64_t in8, const int64_t in9, const int64_t in10, const
                       int64_t in11, const int64_t in12, const int64_t in13,
                       const int64_t in14)
{
    struct memblock_device Y_mem_222225;
    
    Y_mem_222225.references = NULL;
    
    int64_t m_196691;
    int64_t n_196692;
    int64_t n_p_196694;
    int64_t q_s_196695;
    int64_t q_t_196696;
    int64_t q_l_196697;
    int64_t d_s_196698;
    int64_t d_t_196699;
    int64_t d_l_196700;
    int64_t jump_s_196701;
    int64_t jump_t_196702;
    int64_t jump_l_196703;
    int64_t n_inner_196704;
    int64_t n_outer_196705;
    int64_t jump_threshold_196706;
    int64_t q_threshold_196707;
    struct memblock_device mem_out_225290;
    
    mem_out_225290.references = NULL;
    
    struct memblock_device mem_out_225291;
    
    mem_out_225291.references = NULL;
    
    struct memblock_device mem_out_225292;
    
    mem_out_225292.references = NULL;
    
    int ret = 0;
    
    lock_lock(&ctx->lock);
    Y_mem_222225 = in0->mem;
    m_196691 = in0->shape[0];
    n_196692 = in0->shape[1];
    n_p_196694 = in1;
    q_s_196695 = in2;
    q_t_196696 = in3;
    q_l_196697 = in4;
    d_s_196698 = in5;
    d_t_196699 = in6;
    d_l_196700 = in7;
    jump_s_196701 = in8;
    jump_t_196702 = in9;
    jump_l_196703 = in10;
    n_inner_196704 = in11;
    n_outer_196705 = in12;
    jump_threshold_196706 = in13;
    q_threshold_196707 = in14;
    if (!(m_196691 == in0->shape[0] && n_196692 == in0->shape[1])) {
        ret = 1;
        if (!ctx->error)
            ctx->error =
                msgprintf("Error: entry point arguments have invalid sizes.\n");
    }
    if (ret == 0) {
        ret = futrts_entry_main(ctx, &mem_out_225290, &mem_out_225291,
                                &mem_out_225292, Y_mem_222225, m_196691,
                                n_196692, n_p_196694, q_s_196695, q_t_196696,
                                q_l_196697, d_s_196698, d_t_196699, d_l_196700,
                                jump_s_196701, jump_t_196702, jump_l_196703,
                                n_inner_196704, n_outer_196705,
                                jump_threshold_196706, q_threshold_196707);
        if (ret == 0) {
            assert((*out0 =
                    (struct futhark_f32_2d *) malloc(sizeof(struct futhark_f32_2d))) !=
                NULL);
            (*out0)->mem = mem_out_225290;
            (*out0)->shape[0] = m_196691;
            (*out0)->shape[1] = n_196692;
            assert((*out1 =
                    (struct futhark_f32_2d *) malloc(sizeof(struct futhark_f32_2d))) !=
                NULL);
            (*out1)->mem = mem_out_225291;
            (*out1)->shape[0] = m_196691;
            (*out1)->shape[1] = n_196692;
            assert((*out2 =
                    (struct futhark_f32_2d *) malloc(sizeof(struct futhark_f32_2d))) !=
                NULL);
            (*out2)->mem = mem_out_225292;
            (*out2)->shape[0] = m_196691;
            (*out2)->shape[1] = n_196692;
        }
    }
    lock_unlock(&ctx->lock);
    return ret;
}
  
